# Node-red stops due to InvalidAsn1Error

**URL:** <https://discourse.nodered.org/t/node-red-stops-due-to-invalidasn1error/33878>\
**Category:** General\
**Created:** [7 October 2020 11:13 UTC](https://discourse.nodered.org/t/node-red-stops-due-to-invalidasn1error/33878 "2020-10-07T11:13:26Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![CEK](https://avatars.discourse-cdn.com/v4/letter/c/e274bd/32.png) [@CEK](https://discourse.nodered.org/u/CEK)\
**Post date:** [7 October 2020 11:13 UTC](https://discourse.nodered.org/t/node-red-stops-due-to-invalidasn1error/33878/1 "2020-10-07T11:13:26Z")

</div>

Good morning! I'm new to the forum and to Node-red, it seems like a fantastic tool!  
I am from Argentina and I am trying to be understood through google translator, I apologize!

My problem is that Node Red stops with no apparent problems but throws the following errors

> _7 Oct 07:29:33 - [red] Uncaught Exception:_  
> _7 Oct 07:29:33 - InvalidAsn1Error: Expected 0x6: got 0x2_
> 
> - at InvalidAsn1Error (/home/telemetriaiiot/.node-red/node\_modules/asn1-ber/lib/ber/errors.js:4:11)\*
> - at Reader.readString (/home/telemetriaiiot/.node-red/node\_modules/asn1-ber/lib/ber/reader.js:176:9)\*
> - at Reader.readOID (/home/telemetriaiiot/.node-red/node\_modules/asn1-ber/lib/ber/reader.js:202:15)\*
> - at readVarbinds (/home/telemetriaiiot/.node-red/node\_modules/net-snmp/index.js:254:20)\*
> - at new GetResponsePdu (/home/telemetriaiiot/.node-red/node\_modules/net-snmp/index.js:430:2)\*
> - at new ResponseMessage (/home/telemetriaiiot/.node-red/node\_modules/net-snmp/index.js:537:14)\*
> - at Session.onMsg (/home/telemetriaiiot/.node-red/node\_modules/net-snmp/index.js:911:17)\*
> - at Socket.emit (events.js:315:20)\*
> - at UDP.onMessage [as onmessage] (dgram.js:910:8)\*

**It is running on UBUNTU 20.04 LTS the version of NODE.JS is 12**

I will be very grateful for your answers.

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [7 October 2020 12:24 UTC](https://discourse.nodered.org/t/node-red-stops-due-to-invalidasn1error/33878/2 "2020-10-07T12:24:52Z")

</div>

Welcome to the forum Emmanuel!  
1 - when does the error occur? Does it happen when starting node-red or when a flow starts? If it happens at startup, you can start NR using  
node-red —safe  
Then try removing nodes and deploying to find the culprit

2 - did this happen after adding a node and if so which node (full name please node-red-contrib-?????)

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [7 October 2020 12:27 UTC](https://discourse.nodered.org/t/node-red-stops-due-to-invalidasn1error/33878/3 "2020-10-07T12:27:22Z")

</div>

Looking at the stacktrace we can see its something using SNMP - does that help you narrow it down @CEK?

If you can identify which node is causing it, then it would be helpful to raise an issue against the node as it must be missing some error handling. This type of error is not one the runtime can catch for the node.

---

<div class="post-metadata">

**Author:** ![CEK](https://avatars.discourse-cdn.com/v4/letter/c/e274bd/32.png) [@CEK](https://discourse.nodered.org/u/CEK)\
**Post date:** [7 October 2020 15:05 UTC](https://discourse.nodered.org/t/node-red-stops-due-to-invalidasn1error/33878/4 "2020-10-07T15:05:28Z")

</div>

Thanks for the welcome!

The error occurs after some time running the flow, the error occurs within 5 minutes  
The weird thing is that everything was working excellent and suddenly Node-red stops and starts again, the errors are always the same.  
I see it has to do with SNMP but I don't know where the problem may be.

The SNMP node I have installed is node-red-node-snmp

---

<div class="post-metadata">

**Author:** ![CEK](https://avatars.discourse-cdn.com/v4/letter/c/e274bd/32.png) [@CEK](https://discourse.nodered.org/u/CEK)\
**Post date:** [7 October 2020 15:12 UTC](https://discourse.nodered.org/t/node-red-stops-due-to-invalidasn1error/33878/5 "2020-10-07T15:12:47Z")

</div>

Thanks for the quick reply!

I just noticed that Node-red stops after I have several time-out errors in my SNMP questions, with one or 2 time-out errors nothing happens, but if I have several errors at the same time node-red stops .

How can I pose this problem to the SNMP node?

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [7 October 2020 17:04 UTC](https://discourse.nodered.org/t/node-red-stops-due-to-invalidasn1error/33878/6 "2020-10-07T17:04:42Z")

</div>

Try adding a `catch` node connected to a `debug` on the tabs wher eyou have a `SNMP` node. I don't think it will help but lets see,

How many SNMP noes do you have and how fast are you sending messages?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [6 December 2020 17:04 UTC](https://discourse.nodered.org/t/node-red-stops-due-to-invalidasn1error/33878/7 "2020-12-06T17:04:42Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
