MODBUS TCP Server: No binding to IPv4 address

For the past four to six weeks, my Home Assistant has been losing connection to the VENUS OS MODBUS TCP server. At first, I thought it was due to the Victron add-on for Home Assistant, but today I discovered that the Venus OS MODBUS TCP server is the culprit. I’m using the latest beta version of Venus OS. My hardware is a Raspberry Pi, but I think the problem can also be reproduced on Cerbo.

The problem is, that MODBUS TCP Server is listening only at IPV6 address:

root@venusos:~# netstat -tuln | grep 502
tcp        0      0 :::502                  :::*                    LISTEN

The look into LOG of MODBUS TCP Server says, it is binding at 0.0.0.0:502:

but that is a lie, if you have both IPV4 and IPV6 in your system:

Since IPV6 implementation under VENUSOS is buggy in general (I describe it later, why), I tried disabling IPv6 complettely using /u-boot/cmdline.txt:

Screenshot 2025-12-07 204833

After reboot IPv6 is really deactivated and MODBUS TCP Server is binding correctly at 0.0.0.0:502:

and I “see” the MODBUS TCP (here from my PC using Modbus Testprogramm)

(My previous tests without “disable IPv6” showed errors here)

BUT

as you can see netstat generates errors and Webserver with GUI (both, V1 and V2) does not start!

Therefore unfortunately deactivation of IPv6 in general is a bad idea…

Now to further problems with IPv6. The avahi service is enabled under Venus OS. If this service is enabled, i can not update the system, if DNS for an external server points to a IPv6 address. The workaround for this behaviour in my case is:

update-rc.d avahi-autoipd disable
update-rc.d avahi-daemon disable
service avahi-autoipd stop
service avahi-daemon stop

Unfortunately, I have to run these commands again after every update.

But back to the MODBUS TCP Server…

I don’t know the exact time and version since the described behavior with the MODBUS TCP server occurred, but I saw in the changelog that work was being done on both the MODBUS TCP server and the IPv6 implementation in the last betas.

Can anyone reproduce this behaviour?
Does anyone know a better workaround for disabling IPv6 than using cmdline.txt?