Installing and configuring Calibre-Server

    • OMV 2.x

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • riff-raff wrote:

      Check content of the following file:

      Source Code

      1. /etc/systemd/system/calibre.service

      My File:
      Display Spoiler

      [Unit]Description=Calibre ServiceAfter=network.target[Service]Type=forkingUser=calibreGroup=usersPIDFile=/var/run/calibre/calibre-server.pidPermissionsStartOnly=trueExecStartPre=-/bin/mkdir /var/run/calibreExecStartPre=/bin/chown -R calibre:users /var/run/calibreExecStart=/usr/bin/calibre-server \ --daemonize \ --username=calibre \ --port=9400 \ --pidfile=/var/run/calibre/calibre-server.pid \ --with-library=/srv/drive-by-id-ata-Hitachi_HDS723020BLA642_MN1240F33MV0LD-part1/calibre[Install]WantedBy=default.target



      Regarding the PID-File there is nothing inside /var/run/calibre

      The rights should also be fine
      Intel® Celeron® 420 Prozessor (1.6 GHz, 512 KB, L2 Cache)
      2GB DDr2 RAM
      OMV 3.0.94
      2x 3TB Seagate
      1x 2TB Hitachi
      1x 250GB Samsung (Main System OMV )

      The post was edited 1 time, last by Zeb Aztian ().

    • I have created it as you have written in your HowTo and directly in "Nano"

      with the command


      Source Code

      1. nano etc/systemd/system/calibre.service
      Then copied your text inside and replaced XXX against my path of created "calibre folder" using share on OMV WebGUI
      Intel® Celeron® 420 Prozessor (1.6 GHz, 512 KB, L2 Cache)
      2GB DDr2 RAM
      OMV 3.0.94
      2x 3TB Seagate
      1x 2TB Hitachi
      1x 250GB Samsung (Main System OMV )
    • Is your OMV up to date or do you run the version from your signature?

      Could you free some space on this data drive?

      I'll set up a virtual machine and follow my own discription again, maybe I will discover the cause of this error, installation of OMV is running right now.
      Chaos is found in greatest abundance wherever order is being sought.
      It always defeats order, because it is better organized.
      Terry Pratchett
    • On my main drive (250GB) I have enough free Space and upgraded this morning to 3.0.94

      I give both drives which have not so much space left little bit more free space and try it again

      EDIT
      => Have now enough free space

      Source Code

      1. systemctl start calibre.service:
      2. Jan 10 20:29:18 HomeServer systemd[1]: Starting Calibre Service...
      3. Jan 10 20:29:18 HomeServer mkdir[31703]: /bin/mkdir: das Verzeichnis „/var/run/calibre“ kann nicht angelegt werden: Die Datei existiert bereits
      4. Jan 10 20:29:29 HomeServer systemd[1]: PID file /var/run/calibre/calibre-server.pid not readable (yet?) after start.
      5. Jan 10 20:29:29 HomeServer systemd[1]: calibre.service never wrote its PID file. Failing.
      6. Jan 10 20:29:29 HomeServer systemd[1]: Failed to start Calibre Service.
      7. Jan 10 20:29:29 HomeServer systemd[1]: Unit calibre.service entered failed state.
      to 4. do you think it makes sense to delete the "calibre" folder and let create it through the start?
      EDIT END

      Thanks for taking time and rebuilding this on your VM :)
      Intel® Celeron® 420 Prozessor (1.6 GHz, 512 KB, L2 Cache)
      2GB DDr2 RAM
      OMV 3.0.94
      2x 3TB Seagate
      1x 2TB Hitachi
      1x 250GB Samsung (Main System OMV )

      The post was edited 1 time, last by Zeb Aztian ().

    • In

      Source Code

      1. etc/systemd/system/calibre.service
      use

      Source Code

      1. ExecStartPre=-/bin/mkdir -p /var/run/calibre/
      2. ExecStartPre=/bin/chown -R calibre:users /var/run/calibre/
      Which overrides the folder anyways and sets permissions. I edited my howto post as well. But this should not cause this error, this should only be a problem at reboot or restarting the service.

      Edit: VM install in VirtualBox is sooo damn slow X/
      Chaos is found in greatest abundance wherever order is being sought.
      It always defeats order, because it is better organized.
      Terry Pratchett

      The post was edited 1 time, last by riff-raff ().

    • Oh man I am so sorry for that :| X/
      We can stop if you want I don't want to steal your evening ... Its sad that it doesn't work but that's ok

      please see below the new

      Source Code

      1. etc/systemd/system/calibre.service

      and here when I

      Source Code

      1. systemctl start calibre.service


      and the request

      Source Code

      1. systemctl status calibre.service



      I don't know....
      Intel® Celeron® 420 Prozessor (1.6 GHz, 512 KB, L2 Cache)
      2GB DDr2 RAM
      OMV 3.0.94
      2x 3TB Seagate
      1x 2TB Hitachi
      1x 250GB Samsung (Main System OMV )
    • riff-raff wrote:

      did you try

      Source Code

      1. systemctl daemon-reload
      as recommended?
      tried it now and still failing with same error as above....
      do you think that's a problem because I have "DOCKER" Plugin installed with calibre? (As of Post ebook server )

      I tried that this morning...
      Intel® Celeron® 420 Prozessor (1.6 GHz, 512 KB, L2 Cache)
      2GB DDr2 RAM
      OMV 3.0.94
      2x 3TB Seagate
      1x 2TB Hitachi
      1x 250GB Samsung (Main System OMV )
    • In my fresh OMV 3.0.94 install, I followed the provided howto and I get an runnig calibre-server.

      I used a single virtual data drive.

      My

      Source Code

      1. /etc/systemd/system/calibre.service




      looks like this:

      Source Code

      1. [Unit]
      2. Description=Calibre Service
      3. After=network.target
      4. [Service]
      5. Type=forking
      6. User=calibre
      7. Group=users
      8. PIDFile=/var/run/calibre/calibre-server.pid
      9. PermissionsStartOnly=true
      10. ExecStartPre=-/bin/mkdir -p /var/run/calibre
      11. ExecStartPre=/bin/chown -R calibre:users /var/run/calibre
      12. ExecStart=/usr/bin/calibre-server \
      13. --daemonize \
      14. --username=calibre \
      15. --port=9400 \
      16. --pidfile=/var/run/calibre/calibre-server.pid \
      17. --with-library=/srv/dev-disk-by-id-ata-VBOX_HARDDISK_VB5272365b-458389c4-part1/calibre/
      18. [Install]
      19. WantedBy=default.target
      Display All

      Source Code

      1. systemctl start calibre.service
      runs through without any issue

      Source Code

      1. systemctl status calibre.service
      gives me

      Source Code

      1. ● calibre.service - Calibre Service
      2. Loaded: loaded (/etc/systemd/system/calibre.service; disabled)
      3. Active: active (running) since Mi 2018-01-10 23:26:22 CET; 2s ago
      4. Process: 5754 ExecStart=/usr/bin/calibre-server --daemonize --username=calibre --port=9400 --pidfile=/var/run/calibre/calibre-server.pid --with-library=/srv/dev-disk-by-id-ata-VBOX_HARDDISK_VB5272365b-458389c4-part1/calibre/ (code=exited, status=0/SUCCESS)
      5. Process: 5752 ExecStartPre=/bin/chown -R calibre:users /var/run/calibre (code=exited, status=0/SUCCESS)
      6. Process: 5750 ExecStartPre=/bin/mkdir -p /var/run/calibre (code=exited, status=0/SUCCESS)
      7. Main PID: 5760 (calibre-server)
      8. CGroup: /system.slice/calibre.service
      9. └─5760 /usr/bin/python2.7 /usr/bin/calibre-server --daemonize --username=calibre --port=9400 --pidfile=...
      10. Jan 10 23:26:22 OMV3 systemd[1]: calibre.service: Supervising process 5760 which is not our child. We'll mos...exits.
      11. Jan 10 23:26:22 OMV3 systemd[1]: Started Calibre Service.
      12. Hint: Some lines were ellipsized, use -l to show in full.
      Display All
      checking in browser my ip:9400 gives me an empty, but still running calibre




      You should check your configs and permissions. I do not think docker could cause this problem. Like your Log says, PID is not or could not be created, so check there PID is defined and check permissions where it should be placed.
      Chaos is found in greatest abundance wherever order is being sought.
      It always defeats order, because it is better organized.
      Terry Pratchett

      The post was edited 3 times, last by riff-raff ().

    • Good Morning,

      thanks for your result. I guess the problem is that the folder var/run/calibre have no rights to get be written? How can I set up those rights? via Symlink? If yes how do I do that?

      EDIT: I tried to activate the Homefolder on SMB to access rights on it but got an error:

      Source Code

      1. Fehler #0:
      2. exception 'OMV\ConstraintException' with message 'Can't share user home directories because they are not enabled.' in /usr/share/openmediavault/engined/rpc/smb.inc:85
      3. Stack trace:
      4. #0 [internal function]: OMVRpcServiceSmb->setSettings(Array, Array)
      5. #1 /usr/share/php/openmediavault/rpc/serviceabstract.inc(124): call_user_func_array(Array, Array)
      6. #2 /usr/share/php/openmediavault/rpc/rpc.inc(86): OMV\Rpc\ServiceAbstract->callMethod('setSettings', Array, Array)
      7. #3 /usr/sbin/omv-engined(536): OMV\Rpc\Rpc::call('SMB', 'setSettings', Array, Array, 1)
      8. #4 {main}

      Regarding the SSH Tool I am using is "Termius" on Mac. It´s like the normal terminal and the box with blue background is midnight commander installed on OMV for file browsing
      Images
      • Bildschirmfoto 2018-01-11 um 09.29.43.png

        61.62 kB, 826×560, viewed 136 times
      Intel® Celeron® 420 Prozessor (1.6 GHz, 512 KB, L2 Cache)
      2GB DDr2 RAM
      OMV 3.0.94
      2x 3TB Seagate
      1x 2TB Hitachi
      1x 250GB Samsung (Main System OMV )

      The post was edited 1 time, last by Zeb Aztian ().

    • The write permission is set by the startup script, since its owned by 'calibre', service is started with user 'calibre'

      You could try to modify the ownership by hand

      Source Code

      1. chown -R calibre:users /var/run/calibre
      2. chmod 755 /var/run/calibre
      should look like this

      Source Code

      1. drwxr-xr-x 2 calibre users 60 Jan 11 10:10 calibre
      Chaos is found in greatest abundance wherever order is being sought.
      It always defeats order, because it is better organized.
      Terry Pratchett
    • Same Error...

      Source Code

      1. root@HomeServer:~# systemctl status calibre.service
      2. ● calibre.service - Calibre Service
      3. Loaded: loaded (/etc/systemd/system/calibre.service; disabled)
      4. Active: failed (Result: resources) since Do 2018-01-11 09:35:47 CET; 38s ago
      5. Process: 31367 ExecStart=/usr/bin/calibre-server --daemonize --username=calibre --port=9400 --pidfile=/var/run/calibre/calibre-server.pid --with-library=/srv/drive-by-label-Ext/Sonstiges/calibre (code=exited, status=0/SUCCESS)
      6. Process: 31361 ExecStartPre=/bin/chown -R calibre:users /var/run/calibre/ (code=exited, status=0/SUCCESS)
      7. Process: 31358 ExecStartPre=/bin/mkdir -p /var/run/calibre/ (code=exited, status=0/SUCCESS)
      8. Jan 11 09:35:23 HomeServer systemd[1]: Starting Calibre Service...
      9. Jan 11 09:35:47 HomeServer systemd[1]: PID file /var/run/calibre/calibre-server.pid not readable (yet?) after start.
      10. Jan 11 09:35:47 HomeServer systemd[1]: calibre.service never wrote its PID file. Failing.
      11. Jan 11 09:35:47 HomeServer systemd[1]: Failed to start Calibre Service.
      12. Jan 11 09:35:47 HomeServer systemd[1]: Unit calibre.service entered failed state.
      Display All



      Do you know what the "result: recources" means? ...

      How can I have a look at

      Source Code

      1. drwxr-xr-x 2 calibre users 60 Jan 11 10:10 calibre
      EDIT: I have disconnected the fuller HDD´s and got now by journalctl -xn the following error: Seems to have something to do with PLEX


      Source Code

      1. root@HomeServer:~# journalctl -xn
      2. -- Logs begin at Mi 2018-01-10 08:49:49 CET, end at Do 2018-01-11 09:46:39 CET. --
      3. Jan 11 09:46:16 HomeServer systemd[1]: Starting Plex Media Server for Linux...
      4. -- Subject: Unit plexmediaserver.service has begun with start-up
      5. -- Defined-By: systemd
      6. -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
      7. --
      8. -- Unit plexmediaserver.service has begun starting up.
      9. Jan 11 09:46:16 HomeServer systemd[1]: plexmediaserver.service start request repeated too quickly, refusing to start.
      10. Jan 11 09:46:16 HomeServer systemd[1]: Failed to start Plex Media Server for Linux.
      11. -- Subject: Unit plexmediaserver.service has failed
      12. -- Defined-By: systemd
      13. -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
      14. --
      15. -- Unit plexmediaserver.service has failed.
      16. --
      17. -- The result is failed.
      18. Jan 11 09:46:16 HomeServer systemd[1]: Unit plexmediaserver.service entered failed state.
      19. Jan 11 09:46:18 HomeServer systemd[1]: PID file /var/run/calibre/calibre-server.pid not readable (yet?) after start.
      20. Jan 11 09:46:18 HomeServer systemd[1]: Failed to start Calibre Service.
      21. -- Subject: Unit calibre.service has failed
      22. -- Defined-By: systemd
      23. -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
      24. --
      25. -- Unit calibre.service has failed.
      26. --
      27. -- The result is failed.
      28. Jan 11 09:46:18 HomeServer systemd[1]: Unit calibre.service entered failed state.
      29. Jan 11 09:46:38 HomeServer monit[1301]: 'HomeServer.local' loadavg(5min) of 8.4 matches resource limit [loadavg(5min)>1.0]
      30. Jan 11 09:46:38 HomeServer monit[1301]: 'HomeServer.local' loadavg(1min) of 6.8 matches resource limit [loadavg(1min)>2.0]
      Display All
      Intel® Celeron® 420 Prozessor (1.6 GHz, 512 KB, L2 Cache)
      2GB DDr2 RAM
      OMV 3.0.94
      2x 3TB Seagate
      1x 2TB Hitachi
      1x 250GB Samsung (Main System OMV )

      The post was edited 1 time, last by Zeb Aztian ().

    • 'resources' is just a generic error message that says task (start, stop, reload, etc.) can't be performed. (See systemd git)

      Is there enough space on your OMV-root drive to place a data like the PID file? What about the drive containing the library folder 'calibre'?

      Edit: Plex should not be involved, journalctl is your discrete logfile, the same you can access through web gui under protololl.

      Source Code

      1. systemctl status calibre.service
      gives you the required information.
      Chaos is found in greatest abundance wherever order is being sought.
      It always defeats order, because it is better organized.
      Terry Pratchett

      The post was edited 1 time, last by riff-raff ().

    • Did you try to dump calibre copletely including its configs and install it fresh?

      Source Code

      1. apt-get purge calibre
      2. apt-get remove calibre
      3. apt-get install calibre
      What format does your data drive have? EXT4?
      Chaos is found in greatest abundance wherever order is being sought.
      It always defeats order, because it is better organized.
      Terry Pratchett
    • I have now tried to remove and new install calibre

      received then the same error.

      I have now also set up OMV 3.0.94 inVMbox and got the same Error. i think it´s my fault or I am doing something wrong with the rights....

      All my drives are EXT4
      Intel® Celeron® 420 Prozessor (1.6 GHz, 512 KB, L2 Cache)
      2GB DDr2 RAM
      OMV 3.0.94
      2x 3TB Seagate
      1x 2TB Hitachi
      1x 250GB Samsung (Main System OMV )
    • You coppied the content of

      Source Code

      1. /etc/systemd/system/calibre.service


      with your ssh tool, maybe the error is due to faulty word wraps. Try to use another ssh tool, putty or macOS terminal (Utility -> Terminal).To connect to your server use:

      Source Code

      1. ssh ip-of-your-server -l root
      autentificate and do

      Source Code

      1. nano /etc/systemd/system/calibre.service
      place the required content there. I can't really think of anything else that could have been done wrong right now.


      Do not forget to adjust library path, check permissions or set them for user calibre within OMV web gui. Typ to aply them to subdirectories as well.
      Chaos is found in greatest abundance wherever order is being sought.
      It always defeats order, because it is better organized.
      Terry Pratchett

      The post was edited 1 time, last by riff-raff ().