0

https://bugs.launchpad.net/snappy/+bug/1662772

As per the above bug, I am unable to login to a working booted system.

The important errors are

systemd[1]: snappy-set-hostname.service: Start request repeated too quickly.
systemd[1]: Failed to start Set the hostname to the value stored on the writable partition.

If find the following errors in the logs

journalctl
....  
Mar 30 09:05:00 aaron-ubunix systemd[1]: Started Set the hostname to the value stored on the writable partition.
Mar 30 09:05:00 aaron-ubunix systemd[1]: Started Set the hostname to the value stored on the writable partition.
Mar 30 09:05:00 aaron-ubunix systemd[1]: Started Set the hostname to the value stored on the writable partition.
Mar 30 09:05:00 aaron-ubunix systemd[1]: Reached target Sound Card.
Mar 30 09:05:00 aaron-ubunix systemd[1]: Reached target Bluetooth.
Mar 30 09:05:00 aaron-ubunix systemd[1]: snappy-set-hostname.service: Start request repeated too quickly.
Mar 30 09:05:00 aaron-ubunix systemd[1]: Failed to start Set the hostname to the value stored on the writable partition.
Mar 30 09:05:00 aaron-ubunix systemd[1]: Dependency failed for System Initialization.
Mar 30 09:05:00 aaron-ubunix systemd[1]: Dependency failed for ACPID Listen Socket.
Mar 30 09:05:00 aaron-ubunix systemd[1]: acpid.socket: Job acpid.socket/start failed with result 'dependency'.
Mar 30 09:05:00 aaron-ubunix systemd[1]: Dependency failed for getty on tty2-tty6 if dbus and logind are not available.
Mar 30 09:05:00 aaron-ubunix systemd[1]: getty-static.service: Job getty-static.service/start failed with result 'dependency'.
Mar 30 09:05:00 aaron-ubunix systemd[1]: Dependency failed for Basic System.
Mar 30 09:05:00 aaron-ubunix systemd[1]: Dependency failed for Multi-User System.
Mar 30 09:05:00 aaron-ubunix systemd[1]: Dependency failed for Graphical Interface.
Mar 30 09:05:00 aaron-ubunix systemd[1]: graphical.target: Job graphical.target/start failed with result 'dependency'.
Mar 30 09:05:00 aaron-ubunix systemd[1]: multi-user.target: Job multi-user.target/start failed with result 'dependency'.
Mar 30 09:05:00 aaron-ubunix systemd[1]: basic.target: Job basic.target/start failed with result 'dependency'.
Mar 30 09:05:00 aaron-ubunix systemd[1]: Dependency failed for Getty on tty1.
Mar 30 09:05:00 aaron-ubunix systemd[1]: getty@tty1.service: Job getty@tty1.service/start failed with result 'dependency'.
Mar 30 09:05:00 aaron-ubunix systemd[1]: Dependency failed for Snappy daemon.
Mar 30 09:05:00 aaron-ubunix systemd[1]: snapd.service: Job snapd.service/start failed with result 'dependency'.
Mar 30 09:05:00 aaron-ubunix systemd[1]: Dependency failed for pcapdump.service.
Mar 30 09:05:00 aaron-ubunix systemd[1]: pcapdump.service: Job pcapdump.service/start failed with result 'dependency'.
Mar 30 09:05:00 aaron-ubunix systemd[1]: Dependency failed for Suspend Active Libvirt Guests.
Mar 30 09:05:00 aaron-ubunix systemd[1]: libvirt-guests.service: Job libvirt-guests.service/start failed with result 'dependency'.
Mar 30 09:05:00 aaron-ubunix systemd[1]: Dependency failed for Avahi mDNS/DNS-SD Stack Activation Socket.
Mar 30 09:05:00 aaron-ubunix systemd[1]: Dependency failed for Avahi mDNS/DNS-SD Stack.
Mar 30 09:05:00 aaron-ubunix systemd[1]: avahi-daemon.service: Job avahi-daemon.service/start failed with result 'dependency'.
Mar 30 09:05:00 aaron-ubunix systemd[1]: avahi-daemon.socket: Job avahi-daemon.socket/start failed with result 'dependency'.
Mar 30 09:05:00 aaron-ubunix systemd[1]: Dependency failed for Virtualization daemon.
Mar 30 09:05:00 aaron-ubunix systemd[1]: libvirtd.service: Job libvirtd.service/start failed with result 'dependency'.
Mar 30 09:05:00 aaron-ubunix systemd[1]: Dependency failed for Regular background program processing daemon.
Mar 30 09:05:00 aaron-ubunix systemd[1]: cron.service: Job cron.service/start failed with result 'dependency'.
Mar 30 09:05:00 aaron-ubunix systemd[1]: Dependency failed for OpenBSD Secure Shell server.
Mar 30 09:05:00 aaron-ubunix systemd[1]: ssh.service: Job ssh.service/start failed with result 'dependency'.
Mar 30 09:05:00 aaron-ubunix systemd[1]: Dependency failed for oFono Mobile telephony stack.
Mar 30 09:05:00 aaron-ubunix systemd[1]: ofono.service: Job ofono.service/start failed with result 'dependency'.
Mar 30 09:05:00 aaron-ubunix systemd[1]: Dependency failed for LSB: automatic crash report generation.
Mar 30 09:05:00 aaron-ubunix systemd[1]: apport.service: Job apport.service/start failed with result 'dependency'.
Mar 30 09:05:00 aaron-ubunix systemd[1]: Dependency failed for CUPS Scheduler.
Mar 30 09:05:00 aaron-ubunix systemd[1]: cups.path: Job cups.path/start failed with result 'dependency'.
Mar 30 09:05:00 aaron-ubunix systemd[1]: Dependency failed for LSB: exim Mail Transport Agent.
Mar 30 09:05:00 aaron-ubunix systemd[1]: exim4.service: Job exim4.service/start failed with result 'dependency'.
Mar 30 09:05:00 aaron-ubunix systemd[1]: Dependency failed for D-Bus System Message Bus.
Mar 30 09:05:00 aaron-ubunix systemd[1]: dbus.service: Job dbus.service/start failed with result 'dependency'.
Mar 30 09:05:00 aaron-ubunix systemd[1]: Dependency failed for Run anacron jobs.
Mar 30 09:05:00 aaron-ubunix systemd[1]: anacron.service: Job anacron.service/start failed with result 'dependency'.
Mar 30 09:05:00 aaron-ubunix systemd[1]: Dependency failed for OpenVPN service.
Mar 30 09:05:00 aaron-ubunix systemd[1]: openvpn.service: Job openvpn.service/start failed with result 'dependency'.
Mar 30 09:05:00 aaron-ubunix systemd[1]: Dependency failed for Socket activation for snappy daemon.
Mar 30 09:05:00 aaron-ubunix systemd[1]: snapd.socket: Job snapd.socket/start failed with result 'dependency'.
Mar 30 09:05:00 aaron-ubunix systemd[1]: Dependency failed for Virtual machine log manager socket.
Mar 30 09:05:00 aaron-ubunix systemd[1]: virtlogd.socket: Job virtlogd.socket/start failed with result 'dependency'.
Mar 30 09:06:23 aaron-ubunix systemd[1]: Dependency failed for Set the CPU Frequency Scaling governor.
Mar 30 09:06:23 aaron-ubunix systemd[1]: ondemand.service: Job ondemand.service/start failed with result 'dependency'.
Mar 30 09:06:23 aaron-ubunix systemd[1]: Dependency failed for crash report submission daemon.
Mar 30 09:06:23 aaron-ubunix systemd[1]: whoopsie.service: Job whoopsie.service/start failed with result 'dependency'.
Mar 30 09:06:23 aaron-ubunix systemd[1]: Dependency failed for Regular background program processing daemon.
Mar 30 09:06:23 aaron-ubunix systemd[1]: cron.service: Job cron.service/start failed with result 'dependency'.
Mar 30 09:06:23 aaron-ubunix systemd[1]: Dependency failed for OpenBSD Secure Shell server.
Mar 30 09:06:23 aaron-ubunix systemd[1]: ssh.service: Job ssh.service/start failed with result 'dependency'.
Mar 30 09:06:23 aaron-ubunix systemd[1]: sysinit.target: Job sysinit.target/start failed with result 'dependency'.
Mar 30 09:06:23 aaron-ubunix systemd[1]: snappy-set-hostname.service: Unit entered failed state.
Mar 30 09:06:23 aaron-ubunix systemd[1]: snappy-set-hostname.service: Failed with result 'start-limit-hit'.
Mar 30 09:06:23 aaron-ubunix systemd[1]: snappy-set-hostname.service: Start request repeated too quickly.
Mar 30 09:06:23 aaron-ubunix systemd[1]: Failed to start Set the hostname to the value stored on the writable partition.
Mar 30 09:06:23 aaron-ubunix systemd[1]: Dependency failed for System Initialization.
Mar 30 09:06:23 aaron-ubunix systemd[1]: Dependency failed for Basic System.
Mar 30 09:06:23 aaron-ubunix systemd[1]: Dependency failed for Multi-User System.
Mar 30 09:06:23 aaron-ubunix systemd[1]: multi-user.target: Job multi-user.target/start failed with result 'dependency'.
Mar 30 09:06:23 aaron-ubunix systemd[1]: basic.target: Job basic.target/start failed with result 'dependency'.
Mar 30 09:06:23 aaron-ubunix systemd[1]: Dependency failed for ISC DHCP IPv6 server.
Mar 30 09:06:23 aaron-ubunix systemd[1]: isc-dhcp-server6.service: Job isc-dhcp-server6.service/start failed with result 'dependency'.
Mar 30 09:06:23 aaron-ubunix systemd[1]: Dependency failed for ACPID Listen Socket.
Mar 30 09:06:23 aaron-ubunix systemd[1]: acpid.socket: Job acpid.socket/start failed with result 'dependency'.
Mar 30 09:06:23 aaron-ubunix systemd[1]: Dependency failed for Virtual machine log manager socket.
Mar 30 09:06:23 aaron-ubunix systemd[1]: virtlogd.socket: Job virtlogd.socket/start failed with result 'dependency'.
Mar 30 09:06:23 aaron-ubunix systemd[1]: Dependency failed for Hold until boot process finishes up.
Mar 30 09:06:23 aaron-ubunix systemd[1]: plymouth-quit-wait.service: Job plymouth-quit-wait.service/start failed with result 'dependency'.
Mar 30 09:06:23 aaron-ubunix systemd[1]: Dependency failed for ISC DHCP IPv4 server.
Mar 30 09:06:23 aaron-ubunix systemd[1]: isc-dhcp-server.service: Job isc-dhcp-server.service/start failed with result 'dependency'.
Mar 30 09:06:23 aaron-ubunix systemd[1]: Dependency failed for LSB: Start/stop sysstat's sadc.
Mar 30 09:06:23 aaron-ubunix systemd[1]: sysstat.service: Job sysstat.service/start failed with result 'dependency'.
Mar 30 09:06:23 aaron-ubunix systemd[1]: Dependency failed for Auto import assertions from block devices.
Mar 30 09:06:23 aaron-ubunix systemd[1]: snapd.autoimport.service: Job snapd.autoimport.service/start failed with result 'dependency'.
Mar 30 09:06:23 aaron-ubunix systemd[1]: Dependency failed for Samba SMB Daemon.
Mar 30 09:06:23 aaron-ubunix systemd[1]: smbd.service: Job smbd.service/start failed with result 'dependency'.
Mar 30 09:06:23 aaron-ubunix systemd[1]: Dependency failed for LSB: disk temperature monitoring daemon.
Mar 30 09:06:23 aaron-ubunix systemd[1]: hddtemp.service: Job hddtemp.service/start failed with result 'dependency'.
Mar 30 09:06:23 aaron-ubunix systemd[1]: Dependency failed for CUPS Scheduler.
Mar 30 09:06:23 aaron-ubunix systemd[1]: cups.socket: Job cups.socket/start failed with result 'dependency'.
Mar 30 09:06:23 aaron-ubunix systemd[1]: Dependency failed for Daily Cleanup of Temporary Directories.
Mar 30 09:06:23 aaron-ubunix systemd[1]: systemd-tmpfiles-clean.timer: Job systemd-tmpfiles-clean.timer/start failed with result 'dependency'.
Mar 30 09:06:23 aaron-ubunix systemd[1]: Dependency failed for PokerTH multiplayer server.
Mar 30 09:06:23 aaron-ubunix systemd[1]: pokerth-server.service: Job pokerth-server.service/start failed with result 'dependency'.
Mar 30 09:06:23 aaron-ubunix systemd[1]: Dependency failed for Snappy daemon.
Mar 30 09:06:23 aaron-ubunix systemd[1]: snapd.service: Job snapd.service/start failed with result 'dependency'.
Mar 30 09:06:23 aaron-ubunix systemd[1]: Dependency failed for Workaround apparmor cacheing.
Mar 30 09:06:23 aaron-ubunix systemd[1]: snappy-workaround-apparmor.service: Job snappy-workaround-apparmor.service/start failed with result 'dependency'.
Mar 30 09:06:23 aaron-ubunix systemd[1]: Dependency failed for LSB: Record successful boot for GRUB.
Mar 30 09:06:23 aaron-ubunix systemd[1]: grub-common.service: Job grub-common.service/start failed with result 'dependency'.
Mar 30 09:06:23 aaron-ubunix systemd[1]: Dependency failed for Socket activation for snappy daemon.
Mar 30 09:06:23 aaron-ubunix systemd[1]: snapd.socket: Job snapd.socket/start failed with result 'dependency'.
Mar 30 09:06:23 aaron-ubunix systemd[1]: Dependency failed for Restore /etc/resolv.conf if the system crashed before the ppp link was shut down.
Mar 30 09:06:23 aaron-ubunix systemd[1]: pppd-dns.service: Job pppd-dns.service/start failed with result 'dependency'.
Mar 30 09:06:23 aaron-ubunix systemd[1]: Dependency failed for D-Bus System Message Bus Socket.
Mar 30 09:06:23 aaron-ubunix systemd[1]: dbus.socket: Job dbus.socket/start failed with result 'dependency'.
Mar 30 09:06:23 aaron-ubunix systemd[1]: sysinit.target: Job sysinit.target/start failed with result 'dependency'.
Mar 30 09:06:23 aaron-ubunix systemd[1]: snappy-set-hostname.service: Failed with result 'start-limit-hit'.
Mar 30 09:06:23 aaron-ubunix systemd[1]: Failed to start Set the hostname to the value stored on the writable partition.
Mar 30 09:06:23 aaron-ubunix systemd[1]: Dependency failed for System Initialization.
Mar 30 09:06:23 aaron-ubunix systemd[1]: Dependency failed for System Logging Service.
Mar 30 09:06:23 aaron-ubunix systemd[1]: rsyslog.service: Job rsyslog.service/start failed with result 'dependency'.
Mar 30 09:06:23 aaron-ubunix systemd[1]: sysinit.target: Job sysinit.target/start failed with result 'dependency'.
Mar 30 09:06:23 aaron-ubunix systemd[1]: snappy-set-hostname.service: Failed with result 'start-limit-hit'.
Mar 30 09:06:23 aaron-ubunix systemd[1]: snappy-set-hostname.service: Start request repeated too quickly.
Mar 30 09:06:23 aaron-ubunix systemd[1]: Failed to start Set the hostname to the value stored on the writable partition.
Mar 30 09:06:23 aaron-ubunix systemd[1]: Dependency failed for System Initialization.
Mar 30 09:06:23 aaron-ubunix systemd[1]: Dependency failed for System Logging Service.
Mar 30 09:06:23 aaron-ubunix systemd[1]: rsyslog.service: Job rsyslog.service/start failed with result 'dependency'.
....
0

