Napd Service Failing to Start with Timeout on Linode - DHIS2 Containers Unaccessible

Hello DHIS2 Community,

I am running a DHIS2 instance on a Linode (Ubuntu 22.04.5 LTS) using the official snap packages (dhis2-sms, dhis2-core, etc.). After a server reboot, I am unable to access my DHIS2 containers because the snapd service itself fails to start with a timeout error.
When I try to start the service, I get the following error:
sudo systemctl start snapd.service
Job for snapd.service failed because a timeout was exceeded.
See “systemctl status snapd.service” and “journalctl -xeu snapd.service” for details.
What I’ve already tried/checked:

  1. Rebooting the server again.

  2. Ensuring there are no apparent disk space issues (df -h shows adequate space).

  3. The server has sufficient memory and CPU resources.

The core problem is that since snapd cannot start, I cannot run any snap commands (like snap services or snap logs) to check the status of my DHIS2 applications. They are effectively offline.

Has anyone else encountered a snapd startup timeout on a cloud provider like Linode? Are there any known issues with specific kernels or required configurations for snapd in virtualized environments that could cause this?

Any guidance on how to troubleshoot and resolve the snapd service startup failure would be immensely appreciated.

Thank you,

Hi,

To help diagnose the issue more effectively, could you please share the output of the following two commands?

  • sudo systemctl status snapd.service

This command will give some idea on exit codes and etc.

  • sudo journalctl -xeu snapd.service

Once above command entered, look especially for lines that include:

  1. "Timed out waiting for..."
  2. "Failed to mount..."
  3. "Dependency failed..."
  4. "AppArmor is not available"
  5. "cannot mount snap..."
  6. Any errors related to cgroups, udev, or apparmor

These logs will provide more insight into why the snapd service is failing to start and will be a good starting point for further debugging.

1 Like

For the first command it returns this:

Sep 03 04:07:49 localhost systemd[1]: snapd.service: Killing process 27835 (sna> Sep 03 04:07:51 localhost systemd[1]: snapd.service: Main process exited, code=> ░░ Subject: Unit process exited ░░ Defined-By: systemd ░░ Support: http://www.ubuntu.com/support ░░ ░░ An ExecStart= process belonging to unit snapd.service has exited. ░░ ░░ The process’ exit code is ‘killed’ and its exit status is 9. Sep 03 04:07:51 localhost systemd[1]: snapd.service: Failed with result 'timeou> ░░ Subject: Unit failed ░░ Defined-By: systemd ░░ Support: http://www.ubuntu.com/support ░░ ░░ The unit snapd.service has entered the ‘failed’ state with result ‘timeout’. Sep 03 04:07:51 localhost systemd[1]: Failed to start Snap Daemon. ░░ Subject: A start job for unit snapd.service has failed ░░ Defined-By: systemd ░░ Support: http://www.ubuntu.com/support ░░ ░░ A start job for unit snapd.service has finished with a failure. ░░ ░░ The job identifier is 35103 and the job result is failed. Sep 03 04:07:51 localhost systemd[1]: snapd.service: Consumed 3min 55.429s CPU > ░░ Subject: Resources consumed by unit runtime ░░ Defined-By: systemd ░░ Support: http://www.ubuntu.com/support ░░ ░░ The unit snapd.service completed and consumed the indicated resources.

and the second command returns this:

Subject: Unit process exited ░░ Defined-By: systemd ░░ Support: http://www.ubuntu.com/support ░░ ░░ An ExecStart= process belonging to unit snapd.service has exited. ░░ ░░ The process’ exit code is ‘killed’ and its exit status is 9. Sep 03 07:13:13 localhost systemd[1]: snapd.service: Failed with result 'timeou> ░░ Subject: Unit failed ░░ Defined-By: systemd ░░ Support: http://www.ubuntu.com/support ░░ ░░ The unit snapd.service has entered the ‘failed’ state with result ‘timeout’. Sep 03 07:13:13 localhost systemd[1]: Failed to start Snap Daemon. ░░ Subject: A start job for unit snapd.service has failed

Hi again @Chefane

Were you able to figure out what was the issue? Thanks!