|
|
Thread Tools | Search this Thread |
05-31-2014, 03:45 PM | #1 |
Enthusiast
Posts: 43
Karma: 10
Join Date: Aug 2013
Device: iPad
|
Problem starting calibre-server automatically at system startup (Mac)
My calibre library is on an external drive connected to my Mac mini server. I've created a plist file (for starting calibre-server) in /Library/LaunchDaemons. When I restart the server I'm expecting launchd to read the plist file and start calibre-server; however, for some reason I need to manually start calibre-server using "launchctl load calibre-server.plist" in Terminal. I'm suspecting that the external drive is not mounted when launchd processes the plist file and so the calibre-server startup fails. I'd like to hear from anyone who might be able to suggest a solution to this problem.
|
06-01-2014, 02:57 AM | #2 |
Ex-Helpdesk Junkie
Posts: 19,421
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Try mounting the drive as part of the startup job, to make sure it is accessible.
Or try starting a test library on the main drive to see if that's the problem. |
Advert | |
|
06-01-2014, 03:25 PM | #3 |
Enthusiast
Posts: 43
Karma: 10
Join Date: Aug 2013
Device: iPad
|
I tried starting a test library on my main drive and launchd didn't start the caliber server, so the problem is probably not with the mounting of the external drive. Manually starting the calibre server with the test library works.
I'm assuming that launchd looks at all the plist files in /Library/LaunchDaemons, and that I need do nothing more that put a plist file in that directory in order for it to be processed by launchd on system startup. So... I'm still having a problem with this. |
06-01-2014, 03:50 PM | #4 | ||
Ex-Helpdesk Junkie
Posts: 19,421
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Quote:
https://developer.apple.com/library/...72i-SW7-108425 Quote:
|
||
06-01-2014, 04:14 PM | #5 |
Enthusiast
Posts: 43
Karma: 10
Join Date: Aug 2013
Device: iPad
|
Thanks. Perhaps someone with Mac or Linux experience can offer some help.
I do notice a --daemonize parameter for calibre-server, and I haven't used that since I was assuming that Mac OS "daemonizes" calibre-server since that's its primary function. That brings into question the purpose of this parameter though. |
Advert | |
|
06-02-2014, 12:08 AM | #6 |
Connoisseur
Posts: 99
Karma: 280
Join Date: Nov 2010
Device: iPhone6, iPadMiniRetina, KindlePW3, KoboGloHD
|
paul55391: I replied to your message in the launchd thread saying the plist didn't work before I saw in this thread that you're also having problems. I was interested in using launchd since I wanted the calibre server to start on demand and then stop after a certain period of idle time, instead of always running as it does now. Maybe someone with more knowledge of launchd can help us out on either thread.
Currently I start the calibre server through a shell script I wrote in automator and saved as an application, which I then added to my login items. I've attached a screenshot of the shell script in automator if you want to try this. --daemonize causes the calibre server to run as a background process under OSX so it accomplishes the same thing as KeepAlive=true in the plist and should do what you are asking for. You will need to mount any external drive containing the calibre DB before the shell script runs. Which is why I keep my DB on the conent server's hard drive. |
06-02-2014, 10:14 PM | #7 |
Enthusiast
Posts: 43
Karma: 10
Join Date: Aug 2013
Device: iPad
|
I'm trying to start up the calibre content server to make my library available in the internet. I don't want to require that I'm logged into an account on the server. I just want to start the calibre content server as a daemon when the system is booted. I understand what you did though.
|
06-05-2014, 05:51 PM | #8 | ||
Enthusiast
Posts: 43
Karma: 10
Join Date: Aug 2013
Device: iPad
|
I've figured out how to start up 2 calibre content servers for 2 libraries that are on my Mac mini server. I created 2 plist files and placed them in /Library/LaunchDaemons/. The ownership for the files needs to be set to root:wheel using 2 commands:
sudo chown root:wheel local.calibre_server_8080.plist sudo chown root:wheel local.calibre_server_8081.plist One plist file contains: Quote:
Quote:
Last edited by paul55391; 06-05-2014 at 11:01 PM. Reason: adjust password |
||
06-05-2014, 09:45 PM | #9 |
Connoisseur
Posts: 99
Karma: 280
Join Date: Nov 2010
Device: iPhone6, iPadMiniRetina, KindlePW3, KoboGloHD
|
Nice! I'll definitely give this a try this weekend.
|
06-05-2014, 11:00 PM | #10 |
Enthusiast
Posts: 43
Karma: 10
Join Date: Aug 2013
Device: iPad
|
Sorry, but although I thought it was working, I now discover that the calibre content server hangs after a while. I have been testing it using my iPad and my MacBook Pro. So, there's either a problem with the content server or I need to do more to get it working reliably.
If anyone have some suggestions, please chime in. |
06-06-2014, 01:24 AM | #11 |
Ex-Helpdesk Junkie
Posts: 19,421
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Instead of using "[QUOTE]the quote[/QUOTE]" tags, use "[CODE]the code[/CODE]" to get proper tabbing.
|
06-06-2014, 08:11 PM | #12 | |
Connoisseur
Posts: 99
Karma: 280
Join Date: Nov 2010
Device: iPhone6, iPadMiniRetina, KindlePW3, KoboGloHD
|
Quote:
|
|
06-07-2014, 11:48 AM | #13 |
Enthusiast
Posts: 43
Karma: 10
Join Date: Aug 2013
Device: iPad
|
I removed the timeout line. Because I have a fairly large number of books, you may be right that I set the timeout too low. Thanks.
|
04-03-2015, 12:52 AM | #14 |
Enthusiast
Posts: 43
Karma: 10
Join Date: Aug 2013
Device: iPad
|
Trying to run calibre content server as daemon on Mac
I reinstalled my Mac home server and have discovered that the calibre-server can no longer be started as a daemon using the plist files I posted on this thread. Monitoring the system log file I see a bunch of messages that indicate attempts to write to a display, and I don't think this should be happening.
Anyone out there who can offer some help on this? |
04-03-2015, 12:56 AM | #15 |
creator of calibre
Posts: 44,560
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Change the path of the server to
/Applications/calibre.app/Contents/console.app/Contents/MacOS/calibre-server And what error messages are you seeing in the log? |
Tags |
calibre-server, launchd, mac os |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
A Howto: Running Calibre Content server on Windows Startup | sherman | Calibre | 26 | 02-17-2019 11:37 PM |
Calibre server not starting | john_es | Library Management | 0 | 02-02-2013 07:16 AM |
Startup Calibre-server on windows 7 x64 profesional | roadrunnerm | Calibre | 0 | 10-19-2012 05:18 AM |
Automatic startup of calibre-server on Windows | zzmijarevic | Calibre | 17 | 04-02-2012 05:26 AM |
Latest version of calibre crashes on startup on Mac | alvareo | Devices | 4 | 12-23-2011 01:34 AM |