FetchError from nbi service

Hi ,

In geneiacs project, we are receiving below error from recently.

024-04-26T03:43:09.954Z [ERROR] Uncaught exception; pid=343087 exceptionName=“FetchError” exceptionMessage=“request to http://nbi-svc:7557/devices/?query={“_lastInform”:{“$gte”:“2024-04-26T03:13:02.423Z”}} failed, reason: read ECONNRESET” exceptionStack=“FetchError: request to http://nbi-svc:7557/devices/?query={“_lastInform”:{“$gte”:“2024-04-26T03:13:02.423Z”}} failed, reason: read ECONNRESET\n at ClientRequest. (/opt/acs-server/node_modules/node-fetch/lib/index.js:1501:11)\n at ClientRequest.emit (node:events:537:28)\n at Socket.socketErrorListener (node:_http_client:465:9)\n at Socket.emit (node:events:537:28)\n at emitErrorNT (node:internal/streams/destroy:151:8)\n at emitErrorCloseNT (node:internal/streams/destroy:116:3)\n at process.processTicksAndRejections (node:internal/process/task_queues:82:21)”

Error from DB:

{“t”:{“$date”:“2024-04-25T09:17:56.013+00:00”},“s”:“I”, “c”:“NETWORK”, “id”:22989, “ctx”:“conn1247179”,“msg”:“Error sending response to client. Ending connection from remote”,“attr”:{“error”:{“code”:6,“codeName”:“HostUnreachable”,“errmsg”:“Connection reset by peer”},“remote”:“[240b:c020:204:54ca:b464:2:0:56d0]:39910”,“connectionId”:1247179}}

Can anyone help me to understand what is the cause of this issue and how to solve this.

Hi @Gokila, you need to encode URL

You need to URL encode the query parameter:

http://nbi-svc:7557/devices/?query=%7B%22_lastInform%22:%7B%22$gte%22:%222024-04-26T03:13:02.423Z%22%7D%7D

Hi @Felipe @akcoder

URL was encoded and it was working from last 2 years. we are suddenly receiving this error from last week. We are also seen NBI and CWMP workers are died many times.

Receiving below error from monogodb.

“id”:20883, “ctx”:“conn1733566”,“msg”:“Interrupted operation as its client disconnected”,“attr”:{“opId”:3695752520}}

Is there any way to increase timeout for nbi requests