I’m occasionally getting a problem when shutting down the os: I get a 1minute 30second timeout due to “a stop job is running for chirpstack-network-server”. Normally this wouldn’t be a problem but I’m using a super-cap-based UPS power supply that can’t hold up that long before power loss. So I’m looking for a way to guarantee shutdown in less than 15 seconds. Is there a recommended way to cleanly close down the whole Chirpstack system prior to issuing a “sudo shutdown now” in the hope of avoiding any stop job timeouts? Any help or advice much appreciated.
Still struggling with this… should have said this is on a Raspberry Pi 3b+ running raspbian buster.
Surely someone can recommend a way to cleanly shut down Chirpstack, very grateful for any help.
Very disappointed no one seems willing to help here.
Have I asked a very stupid question?
Should I be asking this elsewhere?
Can any one please just point me in the right direction.
I’m sorry you are disappointed. I don’t think that people are unwilling to help you. In general, these are the start / stop commands for the NS, they apply to the other components too:
Thanks Brocaar for responding, I know how to start and stop services in Raspbian. My question is more to do with what services need stopping and_in_what_order, so as to cleanly shut down the whole stack. I should say that I have also seen the “stop process” timeout on other ChirpStack related services (eg postgres & redis).
OK I’m still hoping someone can enlighten me on the recommended order in which to close down the individual components / services of Chirpstack. I don’t think this is an unreasonable or unanswerable question - if it is please tell me so!
You can find this without us.
OK, for the benefit of anyone else trying to avoid the 90 second “stop job” timeout at shutdown I constructed a short script that cleanly closes ChirpStack prior to OS shutdown. Please note that the suggested use of ‘systemctl poweroff --no-block’ or indeed ‘systemctl --no-block poweroff’ does NOT avoid the timeout. I tested the script on 338 reboots without once seeing a timeout issue, without the script I was seeing a timeout around 30% of the time under the same test conditions.
sudo systemctl --no-block stop ttn-gateway
sudo systemctl --no-block stop chirpstack-network-server
sudo systemctl --no-block stop mosquitto.service
sudo systemctl --no-block stop chirpstack-application-server
sudo systemctl --no-block stop chirpstack-gateway-bridge
sudo systemctl --no-block stop postgresql
sudo systemctl --no-block stop redis
sudo shutdown now