Issue „Can't start hassio_observer:...“„

Hi @all,

can anyone help me with this issue… HA is not reachable .

Pi3
Home Assistant OS 5.10
core-2021.1.5
supervisor-2021.01.7


21-01-31 06:48:01 WARNING (MainThread) [supervisor.misc.tasks] Watchdog/Docker found a problem with observer plugin!
21-01-31 06:48:01 INFO (MainThread) [supervisor.plugins.observer] Starting observer plugin
21-01-31 06:48:01 INFO (SyncWorker_3) [supervisor.docker.interface] Cleaning hassio_observer application
21-01-31 06:48:02 WARNING (SyncWorker_3) [supervisor.docker] Can't attach hassio_observer to hassio-network!
21-01-31 06:48:03 ERROR (SyncWorker_3) [supervisor.docker] Can't start hassio_observer: 500 Server Error for http+docker://localhost/v1.40/containers/10288dcc08e49657d7944301482decf0356144cf33dd658c2fb21b6f58a11b46/start: Internal Server Error ("driver failed programming external connectivity on endpoint hassio_observer (dab38835300c62039b2745c0d003cf61df9c21b4a2ba0e32a9f13a5229cc9ac1): Bind for 0.0.0.0:4357 failed: port is already allocated")
21-01-31 06:48:03 ERROR (MainThread) [supervisor.plugins.observer] Can't start observer plugin
21-01-31 06:48:03 ERROR (MainThread) [supervisor.misc.tasks] Observer watchdog reanimation failed!
21-01-31 06:49:03 WARNING (MainThread) [supervisor.misc.tasks] Watchdog/Docker found a problem with observer plugin!
21-01-31 06:49:03 INFO (MainThread) [supervisor.plugins.observer] Starting observer plugin
21-01-31 06:49:03 INFO (SyncWorker_3) [supervisor.docker.interface] Cleaning hassio_observer application
21-01-31 06:49:04 WARNING (SyncWorker_3) [supervisor.docker] Can't attach hassio_observer to hassio-network!

Connect via SSH and issue the following command:

ha supervisor repair

If that does not help, try this:

ha core rebuild
3 Likes

Thx , I will try an give response.

Something on your host is already using a required network port. Check with netstat -tulpen as root user on the host, which process has bound to this port.

2 Likes

I will check :+1: THX for helping me !

Look good !

Indeed. And not a single docker-proxy process, so I’ll assume that you did run netstat while HA was stopped. Which makes me think that HA OS is causing trouble during startup, but as I don’t use HA OS, I am unable to provide further help.

ok , which OS I should use?

I was having these issues as well using HassOS 5.12 in a Proxmox VM and running the latest supervisor (2021.03.6) and core (2021.4.3).

I did the following and it seems to have resolved this error:

stopped HA - Configuration>Server Controls>Server Management>stop

logged in through SSH to my HA VM on the Proxmox server and ran the following commands:

sudo netstat -tnlp | grep :4357 - it showed a tcp6 process listening on this port

sudo fuser -k tcp/4357 - killed that process that was listening

started HA by running ‘ha core start’ and ran ‘ha supervisor repair’ from SSH terminal and once that had finished, I restarted the HA server - Configuration>Server Controls>Server Management> restart

and when the server came back up, the errors in the original post were gone from the supervisor logs - Supervisor>System controls>Log Provider - supervisor and so far have not come back after several server restarts.

are they still gone?

This worked for me, but just for a few hours. After a while the errors appeared again.

I started having this after changing RPi IP address to another one on the same network.

Any clue on this?

Thanks,
HS

Hi!

Thanks for shedding some light. Is it still OK for you?

In my case (RPi), the command sudo netstat -tnlp | grep :4357, gives this output:
tcp6 0 0 :::4357 :::* LISTEN -

So something is definitely listening (although there is no PID).

For fuser, when I run it gives me this error:

~ $ fuser -k tcp 4357
fuser: can't stat 'tcp': No such file or directory

After some digging I found that in this format it gives no error but still does not close the process that keeps listening still:
‘~ $ sudo fuser -k 4357/tcp’

Any other ideas on this?

Kind regards

Sorry, can’t believe I missed the slash and the sudo part of the command.

This happened on my server as well.

After 20 minutes or so of me running the ‘sudo netstat -tnlp | grep :4357’ and getting responses saying that something was listening on that port but with no PID.

I decided to go ahead anyway and run ‘ha core start’ and then ‘ha supervisor repair’.

The repair took ages to run, so I just left it and came back to it after 45 minutes or so. The server was running with no error’s in the Supervisor log.

Since, repairing my HA supervisor I have rebooted a lot with updates etc, and these error’s have not returned.

I’m not sure why the errors have come back on your server. The only thing I can think of is did you did stop the HA server before you killed the process?

Periodically it also happens to me when I update the Observer, I fix it with a restart of docker: “sudo systemctl restart docker” however I have disabled IPV6 on docker and on my Debian host, let’s see if it will do it again.