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

systemd timeout - start of service timed out (no RPI in MQTT) #125

Open
anderl78 opened this issue Dec 18, 2023 · 1 comment
Open

systemd timeout - start of service timed out (no RPI in MQTT) #125

anderl78 opened this issue Dec 18, 2023 · 1 comment
Assignees
Labels
bug Something isn't working Looking Into This

Comments

@anderl78
Copy link

Hello!
At first, thank you for your hard work! Exactly what I need! :-)
I write the following for others with the same problem, perhaps it helps... or perhaps @ironsheep can integrate this, cause I can't see any negative side effects an all my RPIs...

On RPI ZERO W the startup of the service timed out. In consequence the MQTT broker never get the sensores, it fails with "systemd failed to start RPi Reporter MQTT Client/Daemon". Problem is, as far as i have seen, that the service regulary timed out after 30 sec.. the single-core RPI is too slow...

Check it with:
sudo systemctl show isp-rpi-reporter.service -p TimeoutStartUSec
sudo systemctl show isp-rpi-reporter.service -p TimeoutStopUSec
--> You should see 30 sec timeout
--> You can change this 120 sec. to fix it, if you have the same problem:

  1. During setup, before registering the service in /opt/RPi-Reporter-MQTT2HA-Daemon/isp-rpi-reporter.service file:

[Service]
Type=notify
...
TimeoutSec=120

  1. If the setup is already done, you have to change the service with:

sudo systemctl stop isp-rpi-reporter.service
sudo systemctl edit --full isp-rpi-reporter.service

--> add:

[Service]
Type=notify
...
TimeoutSec=120

  1. Save and exit, reboot and check with...

sudo journalctl -b --no-pager -u isp-rpi-reporter.service

...if the service is up. Btw, "TimeoutSec" set's the time for "TimeoutStartSec" and "TimeoutStopSec" in one.

@anderl78 anderl78 added the bug Something isn't working label Dec 18, 2023
@ironsheep ironsheep self-assigned this Dec 18, 2023
@ironsheep
Copy link
Owner

I'll look into this - be it doc change or detection on startup; we'll see. Thanks for pointing this out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Looking Into This
Projects
None yet
Development

No branches or pull requests

2 participants