09-07-2016, 09:52 AM | #1 |
Junior Member
Posts: 8
Karma: 10
Join Date: Sep 2016
Device: kindle paperwhite
|
ubuntu calibre server on xenial 16.04
Ubuntu 16.04 uses a system called systemd instead of upstart. You need to follow these directions to make it work.
===============old post==================== I'm getting some errors when running my calibre server after upgrading from ubuntu 14.04 to 16.04 I think it has something to do with my failed attempt at installing via calibre apt-get vs using the method described on both the calibre page, and that nice digital ocean howto. Anyhow, I can get the calibre server running great with the direct command Code:
sudo calibre-server --port 8081 --with-library /media/Backup/calibre Code:
sudo start calibre-server start: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused I did create the conf file in /etc/init/calibre-server.conf, but I don't think the sudo start calibre-server looks at that conf file. I did notice that as soon as I ran the sudo start calibre-server, it created a bunch of files in ~/.config/calibre global.py plugins server_error_log.txt metadata_sources server_access_log.txt tweaks.py But global.py doesn't have PORT settings in it. It's got some other stuff, but I feel that I'm going down the wrong rabbit hole here. any help would be great! Last edited by mrdrew; 09-07-2016 at 06:19 PM. |
09-07-2016, 10:01 AM | #2 |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
So, what is the contents of your upstart unit file?
Also, is it calibre_server or calibre-server? You are probably starting a different service than the one you think you are. (Maybe something installed by a distro package?) |
Advert | |
|
09-07-2016, 10:28 AM | #3 |
Junior Member
Posts: 8
Karma: 10
Join Date: Sep 2016
Device: kindle paperwhite
|
The upstart file in /etc/init/calibre-server.conf
http://pastebin.com/qKHdhTp1 I'm sure it's calibre-server, not the underscore version. which calibre_server returns nothing, whereas calibre-server returns the correct location. good ideas! thanks for the quick response. |
09-07-2016, 12:53 PM | #4 |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Okay, so that must have been a typo in your OP.
It looks fine to me -- maybe a Ubuntu user who groks Upstart can tell what is wrong, but I am out of ideas. (Arch Linux uses systemd.) P.S. The `which` command doesn't find initsystem units, it finds executables in your $PATH. |
09-07-2016, 05:51 PM | #5 |
Junior Member
Posts: 8
Karma: 10
Join Date: Sep 2016
Device: kindle paperwhite
|
|
Advert | |
|
09-07-2016, 06:01 PM | #6 |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Wait a minute. Didn't Ubuntu 16.04 switch from Upstart to systemd? (If so, an Upstart tutorial will absolutely not work. )
Although I am not sure why it would be installed if it is not used for init... maybe dist-upgrade just isn't smart enough to properly clean up? |
09-07-2016, 06:03 PM | #7 |
Junior Member
Posts: 8
Karma: 10
Join Date: Sep 2016
Device: kindle paperwhite
|
Last edited by mrdrew; 09-07-2016 at 06:18 PM. |
09-08-2016, 11:59 AM | #8 |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Happy to help.
FWIW, I use the following systemd service unit: Code:
[eschwartz@arch ~]$ cat ~/.config/systemd/user/calibre-server@.service [Unit] Description=Main calibre server After=network.target [Service] EnvironmentFile=/%h/.config/calibre/servers/%i.conf ExecStart=/usr/bin/calibre-server \ --port="${port}" \ --with-library "${path}" \ --restriction "${restriction}" \ --user "${user}" \ --pass "${pass}" [Install] WantedBy=default.target It also makes use of systemd variables (see `man systemd.unit` under SPECIFIERS), and is written as a template in order to make use of server configuration files to run multiple instances using the same unit file. PIDFile is NOT needed, except for services that MUST run as a "forking"-type service -- the PIDFile lets it track the lifetime of the program, but calibre does not require running as a forking service... this (avoiding a PIDFile in some cases) is one of the improvements of systemd. --daemonize and --pidfile exist for other init systems that need to fork. But if you were to use a PIDFile, you would of course want to use the systemd specifier that lets you choose the right runtime directory instead of struggling with inane permissions issues like that guide described. The server config file looks like this: Code:
[eschwartz@vostro ~]$ cat ~/.config/calibre/servers/servername.conf port="8080" path="/path/to/Calibre Library" restriction="some restriction" user="server username" pass="server password" |
Tags |
16.04, server, ubuntu, xenial |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Can't start calibre-server on Linux (ubuntu) | Awfki | Calibre | 5 | 08-19-2015 10:54 PM |
Calibre on ubuntu server | tdw197 | Calibre | 24 | 01-19-2011 07:48 AM |
Calibre crashes X server (Ubuntu 10.10) | mfabry | Calibre | 9 | 10-15-2010 04:12 PM |
Calibre Content Server error in Ubuntu 10.10 | Bodman456 | Calibre | 1 | 07-07-2010 03:26 PM |
Calibre RuntimeError on Ubuntu 8.04 Server | alexbt | Calibre | 3 | 10-13-2009 04:26 AM |