View Single Post
Old 06-15-2017, 12:04 PM   #1
Ackis
Member
Ackis began at the beginning.
 
Posts: 21
Karma: 10
Join Date: Sep 2013
Location: Canada
Device: Galaxy Tab 2 10.1, iPad 2
Calibre not auto-starting on Ubuntu 16.04

Hello everyone - having a weird issue.

Whenever my server reboots, Calibre doesn't automatically start. I'm not sure why.

Here's the error when checking its service status:

Code:
>sudo service calibre status
● calibre.service - Calibre eBook Server
   Loaded: loaded (/lib/systemd/system/calibre.service; enabled; vendor preset: enabled)
   Active: failed (Result: timeout) since Wed 2017-06-14 04:05:28 MDT; 1 day 5h ago
  Process: 1764 ExecStart=/usr/bin/calibre-server --daemonize --max-cover=600x800 --max-opds-items=100 --max-opds-ungrouped-items=100 --url-prefix /calibre --pidfile=/var/run/calibre/calibre

Jun 14 04:03:58 ubuntu systemd[1]: Starting Calibre eBook Server...
Jun 14 04:05:28 ubuntu systemd[1]: calibre.service: Start operation timed out. Terminating.
Jun 14 04:05:28 ubuntu systemd[1]: Failed to start Calibre eBook Server.
Jun 14 04:05:28 ubuntu systemd[1]: calibre.service: Unit entered failed state.
Jun 14 04:05:28 ubuntu systemd[1]: calibre.service: Failed with result 'timeout'.
When I manually turn it on, it works (except for the PID issue):

Code:
>sudo service calibre start
>sudo service calibre status
● calibre.service - Calibre eBook Server
   Loaded: loaded (/lib/systemd/system/calibre.service; enabled; vendor preset: enabled)
   Active: active (running) since Thu 2017-06-15 09:59:12 MDT; 1s ago
  Process: 4923 ExecStart=/usr/bin/calibre-server --daemonize --max-cover=600x800 --max-opds-items=100 --max-opds-ungrouped-items=100 --url-prefix /calibre --pidfile=/var/run/calibre/calibre
 Main PID: 4932 (calibre-server)
   CGroup: /system.slice/calibre.service
           └─4932 /opt/calibre/bin/calibre-server --daemonize --max-cover=600x800 --max-opds-items=100 --max-opds-ungrouped-items=100 --url-prefix /calibre --pidfile=/var/run/calibre/calibre

Jun 15 09:59:08 ubuntu systemd[1]: Starting Calibre eBook Server...
Jun 15 09:59:10 ubuntu systemd[1]: calibre.service: PID file /var/run/calibre/calibre-server.pid not readable (yet?) after start: No such file or directory
Jun 15 09:59:12 ubuntu systemd[1]: Started Calibre eBook Server.
This is the configuration that I'm using to start the server:

Code:
[Unit]
Description=Calibre eBook Server
After=syslog.target network.target

[Service]
Type=forking
User=calibre
Group=calibre
PIDFile=/var/run/calibre/calibre-server.pid
ExecStart=/usr/bin/calibre-server \
        --daemonize \
        --max-cover=600x800 \
        --max-opds-items=100 \
        --max-opds-ungrouped-items=100 \
        --url-prefix /calibre \
        --pidfile=/var/run/calibre/calibre-server.pid \
        --username=calibre \
        --port=8080 \
        --with-library=/media/eBooks/

[Install]
WantedBy=multi-user.target
Ackis is offline   Reply With Quote