Categories
Linux Mastering Development

service won’t autoboot on start

So I have been trying to autostart a service and I’m getting no where. I’ve tried autobooting on both Mint 19.3 and 20 and Ubuntu 18.04 for the service lizardfs-chunkserver.service and autostarting the service does not work.

The way that I autostart a service is with the command:

systemctl enable lizardfs-chunkserver.service

Originally I thought it was a OS issue but when I try to auto start a different service,

systemctl enable lizardfs-master.service

The lizardfs-master service auto started fine.

This leads me to believe that I’m unable to autostart lizardfs-chunkserver because something to do with the service itself.

Below are a few things that I’ve found but I haven’t been able to get any further. As a side note, I am able to start lizardfs-chunkserverwith systemctl start lizardfs-chunkserver manually.

  1. From systemctl status lizardfs-chunkserver.service I see the error:
‚óŹ lizardfs-chunkserver.service - LizardFS chunkserver daemon
     Loaded: loaded (/lib/systemd/system/lizardfs-chunkserver.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Fri 2020-10-16 22:34:39 PDT; 11h ago
       Docs: man:mfschunkserver
    Process: 856 ExecStart=/usr/sbin/mfschunkserver start (code=exited, status=2)

Oct 16 22:34:39 13in-dell systemd[1]: lizardfs-chunkserver.service: Control process exited, code=exited, status=2/INVALIDARGUMENT
Oct 16 22:34:39 13in-dell mfschunkserver[863]: hdd space manager: folder /mnt/hd1/ will be scanned
Oct 16 22:34:39 13in-dell systemd[1]: lizardfs-chunkserver.service: Failed with result 'exit-code'.
Oct 16 22:34:39 13in-dell mfschunkserver[863]: hdd space manager: path to scan: /mnt/hd1/
Oct 16 22:34:39 13in-dell systemd[1]: Failed to start LizardFS chunkserver daemon.
Oct 16 22:34:39 13in-dell mfschunkserver[863]: hdd space manager: start background hdd scanning (searching for available chunks)
Oct 16 22:34:39 13in-dell mfschunkserver[863]: main server module: listen on *:9422
Oct 16 22:34:39 13in-dell mfschunkserver[863]: master connection module: connect failed: Network is unreachable
Oct 16 22:34:39 13in-dell mfschunkserver[863]: init: master connection module failed
Oct 16 22:34:39 13in-dell mfschunkserver[863]: closing *:9422
  1. From journalctl -xe | grep lizard I get the error:
Oct 16 22:34:39 13in-dell systemd[1]: lizardfs-chunkserver.service: Control process exited, code=exited, status=2/INVALIDARGUMENT
-- An ExecStart= process belonging to unit lizardfs-chunkserver.service has exited.
Oct 16 22:34:39 13in-dell systemd[1]: lizardfs-chunkserver.service: Failed with result 'exit-code'.
-- The unit lizardfs-chunkserver.service has entered the 'failed' state with result 'exit-code'.

  1. I noticed that the lizardfs-master must be running in order for lizardfs-chunkserver to start so this whole time I’ve ensure the master is up and running. I’ve even tried to modify the lizardfs-chunkserver.service file to delay the service to start by 10 seconds just in case it has something to do with unable to see the network upon restart. I’ve include the /lib/systemd/system/lizardfs-chunkserver.service content below:
[Unit]
Description=LizardFS chunkserver daemon
Documentation=man:mfschunkserver
After=network.target

[Service]
Type=forking
TimeoutSec=10
ExecStart=/usr/sbin/mfschunkserver start
ExecStop=/usr/sbin/mfschunkserver stop
ExecReload=/usr/sbin/mfschunkserver reload
Restart=no

[Install]
WantedBy=multi-user.target

Leave a Reply

Your email address will not be published. Required fields are marked *