Whenever I shut down FreePBX, I get an error stating “Shutdown Failed with Error -16” Eventually, the system shuts down and reboots fine, but it sits at this error screen for about 2 minutes or so.
That’ll be systemd doing what you (your system services) told it to. Watch syslog in realtime it will likely identify what is misbehaving.
What would be the best way to view the syslogs while this is happening? I tried doing it at the console, which is where the error pops up, but it seems like the shutdown kills all the processes before I actually get to the error. I think it may be something in the Debian OS that is hanging, but I think I am going to need to view the logs after the reboot…
The local TTY console won’t stop before shutdown, but any ‘gooey’ desktop might, make sure you are multi-user first.
Check logs after reboot through journalctl -b -l -e look for the service which keeps hanging before reboot, you can try reducing systemd timeout as well.
Sounds like some systemd process is not shutting down when told to, hanging up the whole sequence. I believe the shutdown process is designed to force the shutdown after 2 minutes.
That’s not how systemd works, .service files will be run to completion and .target files requirements must be met, halt.target is the ultimate requirement, once met the kernel will be stopped and possibly restarted depending on environment.
Systemctl is the user space thing to interact with systemd thus if you want a quick reboot systemctl --force reboot will bypass any badly written .service files that are hanging or waiting for an unlikely to happen state , best to fix those service files at source though.
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.