ENOENT ping command not found


I have installed the ping contrib on my PLC running node red with the palette.
I get an error, even if the contrib is really installed.

ENOENT ping command not found

What can it be?


And did you really restart node-red ?


Yes, I really rebooted my PLC.
I wrote 'really' because the ping node appears correctly in the list of the nodes, and I got a retunr message after install that he node was added.


Have you noted the limitations? Do any of them apply to your platform?

This node actually spawns a system command "ping" so if your OS doesn't have that command available, it wont work.


As pointed out the underlying operating system needs to have a ping command available. If not there by default it may be possible to install one.



The ping work fine in the command line.

It also worked fine when nodered was started a riot. But if I start it as admin, it tells me that ping command is not found.

Envoyé de mon iPhone


Well, for starters, it isn't recommended to run Node-RED (or much else for that matter) as admin/root unless you absolutely have to. There are few, if any reasons to do so with Node-RED.

This is absolutely why ping is failing since the command shell that is spawned won't have the right settings such as paths.


My $PAT is actually like this :slight_smile
/opt/plcnext/appshome/data/60002172000051/bin:/opt/plcnext/apps/60002172000051/o pt/node-v10.15.3-linux-armv7l/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/ usr/sbin:/sbin:/opt/plcnext/appshome/bin
what would be missing so that the generated shell car run the command PING?

PING is a native function, so, what would be the reason why it is not accessible by any user?


Is it? It certainly isn't part of BASH. On my Windows Linux Subsystem (Ubuntu), it resides as a binary command:

$ whereis ping
ping: /bin/ping /usr/share/man/man8/ping.8.gz
$ ls -la /bin/ping
-rwxr-xr-x 1 root root 63K Mar  9  2017 /bin/ping*

I would run some other commands from the exec node to identify what you are actually getting from whatever environment exec is inheriting.


Following up on @TotallyInformation's comment, I would run the following commands, first from the command line then from the exec node.

$ echo $PATH
$ whoami
$ which ping

Any differences should give you a clue. You mention using node-red-node-ping but haven't said whether the ping command works from the exec node.

1 Like