View Single Post
Old 08-25-2017, 10:34 PM   #4
oblongau
Member
oblongau began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Sep 2013
Location: Australia
Device: Calibre; Galaxy SII
I have done the above process, modified for my username, port, etc. The calibre server runs (but only briefly, see below), and I can use a Web browser to access the library.

However, when I try to run calibre itself, I get:

Code:
calibre, version 3.6.0
ERROR: Cannot start calibre: Another calibre program that can modify calibre libraries, such as, calibre-server or calibredb is already running. You must first shut it down, before starting the main calibre program. If you are sure no such program is running, try restarting your computer.
The program is on the same computer as the server. Linux Mint 18.2 64 bit.

Now I notice different behaviour... after:
Code:
sudo systemctl start calibre-server
Code:
sudo systemctl status calibre-server
the result is:
Code:
● calibre-server.service - calibre content server
   Loaded: loaded (/etc/systemd/system/calibre-server.service; disabled; vendor preset: enabled)
   Active: deactivating (stop-sigterm) since Sat 2017-08-26 12:18:34 AEST; 7s ago
  Process: 16588 ExecStart=/usr/bin/calibre-server --daemonize --max-opds-items=30 --max-opds-ungrouped-items=100 --port 8282 --log=/home/bob/.calibre-server-log --enable-auth /home/bob/Calibre Library (code=exited, status=0/SUCCESS)
 Main PID: 16588 (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/calibre-server.service
           └─16596 /opt/calibre/bin/calibre-server --daemonize --max-opds-items=30 --max-opds-ungrouped-items=100 --port 8282 --log=/home/bob/.calibre-server-log --enable-auth /home/bob/Calibre Library

Aug 26 12:18:33 bob-mint systemd[1]: Started calibre content server.
I then don't do anything for a few minutes, but if I run the status again I get:

Code:
● calibre-server.service - calibre content server
   Loaded: loaded (/etc/systemd/system/calibre-server.service; disabled; vendor preset: enabled)
   Active: failed (Result: timeout) since Sat 2017-08-26 12:20:04 AEST; 51s ago
  Process: 16588 ExecStart=/usr/bin/calibre-server --daemonize --max-opds-items=30 --max-opds-ungrouped-items=100 --port 8282 --log=/home/bob/.calibre-server-log --enable-auth /home/bob/Calibre Library (code=exited, status=0/SUCCESS)
 Main PID: 16588 (code=exited, status=0/SUCCESS)

Aug 26 12:18:33 bob-mint systemd[1]: Started calibre content server.
Aug 26 12:20:04 bob-mint systemd[1]: calibre-server.service: State 'stop-sigterm' timed out. Killing.
Aug 26 12:20:04 bob-mint systemd[1]: calibre-server.service: Unit entered failed state.
Aug 26 12:20:04 bob-mint systemd[1]: calibre-server.service: Failed with result 'timeout'.
My /etc/systemd/system/calibre-server.service file is:

Code:
[Unit]
Description=calibre content server
After=network.target

[Service]
Type=simple
User=bob
Group=bob

ExecStart=/usr/bin/calibre-server\
--daemonize\
--max-opds-items=30\
--max-opds-ungrouped-items=100\
--port 8282 \
--log="/home/bob/.calibre-server-log"\
--enable-auth \
"/home/bob/Calibre Library"

[Install]
WantedBy=multi-user.target
And I just noted that the instructions above say to create the file "/lib/systemd/system/calibre.service" but https://manual.calibre-ebook.com/server.html says "/etc/systemd/system/calibre-server.service" Does that matter?

What am I missing?
oblongau is offline   Reply With Quote