Publisher don't listen
-
Hello,
I try to setup a Modbus publisher and I have some issues.
There is no socket on 502 port after starting publisherma.log
INFO 2022-08-30T09:02:17,069 (com.serotonin.m2m2.rt.RuntimeManagerImpl.stopPublisher:606) - Publisher (name=Balances, id=2, type=ModbusIpPublisherRT) stopped in 17ms INFO 2022-08-30T09:02:22,962 (com.serotonin.m2m2.rt.PublishedPointGroupInitializer.initialize:24) - Initializing 12 published points in 2 threads INFO 2022-08-30T09:02:22,963 (com.serotonin.m2m2.rt.PublishedPointGroupInitializer.processItem:48) - Initializing group 0 of 12 published points INFO 2022-08-30T09:02:22,966 (com.serotonin.m2m2.rt.PublishedPointGroupInitializer.processItem:66) - Group 0 successfully initialized 12 of 12 published points in 3 ms INFO 2022-08-30T09:02:22,967 (com.serotonin.m2m2.rt.PublishedPointGroupInitializer.initialize:38) - Initialization of 12 published points in 2 threads took 5 ms INFO 2022-08-30T09:02:22,968 (com.serotonin.m2m2.rt.RuntimeManagerImpl.startPublisher:584) - Publisher (name=Balances, id=2, type=ModbusIpPublisherRT) took 25ms to start
netstat -ln
root@radix:~# netstat -ln Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN tcp6 0 0 :::8080 :::* LISTEN tcp6 0 0 :::22 :::* LISTEN tcp6 0 0 :::8443 :::* LISTEN udp 0 0 127.0.0.53:53 0.0.0.0:* udp 0 0 192.168.253.111:68 0.0.0.0:* raw6 0 0 :::58 :::* 7
-
@Jérôme-Girard if you're using a non root user you'll need to configure linux to allow non root users to use sub 1024 ports.
namely
sudo sysctl net.ipv4.ip_unprivileged_port_start=502
and
sudo nano /etc/sysctl.conf
then set
net.ipv4.ip_forward=1
That should enable you to fire the publisher up on 502
Fox
-
Thanks a lot.
As a workaround, I had changed the listen port to 30502.
But your solution is more elegant.Jérôme
-
@Jérôme-Girard pas de problème