![诊断重启时无法启动的服务(Calibre 电子书)](https://linux22.com/image/906990/%E8%AF%8A%E6%96%AD%E9%87%8D%E5%90%AF%E6%97%B6%E6%97%A0%E6%B3%95%E5%90%AF%E5%8A%A8%E7%9A%84%E6%9C%8D%E5%8A%A1%EF%BC%88Calibre%20%E7%94%B5%E5%AD%90%E4%B9%A6%EF%BC%89.png)
我正在尝试弄清楚为什么我的几个服务在重启时无法启动。一旦系统启动并运行,我就可以毫无问题地运行服务。
/var/log/error.log
Nov 16 04:01:31 Ubuntu systemd[1]: Failed to start Calibre eBook Server.
cat /lib/systemd/system/calibre.service
[Unit]
Description=Calibre eBook Server
Documentation=https://www.digitalocean.com/community/tutorials/how-to-create-a-calibre-ebook-server-on-ubuntu-14-04
After=network.target network-online.target
[Service]
Type=forking
User=calibre
Group=calibre
PIDFile=/var/run/calibre/calibre-server.pid
RuntimeDirectory=calibre
RuntimeDirectoryMode=0750
ExecStart=/opt/calibre/calibre-server \
--daemonize \
--max-opds-items=100 \
--max-opds-ungrouped-items=100 \
--url-prefix /calibre \
--pidfile=/var/run/calibre/calibre-server.pid \
--port=8080 \
--listen-on=192.168.0.199 \
--log="/var/log/mediaservers/calibre/calibre.log" \
"/media/eBooks/"
# "/media/eBooks/"
[Install]
WantedBy=multi-user.target
journalctl -b e91fd44ec7d848aab748c9f63778f54e -u calibre.service
Nov 16 04:01:28 Ubuntu systemd[1]: Starting Calibre eBook Server...
Nov 16 04:01:31 Ubuntu calibre-server[2163]: There is no calibre library at: /media/eBooks/
Nov 16 04:01:31 Ubuntu systemd[1]: calibre.service: Control process exited, code=exited status=1
Nov 16 04:01:31 Ubuntu systemd[1]: Failed to start Calibre eBook Server.
Nov 16 04:01:31 Ubuntu systemd[1]: calibre.service: Unit entered failed state.
Nov 16 04:01:31 Ubuntu systemd[1]: calibre.service: Failed with result 'exit-code'.
journalctl -b e91fd44ec7d848aab748c9f63778f54e | grep -i calibre
(standard input):1376:Nov 16 04:01:28 Ubuntu systemd[1]: Starting Calibre eBook Server...
(standard input):1662:Nov 16 04:01:31 Ubuntu calibre-server[2163]: There is no calibre library at: /media/eBooks/
(standard input):1663:Nov 16 04:01:31 Ubuntu systemd[1]: calibre.service: Control process exited, code=exited status=1
(standard input):1664:Nov 16 04:01:31 Ubuntu systemd[1]: Failed to start Calibre eBook Server.
(standard input):1665:Nov 16 04:01:31 Ubuntu audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=calibre comm="systemd" exe="/lib/systemd/systemd" hostname=? addr=? terminal=?
res=failed'
(standard input):1666:Nov 16 04:01:31 Ubuntu systemd[1]: calibre.service: Unit entered failed state.
(standard input):1668:Nov 16 04:01:31 Ubuntu systemd[1]: calibre.service: Failed with result 'exit-code'.
ls -al /媒体
lrwxrwxrwx 1 root root 20 Apr 12 2018 /media -> /mnt/SG-8TB-1/Media/
ls -al /media/| grep 电子书
lrwxrwxrwx 1 root root 27 May 9 2018 eBooks -> /mnt/SG-6TB-2/Media/eBooks/
猫/etc/fstab
# <file system> <mount point> <type> <options> <dump> <pass>
/dev/mapper/cryptswap1 none swap sw 0 0
UUID=edb48d14-df73-4efb-8808-92d2c705741f / ext4 errors=remount-ro,defaults,acl 0 1
UUID=e6c06084-4453-43b8-ae97-cbef4d9c5f6f /tmp ext4 errors=remount-ro,defaults,acl,noatime 0 2
UUID=0cb84aea-291c-4637-bcbc-d543e53b711e /var ext4 errors=remount-ro,defaults,acl,nofail 0 2
UUID=51b8dc62-a9e9-4c7e-9e94-32ae8109d62b /home ext4 errors=remount-ro,defaults,acl,nofail 0 2
UUID=f3ce7d6d-7543-4cd8-991c-4f6c427f18c5 /mnt/SG-1.5TB-1 ext4 errors=remount-ro,defaults,acl,nofail 0 3
UUID=4e16cf60-13ee-452f-a67f-e989032dcf7d /mnt/SG-3TB-1 ext4 errors=remount-ro,defaults,acl,nofail 0 3
UUID=d834fa15-c81c-4330-b40e-b04e2cd5471f /mnt/SG-4TB-1 ext4 errors=remount-ro,defaults,acl,nofail 0 3
UUID=ce1c1da3-fee5-4020-8361-e94f9a106c80 /mnt/SG-4TB-2 ext4 errors=remount-ro,defaults,acl,nofail 0 3
#UUID=883d1bdf-b06d-4865-b64f-f0c44d66ab62 /mnt/SG-4TB-3 ext4 errors=remount-ro,defaults,nofail 0 4
UUID=a8d31f58-54e6-4867-8833-c9a3c323f105 /mnt/SG-6TB-1 ext4 errors=remount-ro,defaults,acl,nofail 0 3
UUID=3ffb6832-f412-43bd-b984-0aad7dd16cd0 /mnt/SG-6TB-2 ext4 errors=remount-ro,defaults,acl,nofail 0 3
UUID=3602d0dc-8fa0-40bd-9ebe-b8dec16fc1da /mnt/SG-8TB-1 ext4 errors=remount-ro,defaults,acl,nofail 0 3
UUID=59c19339-fdf1-40ef-b802-33c3c8f7e670 /mnt/SG-8TB-2 ext4 errors=remount-ro,defaults,acl,nofail 0 3
UUID=e9d6ec8c-c519-4d00-88e4-79b22d11b0ec /mnt/SG-8TB-3 ext4 errors=remount-ro,defaults,acl,nofail 0 3
UUID=ba9d87b3-09c2-4cee-ab6a-eb73110d50f0 /mnt/WD-2TB-1 ext4 errors=remount-ro,defaults,acl,nofail 0 3