|
![]() |
|
Thread Tools | Search this Thread |
![]() |
#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.
|
![]() |
![]() |
![]() |
#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 | |
|
![]() |
#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. |
![]() |
![]() |
![]() |
#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:
|
||
![]() |
![]() |
![]() |
#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 | |
|
![]() |
#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.
![]() 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. |
![]() |
![]() |
![]() |
#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.
|
![]() |
![]() |
![]() |
#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 10:01 PM. Reason: adjust password |
||
![]() |
![]() |
![]() |
#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.
|
![]() |
![]() |
![]() |
#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. |
![]() |
![]() |
![]() |
#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.
|
![]() |
![]() |
![]() |
#12 | |
Connoisseur
![]() ![]() ![]() Posts: 99
Karma: 280
Join Date: Nov 2010
Device: iPhone6, iPadMiniRetina, KindlePW3, KoboGloHD
|
Quote:
|
|
![]() |
![]() |
![]() |
#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.
|
![]() |
![]() |
![]() |
#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? |
![]() |
![]() |
![]() |
#15 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 44,269
Karma: 23661992
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 |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
A Howto: Running Calibre Content server on Windows Startup | sherman | Calibre | 26 | 02-17-2019 10:37 PM |
Calibre server not starting | john_es | Library Management | 0 | 02-02-2013 06:16 AM |
Startup Calibre-server on windows 7 x64 profesional | roadrunnerm | Calibre | 0 | 10-19-2012 04:18 AM |
Automatic startup of calibre-server on Windows | zzmijarevic | Calibre | 17 | 04-02-2012 04:26 AM |
Latest version of calibre crashes on startup on Mac | alvareo | Devices | 4 | 12-23-2011 12:34 AM |