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 Reply
  • I have tested the request again without node red via curl command from our servers.


    From our application server I get the incorrect response:
    $ curl api.nrfcloud.com/.../messages -H "Authorisation: Bearer XXXUSERCODEXXX"
    curl: (7) Failed to connect to api.nrfcloud.com port 443: Connection timed out.

    From our dev server with a different IP, the request works fine:

    $ curl api.nrfcloud.com/.../messages -H "Authorization: Bearer XXXUSERCODEXXX"
    {"message": "Access Denied", "code":40100}

    $ curl api.nrfcloud.com/.../messages -H "Authorization: Bearer XXXUSERCODEXXX"
    {"items":[{"topic":"prod/XXIDXX/m/d/nrf-DEVICENAME/d2c","deviceId":"nrf-XXXDEVICEXXX","receivedAt":"2022-03-28T10:12:25.087Z","message":{"data":"29. 644000","messageType":"DATA","appId":"HUMID","time":1648462269004},"tenantId":"XXXIDXXX"}],"total": 8574, "pageNextToken": "XXNEXTTOKENXX="}

    It seems that our server IP is blocked by nordic because of too many requests. I would be happy to share the IP with you via a non-public channel.

Children
Related