I fixed this by adding the following lines to the file below.

Restart=on-failure
RestartSec=00ms  

The final file will look like this.

sudo systemctl edit snappy-set-hostname.service
[Unit]
Description=Set the hostname to the value stored on the writable partition
After=etc-writable.mount
Requires=local-fs.target
DefaultDependencies=no
After=local-fs.service
RequiresMountsFor=/ /etc
StartLimitBurst=100


[Service]
Type=simple
ExecStart=
ExecStart=/bin/hostname -F /etc/hostname 
Restart=on-failure
RestartSec=500ms

As I am creating an override to the system default file found here /lib/systemd/system/snappy-set-hostname.service. It creates a new file here /etc/systemd/system/snappy-set-hostname.service.d/override.conf.

Which is why I ended up having put the following in.

ExecStart=
ExecStart=/bin/hostname -F /etc/hostname 

Other wise it will try to include the ExecStart from the /lib/systemd as well as /etc/systemd which can cause problems. As it tries to run it twice.

If you are seeing the following

Mar 31 08:38:06 some-machine systemd[1]: [/etc/systemd/system/snappy-set-hostname.service.d/override.conf:1] Assignment outside of section. Ignoring.

It is because you have to use section names [Unit] and [Service] etc as needed in your override.

  • 1
    If you're modifying an existing service, use systemctl edit <service-name>. Changes to /lib can be overwritten on package upgrades. – muru Mar 30 '17 at 9:07
  • As this service runs very early in the boot using systemctl edit to make changes can cause problems with the system not booting. It creates a file called /etc/systemd/system/snappy-set-hostname.service.d/override.conf Which ends up causing the system to fail at startup. failed to isolate default target freezing I am not a systemd expert, so there is probably some thing I am missing. – nelaaro Mar 30 '17 at 23:12

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.