Port 8123 crashing or closing - every 2-3 weeks

Hi,

I have an issue where on a periodically basis of every 2-3 weeks, I’ll be unable to connect to HA on port 8123, yet the RPi is still responding and HA supervisor is still fine (via HA Banner) and Port 4537 is still available. I’m not able to connect locally or via my HA Cloud account

I’ve tried lots of things to try and find the cause;

  1. Confirmed which ports are listening using sudo sof -nP -iTCP -sTCP:LISTEN
    When everything is working as expected I can see
    python3 5074 root 10u IPv4 22223 0t0 TCP *:8123 (LISTEN) and this isn’t there when the port closes, so is python crashing?

  2. Within the HA logs I can see, but nothing else
    2024-10-24 19:28:45.108 ERROR (MainThread) [async_upnp_client.ssdp] Received error: [Errno 99] Address not available, transport: <_SelectorDatagramTransport fd=76 read=polling write=<idle, bufsize=0>>, socket: <asyncio.TransportSocket fd=76, family=10, type=2, proto=0, laddr=(‘::’, 55981, 0, 0)>

  3. I’ve checked the HA network info using sudo ha network info and this looks the same when it is and isn’t working

When it fails i’ve tried ha core check, ha core reboot, ha supervisor restart and all don’t resolve the problem. The only way I can bring the port back online is to reboot the RPi

I’m using HA version 2024.10.2

Hopefully someone can point me in the direction of something to check?

thanks
Paul

Hi paulhollands,

This sounds ro me like one of these with the most likely first:

  1. Power supply problem
  2. Low memory on the PI
  3. SD card.

I would start there.

Thats a good call on the power supply suggestion. I’m using a PoE hat to power the PI, so will switch to a plug-in PSU and see if that alleviates the problem.

Thanks

It sounds like HA is crashing and the watchdog is restarting it, but the port is still bound to the old process.
A memory leak could also be the cause of this.