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

This is what I am seeing:

===================
When 2020-12-20 14:10:13
Who ERROR_REPORT/BedPi/ERROR_REPORT/BedPi/ADSL Monitor/192.168.0.93
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:
~/.npm/_logs/......
it is stored in two flies:
node-red.log
and syslog
nodered-install.log is for install stuff.

# Node-Red install log errors, etc are in:
/var/log/nodered-install.log

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.

Thanks.

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 ...

Usage

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':\"192.168.0.1\"},\n    {'topic':'Relay Board1', 'addr':\"192.168.0.21\"},\n    {'topic':'W.I.B',    'addr':\"192.168.0.34\"},\n    {'topic':'MusicPi',  'addr': \"192.168.0.82\"}, \n    {'topic':'BedPi',    'addr': \"192.168.0.83\"}, \n    {'topic':'PiFace',   'addr': \"192.168.0.86\"},\n    {'topic':'EyeSpyPi', 'addr': \"192.168.0.89\"},\n    {'topic':'CameraPi', 'addr': \"192.168.0.91\"},\n    {'topic':'PortaPi',  'addr': \"192.168.0.92\"},\n    {'topic':'TelePi',   'addr': \"192.168.0.93\"},\n    {'topic':'BeefPi',   'addr': \"192.168.0.94\"},\n    {'topic':'TimePi',   'addr': \"192.168.0.99\"},\n    {'topic':'SG NAS',   'addr': \"192.168.0.200\"},\n    {'topic':'Thecus',   'addr': \"192.168.0.201\"},\n    {'topci':'Nas-T-Nuc',  'addr': \"192.168.0.202\"},\n    {'topic':'Beyonwiz', 'addr':\"192.168.0.211\"},\n    {'topic':'TIVX',     'addr':\"192.168.0.212\"},\n    {'topic':'Lab',      'addr':\"192.168.0.221\"},\n    {'topic':'1801 Router', 'addr':\"192.168.0.222\"},\n    {'topic':'LinkSys',  'addr':\"192.168.0.250\"},\n    {'topic':'Printer',  'addr': \"192.168.0.253\"},\n    {'topic':'Gateway',  'addr': \"192.168.0.254\"},\n    {'topic':'UpLink',  'addr': \"58.162.26.75\"},\n//    {'topic':'(E) WiFi WAP1','addr': \"192.168.1.1\"},\n//    {'topic':'Network',  'addr': \"192.168.1.2\"},\n//    {'topic':'Network',  'addr': \"192.168.1.3\"},\n//    {'topic':'Network',  'addr': \"192.168.1.4\"},\n//    {'topic':'Network',  'addr': \"192.168.1.5\"},\n//    {'topic':'Network',  'addr': \"192.168.1.6\"},\n//    {'topic':'Network',  'addr': \"192.168.1.7\"},\n//    {'topic':'Network',  'addr': \"192.168.1.8\"},\n//    {'topic':'Network',  'addr': \"192.168.1.9\"},\n//    {'topic':'Network',  'addr': \"192.168.1.10\"},\n//    {'topic':'Network',  'addr': \"192.168.1.11\"},\n//    {'topic':'Network',  'addr': \"192.168.1.12\"},\n//    {'topic':'Network',  'addr': \"192.168.1.13\"},\n//    {'topic':'Network',  'addr': \"192.168.1.14\"},\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"]]}]

image

1 Like

I'm silly.

Sorry.

I shall have to find time to implement the node.

Thanks.

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':\"192.168.0.1\"},\n    {'topic':'Relay Board1', 'host':\"192.168.0.21\"},\n    {'topic':'W.I.B',    'host':\"192.168.0.34\"},\n    {'topic':'MusicPi',  'host': \"192.168.0.82\"}, \n    {'topic':'BedPi',    'host': \"192.168.0.83\"}, \n    {'topic':'PiFace',   'host': \"192.168.0.86\"},\n    {'topic':'EyeSpyPi', 'host': \"192.168.0.89\"},\n    {'topic':'CameraPi', 'host': \"192.168.0.91\"},\n    {'topic':'PortaPi',  'host': \"192.168.0.92\"},\n    {'topic':'TelePi',   'host': \"192.168.0.93\"},\n    {'topic':'BeefPi',   'host': \"192.168.0.94\"},\n    {'topic':'TimePi',   'host': \"192.168.0.99\"},\n    {'topic':'SG NAS',   'host': \"192.168.0.200\"},\n    {'topic':'Thecus',   'host': \"192.168.0.201\"},\n    {'topci':'Nas-T-Nuc',  'host': \"192.168.0.202\"},\n    {'topic':'Beyonwiz', 'host':\"192.168.0.211\"},\n    {'topic':'TIVX',     'host':\"192.168.0.212\"},\n    {'topic':'Lab',      'host':\"192.168.0.221\"},\n    {'topic':'1801 Router', 'host':\"192.168.0.222\"},\n    {'topic':'LinkSys',  'host':\"192.168.0.250\"},\n    {'topic':'Printer',  'host': \"192.168.0.253\"},\n    {'topic':'Gateway',  'host': \"192.168.0.254\"},\n    {'topic':'UpLink',  'host': \"58.162.26.75\"},\n//    {'topic':'(E) WiFi WAP1','host': \"192.168.1.1\"},\n//    {'topic':'Network',  'host': \"192.168.1.2\"},\n//    {'topic':'Network',  'host': \"192.168.1.3\"},\n//    {'topic':'Network',  'host': \"192.168.1.4\"},\n//    {'topic':'Network',  'host': \"192.168.1.5\"},\n//    {'topic':'Network',  'host': \"192.168.1.6\"},\n//    {'topic':'Network',  'host': \"192.168.1.7\"},\n//    {'topic':'Network',  'host': \"192.168.1.8\"},\n//    {'topic':'Network',  'host': \"192.168.1.9\"},\n//    {'topic':'Network',  'host': \"192.168.1.10\"},\n//    {'topic':'Network',  'host': \"192.168.1.11\"},\n//    {'topic':'Network',  'host': \"192.168.1.12\"},\n//    {'topic':'Network',  'host': \"192.168.1.13\"},\n//    {'topic':'Network',  'host': \"192.168.1.14\"},\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.

What??!!*

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

ARGH!

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

So if I am sending something like:

{"name":"test","payload":"192.168.0.1"}

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

Flow:

[{"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': \"192.168.0.254\"},\n    {'topic':'UpLink',  'addr': \"58.162.26.75\"},\n    {'topic':'test',    'addr': \"192.168.0.1\"},\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.

Message:

{"payload":9.14,"topic":"58.162.26.75","_msgid":"b9d4a39d.f0fa5"}

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

image

If you change function to send an array...

image

you will get this...