`ping` node error. Can someone make sense of it?

This is what I am seeing:

When 2020-12-20 14:10:13
Where 2f482da9.038802
What Error: spawn EIO

Node: node-red-contrib-advanced-ping 1.2.0

It just CRASHED and the log file is 63150 size and is mostly that error from today.
I did a cat on the file and there were a few, but only a few pages down it was today's date.

So something died badly.

Is this thing (what ever it is/was) common?

What error are you seeing in the node red log when it crashes?

Oh. :frowning:

It was on a remote machine and looking at /var/log/syslog there isn't much to be seen at the time shown which gets my attention.

There are things I need to check. But not specifically for that.

I can't find a specific node-red logs.

This is where I am looking:

#  Most logs are:
NR logs are in /var/log/
#  also NPM logs are in:
it is stored in two flies:
and syslog
nodered-install.log is for install stuff.

# Node-Red install log errors, etc are in:

First place: nothing from node-red except install logs.

~/.npm/_logs/..... Nothing exciting either.

The machine just kind of fell over and started spitting out errors at a fairly fast speed.
(Though I have code to stop runaway errors and that wasn't activated.)

That node hasn't had an update in 6 years and the author stated on October 25 (in an issue on GitHub)
Hi, unfortunately I'm not actively maintaining this....

You might want to reassess your use of this node...

1 Like

Yeah. I may.


What is wrong with node-red-node-ping maintained by node-red guys?

It doesn't support an input array for multiple IP addresses.... Or it didn't which is why I used the other one.

From the readme ...


Pings 1 or more devices` .

Built in help...

Ok, maybe my bad.

But can the IP numbers be sent in a message as an array?

In a message something like (or exactly like - from the now working code)

[{"id":"1b940e01.2b39fa","type":"function","z":"c636aa5a.cc34","name":"check list","func":"var checks = [\n    {'topic':'Blacksheep', 'addr':\"\"},\n    {'topic':'Relay Board1', 'addr':\"\"},\n    {'topic':'W.I.B',    'addr':\"\"},\n    {'topic':'MusicPi',  'addr': \"\"}, \n    {'topic':'BedPi',    'addr': \"\"}, \n    {'topic':'PiFace',   'addr': \"\"},\n    {'topic':'EyeSpyPi', 'addr': \"\"},\n    {'topic':'CameraPi', 'addr': \"\"},\n    {'topic':'PortaPi',  'addr': \"\"},\n    {'topic':'TelePi',   'addr': \"\"},\n    {'topic':'BeefPi',   'addr': \"\"},\n    {'topic':'TimePi',   'addr': \"\"},\n    {'topic':'SG NAS',   'addr': \"\"},\n    {'topic':'Thecus',   'addr': \"\"},\n    {'topci':'Nas-T-Nuc',  'addr': \"\"},\n    {'topic':'Beyonwiz', 'addr':\"\"},\n    {'topic':'TIVX',     'addr':\"\"},\n    {'topic':'Lab',      'addr':\"\"},\n    {'topic':'1801 Router', 'addr':\"\"},\n    {'topic':'LinkSys',  'addr':\"\"},\n    {'topic':'Printer',  'addr': \"\"},\n    {'topic':'Gateway',  'addr': \"\"},\n    {'topic':'UpLink',  'addr': \"\"},\n//    {'topic':'(E) WiFi WAP1','addr': \"\"},\n//    {'topic':'Network',  'addr': \"\"},\n//    {'topic':'Network',  'addr': \"\"},\n//    {'topic':'Network',  'addr': \"\"},\n//    {'topic':'Network',  'addr': \"\"},\n//    {'topic':'Network',  'addr': \"\"},\n//    {'topic':'Network',  'addr': \"\"},\n//    {'topic':'Network',  'addr': \"\"},\n//    {'topic':'Network',  'addr': \"\"},\n//    {'topic':'Network',  'addr': \"\"},\n//    {'topic':'Network',  'addr': \"\"},\n//    {'topic':'Network',  'addr': \"\"},\n//    {'topic':'Network',  'addr': \"\"},\n//    {'topic':'Network',  'addr': \"\"},\n];\n\nfor ( var i in checks ) {\n    node.send({\n        \"topic\" : checks[i].topic,\n        \"host\"  : checks[i].addr,\n    });\n}","outputs":1,"noerr":0,"x":220.55557250976562,"y":509.9999694824219,"wires":[["4c92b542.a0e02c","26861d2d.06802a"]]}]


1 Like

I'm silly.


I shall have to find time to implement the node.


Errr..... Where is the input to the node?

Screenshot from 2020-12-20 20-58-14

Not really that difficult....

[{"id":"4fb38373.f11a3c","type":"ping","z":"5e6c8b.7f38b374","mode":"triggered","name":"","host":"","timer":"20","inputs":1,"x":514,"y":672,"wires":[["154bbc1c.57c624","15fe188d.f15fa7"]]},{"id":"1b940e01.2b39fa","type":"function","z":"5e6c8b.7f38b374","name":"check list","func":"var checks = [\n    {'topic':'Blacksheep', 'host':\"\"},\n    {'topic':'Relay Board1', 'host':\"\"},\n    {'topic':'W.I.B',    'host':\"\"},\n    {'topic':'MusicPi',  'host': \"\"}, \n    {'topic':'BedPi',    'host': \"\"}, \n    {'topic':'PiFace',   'host': \"\"},\n    {'topic':'EyeSpyPi', 'host': \"\"},\n    {'topic':'CameraPi', 'host': \"\"},\n    {'topic':'PortaPi',  'host': \"\"},\n    {'topic':'TelePi',   'host': \"\"},\n    {'topic':'BeefPi',   'host': \"\"},\n    {'topic':'TimePi',   'host': \"\"},\n    {'topic':'SG NAS',   'host': \"\"},\n    {'topic':'Thecus',   'host': \"\"},\n    {'topci':'Nas-T-Nuc',  'host': \"\"},\n    {'topic':'Beyonwiz', 'host':\"\"},\n    {'topic':'TIVX',     'host':\"\"},\n    {'topic':'Lab',      'host':\"\"},\n    {'topic':'1801 Router', 'host':\"\"},\n    {'topic':'LinkSys',  'host':\"\"},\n    {'topic':'Printer',  'host': \"\"},\n    {'topic':'Gateway',  'host': \"\"},\n    {'topic':'UpLink',  'host': \"\"},\n//    {'topic':'(E) WiFi WAP1','host': \"\"},\n//    {'topic':'Network',  'host': \"\"},\n//    {'topic':'Network',  'host': \"\"},\n//    {'topic':'Network',  'host': \"\"},\n//    {'topic':'Network',  'host': \"\"},\n//    {'topic':'Network',  'host': \"\"},\n//    {'topic':'Network',  'host': \"\"},\n//    {'topic':'Network',  'host': \"\"},\n//    {'topic':'Network',  'host': \"\"},\n//    {'topic':'Network',  'host': \"\"},\n//    {'topic':'Network',  'host': \"\"},\n//    {'topic':'Network',  'host': \"\"},\n//    {'topic':'Network',  'host': \"\"},\n//    {'topic':'Network',  'host': \"\"},\n];\nmsg.payload = checks\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":364,"y":672,"wires":[["4fb38373.f11a3c"]]},{"id":"4808f716.c062a8","type":"inject","z":"5e6c8b.7f38b374","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":202,"y":672,"wires":[["1b940e01.2b39fa"]]},{"id":"dbc2b2c6.a08fe","type":"debug","z":"5e6c8b.7f38b374","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":994,"y":672,"wires":[]},{"id":"154bbc1c.57c624","type":"change","z":"5e6c8b.7f38b374","name":"","rules":[{"t":"set","p":"ping.result","pt":"msg","to":"payload","tot":"msg"},{"t":"set","p":"payload","pt":"msg","to":"ping","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":688,"y":672,"wires":[["6db7371b.e0cc98"]]},{"id":"6db7371b.e0cc98","type":"join","z":"5e6c8b.7f38b374","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"6","count":"23","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":850,"y":672,"wires":[["dbc2b2c6.a08fe"]]},{"id":"15fe188d.f15fa7","type":"debug","z":"5e6c8b.7f38b374","name":"","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"true","targetType":"full","statusVal":"ping","statusType":"msg","x":658,"y":720,"wires":[]}]

Set to triggered mode as I highlighted in the first screenshot.

1 Like

It isn't my day is it?

1 Like

Im guessing you are tired Andrew :wink:

You'll get there.

(and alas, the machine keeps hanging and I have to reboot every 5 minutes)

Thanks Steve.

Ok, here's an update.

Yes, the ping node has had a lot of work done to it and I haven't been keeping up with it.

I started modifying my flows to use the standard ping node and things weren't working as expected.


Hmmm.... thinking and looking more closely at the messages.


The ping node strips away any extra stuff on a message.

So if I am sending something like:


The name isn't getting through.

So it is one step forward, one backward.

I am now stuck between a rock and a hard place as this is used on all/most of my machines and is used to monitor network connectivity.

I'll put this (with slight editing) in the feature request section too.

The full object payload is passed through if you send an array.

The options according to help is "String" or "Array" (object is not an expected format)

That is interesting.

I am sure I tried that.

Not that specifically, but but I did look at the outbound messages from the ping node and didn't notice that extra thing.

I get that I am really not doing a good job of reading instructions. (But I'm male and this is supposedly the norm' for this to happen.

I guess I really need to get rid of some of these other things which are stressing me out.

Ok, this is interesting.

NR 1.2.6.
ping node: 0.2.2


[{"id":"3b687c80.466ac4","type":"inject","z":"ed217a75.2f6d9","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":760,"y":300,"wires":[["b77c0b6e.acbbf8"]]},{"id":"b77c0b6e.acbbf8","type":"function","z":"ed217a75.2f6d9","name":"check list","func":"var checks = [\n    {'topic':'Gateway', 'addr': \"\"},\n    {'topic':'UpLink',  'addr': \"\"},\n    {'topic':'test',    'addr': \"\"},\n];\n\nfor ( var i in checks ) {\n//    node.send({\n//        \"topic\" : checks[i].topic,\n//        \"host\"  : checks[i].addr,\n//    });\n    node.send({\n        \"name\" : checks[i].topic,\n        \"payload\"  : checks[i].addr,\n//        \"host\"  : checks[i].addr,\n    });\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","x":922,"y":300,"wires":[["3f675785.42c09","b2cdfa45.62864"]]},{"id":"3f675785.42c09","type":"ping","z":"ed217a75.2f6d9","mode":"triggered","name":"","host":"","timer":"20","inputs":1,"x":1072,"y":300,"wires":[["27d43f77.7e7e9","effb28cc.7e1c5"]]},{"id":"27d43f77.7e7e9","type":"debug","z":"ed217a75.2f6d9","name":"Out","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1212,"y":230,"wires":[]}]

I don't see a .ping on the message.



This is what I see on the screen.

As the built in help says "string" or "array"

Under the "array" mode, additional properties are sent back to you in msg.ping


If you change function to send an array...


you will get this...