MQTT Aedes stops working when I add Configurable Ping (and other Ping nodes) -

Hi all,

I was hoping to use Configurable Ping to monitor several of my devices in my network. I use Aedes MQTT Broker quite a lot, and the minute I add the Ping node, the MQTT data stops working in my project. It's arriving still, as I have confirmed using MQTT Explorer.

The minute I remove the Ping node, the MQTT data resumes being displayed.

I really cannot understand what is going on

Try using the official ping node node-red-node-ping instead.

Alternatively, use a proper broker (like mosquitto or emqx)

As for "what is going on". If you are stressing Node-RED (or rather if this configurable ping is being hammered or is just a 'heavy' node) then due to the single threaded nature of NODEJS, the event loop will be starved and the MQTT connection will be unreliable due to you also running AEDES on the same NODEJS thread.

(just a theory)

Displayed where? Is it an MQTT In node or an MQTT Out node that is not working?
If it is an In node, have you confirmed, by using a debug node, whether anything is being received?

However, I second the suggestion not to use Aedes. Others have had problems with it, and really there is very little benefit to using it instead of, for example, Mosquitto. Mosquitto has much better performance, more features, is solid as a rock, and not difficult to install.

Thanks both

It's MQTT in - and nothing comes in. My MQTT data comes in once every 10 secs. I was going to use that as a trigger for the Configurable Ping (which would therefore only run once every 10 secs.

I have this running on a i5 based mini PC running Linux Mint - so there's no issue with horsepower.

When I tried the "official" ping node, it errors with an "EACCES can't run ping command" error message.

I've tried Mosquitto but Configurable Ping, when added to the Flow, stops the MQTT from processing. I have a node.status which never happens

Delete the Configurable Ping, and all good

If ping is not working then you may need to run this to allow it to be run as the user you are running as.

sudo setcap cap_net_raw=ep /bin/ping

Still getting EACCES can't run ping command :frowning:

weird - what does which ping return ? (when run from the command line)
And did you restart Node-RED after running the previous command.
Next try

 sudo chmod u+s `which ping` 

I see there are some others with ping problems on Mint... /bin/ping permissions - Linux Mint Forums

Since it's not an Aedes only issue, could you alter the title of your 1st post please.

Unfortunately I'm too late to change the title

So I've tried that, and still no joy :frowning:
championc@Solar-Pi2:~$ ls -l which ping
-rwsr-xr-x 1 root root 72776 Jan 30 2020 /usr/bin/ping

I've disconnected it now from the MQTT data and it now allows the MQTT to continue. I've connected it to a CRONPLUS every 10 secs, but I'm getting nothing in the debug window at all

And if I use the normal PING, I still get EACCES can't run ping command

so you need

sudo setcap cap_net_raw=ep /usr/bin/ping
sudo chmod u+s /usr/bin/ping

instead of the above

Did both, and rebooted too
image

image

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