# FetchError from nbi service

**URL:** <https://forum.genieacs.com/t/fetcherror-from-nbi-service/5360>\
**Category:** Uncategorized\
**Created:** [April 26, 2024, 8:27am UTC](https://forum.genieacs.com/t/fetcherror-from-nbi-service/5360 "2024-04-26T08:27:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gokila](https://avatars.discourse-cdn.com/v4/letter/g/e9bcb4/32.png) [@Gokila](https://forum.genieacs.com/u/Gokila)\
**Post date:** [April 26, 2024, 8:27am UTC](https://forum.genieacs.com/t/fetcherror-from-nbi-service/5360/1 "2024-04-26T08:27:56Z")

</div>

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”}}](http://nbi-svc:7557/devices/?query=%7B%22_lastInform%22:%7B%22$gte%22:%222024-04-26T03:13:02.423Z%22%7D%7D) failed, reason: read ECONNRESET” exceptionStack=“FetchError: request to [http://nbi-svc:7557/devices/?query={“\_lastInform”:{“$gte”:“2024-04-26T03:13:02.423Z”}}](http://nbi-svc:7557/devices/?query=%7B%22_lastInform%22:%7B%22$gte%22:%222024-04-26T03:13:02.423Z%22%7D%7D) 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.

---

<div class="post-metadata">

**Author:** ![Felipe](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.genieacs.com/felipe/32/1949_2.png) [@Felipe](https://forum.genieacs.com/u/Felipe)\
**Post date:** [April 26, 2024, 11:23am UTC](https://forum.genieacs.com/t/fetcherror-from-nbi-service/5360/2 "2024-04-26T11:23:28Z")

</div>

Hi @Gokila, you need to encode URL

---

<div class="post-metadata">

**Author:** ![akcoder](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.genieacs.com/akcoder/32/11_2.png) [@akcoder](https://forum.genieacs.com/u/akcoder)\
**Post date:** [April 26, 2024, 5:08pm UTC](https://forum.genieacs.com/t/fetcherror-from-nbi-service/5360/3 "2024-04-26T17:08:25Z")

</div>

You need to URL encode the query parameter:

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

```

---

<div class="post-metadata">

**Author:** ![Gokila](https://avatars.discourse-cdn.com/v4/letter/g/e9bcb4/32.png) [@Gokila](https://forum.genieacs.com/u/Gokila)\
**Post date:** [April 30, 2024, 3:26am UTC](https://forum.genieacs.com/t/fetcherror-from-nbi-service/5360/5 "2024-04-30T03:26:02Z")

</div>

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
