Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker watchdog restarting evcc #61

Closed
eckerse opened this issue Apr 13, 2023 · 10 comments
Closed

docker watchdog restarting evcc #61

eckerse opened this issue Apr 13, 2023 · 10 comments

Comments

@eckerse
Copy link

eckerse commented Apr 13, 2023

I got the problem that evcc addon is restarting every 3 minutes. Before it was working without issues.
I found out that supervisor is restarting the addon: [supervisor.addons.addon] Watchdog found addon evcc is unhealthy, restarting...

When I use a browser to go to http://IP:7070/api/health I get OK

But when I run

docker exec addon_..._evcc sh -c "/usr/local/bin/evcc -c /config/evcc.yaml health"
...
[main  ] ERROR  _timestamp_ health check failed

I'm not experienced enough for docker if this above command is correct, but I think this is executed considering the Dockerfile.

Is there anything I can do to debug this further?
For now I deactivated the watchdog and evcc addon is working fine.

@neujbit
Copy link

neujbit commented Apr 14, 2023

Here the same,the watchdog restarts evcc.
WARNING (MainThread) [supervisor.addons.addon] Watchdog found addon evcc is unhealthy, restarting...
when i disable the watchdog and evcc running fine.

@andig
Copy link
Member

andig commented Apr 14, 2023

Watchdog found addon evcc is unhealthy

Whoah! Könnte das an evcc-io/evcc#7152 liegen? Es sieht aus als wäre das health Kommando kaputt- wird dieses von HA verwendet? Wie stellt HA fest, ob der (Container)evcc healthy ist?

Danke @neujbit @eckerse für die relevanten Informationen.

@goebelmeier
Copy link
Contributor

goebelmeier commented Apr 14, 2023

@andig es ist kein isoliertes HA Problem, es ist ein Docker Healthcheck Problem. Ist der HA Watchdog aus wird der Healtcheck ignoriert, ist der Watchdog an wird der Healthcheck jede Minute ausgeführt und fällt er drei Mal auf die Nase der Container gekillt.

Der HA Watchdog ist eigentlich relativ stumpf, er checkt einfach ob der Container in Docker FAILED, STOPPED oder UNHEALTHY ist und startet ihn dann neu.

Das Ding ist, dass evcc health ohne Config Angabe schon seit immer stirbt wahrscheinlich, aber seit 0.116.0 stirbt es anders :-)

➜  ~ docker run evcc/evcc:0.115.0 evcc health
[main  ] INFO 2023/04/14 21:01:35 evcc 0.115.0
[main  ] ERROR 2023/04/14 21:01:35 health check failed
➜  ~ docker run evcc/evcc:latest evcc health
Status: Downloaded newer image for evcc/evcc:latest
[main  ] INFO 2023/04/14 21:01:28 evcc 0.116.0
[main  ] FATAL 2023/04/14 21:01:28 Config File "evcc" Not Found in "[/root /app /etc]"

Allerdings ist der Return Code in beiden Fällen 1, also Fehler, statt 0 OK. Ich bin noch etwas lost woran das liegen sollte.

Der Healthcheck den der Container ausführt ist https://github.com/evcc-io/evcc/blob/4408343806dde73c7e2f1b6dad0b0f15d3bb945b/Dockerfile#L93

@StefanSchoof
Copy link

Ich denke nicht das du den health command ohne einzelnen aufrufen kannst und das ein Erfolg sein wird. Es läuft ja kein evcc in dem Container.

@andig
Copy link
Member

andig commented Apr 14, 2023

So isses. Das musst du mit exec gegen laufenden Container testen.

@andig
Copy link
Member

andig commented Apr 14, 2023

Problem ist, dass das health Kommando mit #7152 den Port braucht um den Healthstatus abzufragen. Den kennt es aber nicht :/ Kurzfristig wäre es wohl am besten #7152 wieder raus zu werfen bis wir eine bessere Idee haben.

@andig
Copy link
Member

andig commented Apr 14, 2023

docker run -it --name foo evcc/evcc:0.115.0

docker exec -it foo evcc health
[main  ] INFO 2023/04/14 21:47:36 evcc 0.115.0
[main  ] INFO 2023/04/14 21:47:36 health check ok

aber

docker run -it --name foo2 evcc/evcc:0.116.0

docker exec -it foo2 evcc health
[main  ] INFO 2023/04/14 21:48:52 evcc 0.116.0
[main  ] FATAL 2023/04/14 21:48:52 Config File "evcc" Not Found in "[/root /app /etc]"

Update nvm, das liegt daran, dass demo kein Configfile hat.

@andig
Copy link
Member

andig commented Apr 14, 2023

Release in 15 minutes. #7152 has been rolled back.

@eckerse
Copy link
Author

eckerse commented Apr 14, 2023

Mit 0.116.1 gibt es keine ungewollten Neustarts durch den Watchdog mehr.

@neujbit
Copy link

neujbit commented Apr 15, 2023

Läuft hier auch wieder, Vielen Dank fürs schnelle patchen.

@eckerse eckerse closed this as completed Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants