04-11-2018, 10:05 AM | #1 |
Enthusiast
Posts: 38
Karma: 10
Join Date: Apr 2018
Device: iphone
|
"kicking" calibre to wake it up required?
Posted this to the Calibre Companion section but no bites. So thought I would try it here.
We have Calibre set up on a headless Mac mini in our house and have the content server and wireless device connections active. We access it from our iOS devices via calibre companion remotely as a wireless device with no problem but... If the Mac mini has not been used for a while and we try to access the following happens: Calibre companion searches for calibre, says it is synching but waiting on calibre...and just sits there waiting...and waiting. It will not finish the synching until I access the Mac mini remotely to even just look at the lock screen. Then it proceeds and finishes up fine. Any ideas why calibre companion isn't able to give it the final kick or why the wireless device connection requires some additional user action? The Mac mini is set not to sleep and the process does seem to find the server, it just can't get all the way through. |
04-11-2018, 10:12 AM | #2 |
creator of calibre
Posts: 43,850
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Are you able to access the server using a browser? What do the server logs say?
|
Advert | |
|
04-11-2018, 10:31 AM | #3 |
Enthusiast
Posts: 38
Karma: 10
Join Date: Apr 2018
Device: iphone
|
Good question! When I tried to access from browser it said:
Loading, please wait… You can also use a simple, non-javascript version of this site: here and then gave me: Failed to communicate with "/interface-data/init?1523456722000", timed out after: 60 seconds Note...I run Mac OSX server on the mini to use its vpn capability and that connects and initiates no problem. Where would be the best place to find the relevant log? |
04-11-2018, 10:33 AM | #4 |
creator of calibre
Posts: 43,850
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
If the browser is also failing to connect then the mini is putting the server process to sleep. I'm not a mac user so I cant help you with figuring out how to prevent it from doing that, probably need to add an exception for it to the power saving rules or somesuch. The server logs are avalable from Preferences->Sharing over the net but if the process is being put to sleep there wont be anything in the logs either.
|
04-11-2018, 10:46 AM | #5 | |
Enthusiast
Posts: 38
Karma: 10
Join Date: Apr 2018
Device: iphone
|
Quote:
Let me give it some time to retry when I get back later today. |
|
Advert | |
|
04-11-2018, 04:15 PM | #6 |
Enthusiast
Posts: 38
Karma: 10
Join Date: Apr 2018
Device: iphone
|
Welp. It cleared itself up. Reboot maybe?
Thanks for the reply. |
04-11-2018, 08:08 PM | #7 |
Enthusiast
Posts: 38
Karma: 10
Join Date: Apr 2018
Device: iphone
|
OK. It has started again. I *can* access the content server via a web browser.
However, the wireless device connection is not making full connection. As soon as I login to see what is going on via VPN, the connection continues. I did notice that the icon for Calibre was bouncing in the dock (a Mac alert to look at an app...could that be causing the wireless connection server to pause waiting for that alert to be acted on?--added, no, turned off bouncing via terminal and see log below.) I see the log for the content server but not for the wireless device service. Last edited by jehrler; 04-11-2018 at 08:27 PM. |
04-11-2018, 08:25 PM | #8 |
Enthusiast
Posts: 38
Karma: 10
Join Date: Apr 2018
Device: iphone
|
I used the calibre companion debug to get some log info from that side. At 19:17 began trying to connect using calibre companion via wireless device. At 19:20, while cc was still "waiting for calibre" I accessed the content server via web browser.
At 19:21 I used vpn to connect to the Mac mini but didn't log in. CC immediately connected as wireless device. Here is the debug log from calibre companion: Spoiler:
Last edited by BetterRed; 04-11-2018 at 09:27 PM. Reason: inset spoiler tags |
04-11-2018, 08:37 PM | #9 |
Enthusiast
Posts: 38
Karma: 10
Join Date: Apr 2018
Device: iphone
|
Here are the server logs from calibre:
Error log: calibre server listening on 0.0.0.0:26279 OPDS feeds advertised via BonJour at: 192.168.0.52 port: 26279 Access log: Spoiler:
Last edited by BetterRed; 04-11-2018 at 09:29 PM. Reason: inset spoiler tags |
04-11-2018, 10:33 PM | #10 |
creator of calibre
Posts: 43,850
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
I'm afraid I can't help you with CC issues as I know nothing about it, sorry. You'll have to ask in the CC forum.
|
04-12-2018, 04:32 AM | #11 |
Enthusiast
Posts: 38
Karma: 10
Join Date: Apr 2018
Device: iphone
|
Posted the above log to the Calibre companion area and here is their reply:
don't own a Mac so any opinion I have is suspect, but it does seem clear that something in the Mini is "sleeping". What I see from that log: Calibre is awake enough to respond to CC's connection request. Calibre starts the sequence of "jobs" to actually connect. Calibre sends several "commands" to CC, and CC successfully responds. Calibre successfully sends CC a command with information about the calibre library. Calibre does not receive CC's reply to the library info command until the Mini is "tickled". From CC's point of view, calibre went away in the middle of processing the library information command, then came back. I don't see any obvious reason why calibre would pause after sending that command. The networking for that step is exactly the same as what happened successfully in previous steps. One possibility is that the calibre GUI is being blocked. If this happened then the wireless device networking thread would also be blocked. Various GUI things do happen during connection and CC does continue once the GUI is awakened, so there might be something here. Getting a calibre debug log might help because it will show what calibre thinks is happening. This FAQ answer explains how to get that log. __________________ Charles Haley Use Calibre Companion to connect your An |
04-12-2018, 05:11 AM | #12 |
Enthusiast
Posts: 38
Karma: 10
Join Date: Apr 2018
Device: iphone
|
attached is the calibre debug file from a connection where calibre stalled
Last edited by jehrler; 04-12-2018 at 05:56 AM. |
04-12-2018, 07:05 AM | #13 |
creator of calibre
Posts: 43,850
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Post the debug log in the CC forum, the developer of CC is also the developer of the smart device driver in calibre, so he is the best person to make sense of it.
|
04-12-2018, 07:22 AM | #14 |
Grand Sorcerer
Posts: 11,739
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
---- (Duplicating what I said in the CC forum)
There was a 2.5 minute pause at the point just after the device was detected (CC connected and exchanged network traffic with calibre) and before calibre asks CC if it has appropriate memory. When the pause happens calibre is informing its GUI and any interested plugins that a device has connected. CC is waiting for calibre at that point and cannot be involved in the pause. This sequence demonstrates that the problem is in the Mini. It argues that something on the Mini is preventing the calibre GUI (or something connected to the GUI such as some kind of tray notifier) from running. I have no idea what that "something" might be, nor do I have any idea whether there is some setting that affects it. FWIW: it seems that this "pause" is at a different place than the one indicated by the CC debug log. If that is indeed the case then whatever is happening on the Mini doesn't consistently happen at the same time. ---- (End of duplicated text) Kovid: One reason that the content server might not "pause" when the wireless device does is that the CS doesn't run on/interact with the GUI thread. |
04-12-2018, 08:19 AM | #15 |
creator of calibre
Posts: 43,850
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Notifications on macOS happen via separate process asynchronously, so they cant cause pauses. I cant think of anything else that could cause a pause that would affect only the GUI thread and not any other threads. But I agree the issue is likely in the mini, as I suggested before the place to look is the power settings.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
"kicking" calibre to wake it up required? | jehrler | Calibre Companion | 7 | 04-12-2018 01:37 PM |
Generic "Sending to Device" template not kicking in on Folder Device | At_Libitum | Library Management | 2 | 11-01-2013 07:12 AM |
Checking for required libs. Exporting Binaries "easily" | twobob | Kindle Developer's Corner | 28 | 10-13-2013 10:57 PM |
"White Spaces Are Required"...PLEASE HELP! | UntreedReads | ePub | 12 | 07-22-2010 03:47 PM |
PDF "Kicking" iliad | Havard | iRex | 1 | 10-24-2009 10:34 AM |