nRF Cloud & Node-Red - REST Api Call "connection timed out: api.nrfcloud.com/44.199.169.244:443" but works with curl

Good morning,

Since yesterday i have a new problem with the nRF Cloud. This time with ListMessages of the REST API.

I use a Node-Red rule chain and send a GET to the following endpoint in a time-controlled manner:

As authentication I use the Simple Auth (changed the token for the screenshot). Exactly this setup worked without any problems in the last weeks.
When calling Node-Red I get the following exception:

io.netty.channel.ConnectTimeoutException: connection timed out: api.nrfcloud.com/54.147.11.139:443
	at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe$1.run(AbstractNioChannel.java:261)
	at io.netty.util.concurrent.PromiseTask.runTask(PromiseTask.java:98)
	at io.netty.util.concurrent.ScheduledFutureTask.run(ScheduledFutureTask.java:170)
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164)
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:469)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:500)
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986)
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.base/java.lang.Thread.run(Thread.java:834)

If I try to address the endpoint of the error message directly, it indicates that "/v1" must be added to the URL.

With the described adaptation, the connection seems to be successful :

What surprises me very much about this error: the request works via a curl command. 

curl https://api.nrfcloud.com/v1/messages?pageLimit=1 -H "Authorization: Bearer XXexampleYY1234"

Please keep in mind that the request via node-red has only stopped working since the update.

I am looking forward to hints and further ideas to solve the problem.

Best regards, Sven 

Parents
  • It seems like there is an IP address added to the URL. Double check how it is constructed.

    "54.147.11.139:443" should not be in there.

  • Good evening,

    My request will be sent to the correct URL (api.nrfcloud.com/.../messages . After all, that's exactly how it already worked. The URL you gave is only included in nRF-Reply.

    Unfortunately, the problem has still not been completely solved.

    I have deactivated the interface in the past week. After reactivating the RESTApi request yesterday, it worked reliably... Today, the same error occurred as before.
    Does Nordic have any restrictions on how often the Api can be addressed by an IP?
    I send a request every 10 seconds and receive the app values of the last minute as feedback.

    If I run the identical control chain in the identical system of another VM/IP, it also works at first.

    Best regards Sven

Reply
  • Good evening,

    My request will be sent to the correct URL (api.nrfcloud.com/.../messages . After all, that's exactly how it already worked. The URL you gave is only included in nRF-Reply.

    Unfortunately, the problem has still not been completely solved.

    I have deactivated the interface in the past week. After reactivating the RESTApi request yesterday, it worked reliably... Today, the same error occurred as before.
    Does Nordic have any restrictions on how often the Api can be addressed by an IP?
    I send a request every 10 seconds and receive the app values of the last minute as feedback.

    If I run the identical control chain in the identical system of another VM/IP, it also works at first.

    Best regards Sven

Children
Related