My desktops Ethernet connection to the network stops working after using MQTT on the network. Wifi does work
We have a system to control our window blinds using MQTT, where a wall switch is connected to an Arduino, which sends an MQTT message to our Mosquitto server that runs under Home Assistant. Home Assistant sends back which position the shutter should be in and the Arduino activates the shutter.
When this happens, my Ethernet connection still says it’s connected, but I can’t do anything network related anymore. I used nmcli m to monitor what happens, but there is no entry when this happens. If I turn off the Ethernet and turn it back on, I get the following:
These messages repeat every minute or so. Sometimes the Ethernet just works after a certain time, sometimes I can get these messages for hours on end. Rebooting fixes the issue and I can use Ethernet again.
No other device on my network seems to have this problem, so I have no idea how to fix this.
My PC has a Gigabyte X570 Aorus Master motherboard with Ethernet controller: Intel Corporation Ethernet Controller I225-V (rev 01)
Here is the MQTT traffic that happens when a shutter is opened using the switch:
Thank you for the tip about formatting.
The router is on the latest firmware and has been rebooted several times since the problem has started so I’m not certain it is the cause.
I’ve had the issue just after booting my pc. This is the log filtered for the word ‘network’ from boot to the problem happening. I don’t see any immediate errors.
This is the configured MTU size for my PC:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
2: enp7s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
3: wlp6s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
The problem only happens on enp7s0, the wired connection. In the past I only had that one connected, so when this problem happened I just wouldn’t have internet. Later I added the antennas for wireless and now I switch to that when the wired connection fails. If I disable the wireless connection, the problem still happens.
I’ve included logs filtered for dhcp and NetworkManager
09:11:20 NetworkManager: <info> [1726989080.5814] dhcp4 (enp7s0): state changed no lease
09:11:20 NetworkManager: <info> [1726989080.5814] dhcp4 (enp7s0): state changed no lease
09:11:20 NetworkManager: <info> [1726989080.5814] dhcp4 (enp7s0): activation: beginning transaction (timeout in 45 seconds)
09:11:20 NetworkManager: <info> [1726989080.5813] dhcp4 (enp7s0): canceled DHCP transaction
08:48:47 blueman-applet: blueman-applet 08.48.47 WARNING PluginManager:150 __load_plugin: Not loading DhcpClient because its conflict has higher priority
08:48:38 NetworkManager: <info> [1726987718.4846] dhcp4 (wlp6s0): state changed new lease, address=192.168.1.92
08:48:38 NetworkManager: <info> [1726987718.4846] dhcp4 (wlp6s0): state changed new lease, address=192.168.1.92
08:48:38 NetworkManager: <info> [1726987718.3461] dhcp4 (wlp6s0): state changed new lease, address=192.168.1.92, acd pending
08:48:38 NetworkManager: <info> [1726987718.2975] dhcp4 (wlp6s0): activation: beginning transaction (timeout in 45 seconds)
08:48:36 NetworkManager: <info> [1726987716.6286] dhcp4 (enp7s0): state changed new lease, address=192.168.1.27
08:48:36 NetworkManager: <info> [1726987716.5016] dhcp4 (enp7s0): state changed new lease, address=192.168.1.27, acd pending
08:48:36 NetworkManager: <info> [1726987716.4990] dhcp4 (enp7s0): activation: beginning transaction (timeout in 45 seconds)
08:48:33 NetworkManager: <info> [1726987713.8379] dhcp: init: Using DHCP client 'internal'
Yeah, I have no clue why this keeps happening. It happened less last week, but now it keeps disconnecting again while nothing changed in our network. IP lease on my router is set to the default of one day.
Do you have any idea what else I could try to fix this?
Make sure that the date and time are correct on router and your systems.
Also that you have network time setup to keep it correct.
Maybe the lease is dropped becuase of an issue with time keeping?
Date and time are correct on both the system and the router. Router is using pool.ntp.org as ntp server and my system is using 2.fedora.pool.ntp.org with chronyd. When comparing their clocks, there’s about a 5 second difference that I can see. Would it be worth trying to change them to the same ntp pool?
I also looked into the logs of my router and there’s nothing unusual happening around the time my connection drops.