Mobileread
calibre-server not working
#1  mrowz 10-17-2017, 11:15 AM
I'm trying to set up calibre-server on linux.

When I try to access it first it says:

Quote
Loading, please waitÂ…
You can also use a simple, non-javascript version of this site: here
Then it times out and gives:

Quote
Failed to communicate with "/interface-data/init?1508249069030", timed out after: 30 seconds
The non-javascript version doesn't return anything.

My log shows entries like:

Code
67.180.60.11 port-57429 - 17/Oct/2017:14:00:25 +0000 "GET /calibre.appcache HTTP/1.1" 304 135
67.180.60.11 port-57429 - 17/Oct/2017:14:00:25 +0000 "GET /auto-reload-port?1508248826092 HTTP/1.1" 200 287
67.180.60.11 port-57431 - 17/Oct/2017:14:00:25 +0000 "GET /allow-console-print?1508248826092 HTTP/1.1" 200 287
67.180.60.11 port-57428 - 17/Oct/2017:14:02:38 +0000 "GET /interface-data/init?1508248826110 HTTP/1.1" 408 148
67.180.60.11 port-57399 - 17/Oct/2017:14:02:38 +0000 "GET /mobile HTTP/1.1" 408 148
67.180.60.11 port-57429 - 17/Oct/2017:14:02:38 +0000 "" 408 129
67.180.60.11 port-57431 - 17/Oct/2017:14:02:38 +0000 "" 408 129
67.180.60.11 port-58031 - 17/Oct/2017:14:02:38 +0000 "GET /favicon.ico HTTP/1.1" 404 123
67.180.60.11 port-58031 - 17/Oct/2017:14:04:28 +0000 "GET /calibre.appcache HTTP/1.1" 304 135
67.180.60.11 port-58031 - 17/Oct/2017:14:04:28 +0000 "GET /auto-reload-port?1508249069014 HTTP/1.1" 200 287
67.180.60.11 port-58477 - 17/Oct/2017:14:04:28 +0000 "GET /allow-console-print?1508249069014 HTTP/1.1" 200 287
67.180.60.11 port-58031 - 17/Oct/2017:14:07:31 +0000 "" 408 129
67.180.60.11 port-58477 - 17/Oct/2017:14:07:31 +0000 "GET /mobile HTTP/1.1" 408 148
67.180.60.11 port-58479 - 17/Oct/2017:14:07:31 +0000 "GET /interface-data/init?1508249069030 HTTP/1.1" 408 148
67.180.60.11 port-59276 - 17/Oct/2017:14:09:31 +0000 "GET /mobile HTTP/1.1" 408 148
67.180.60.11 port-61041 - 17/Oct/2017:14:13:52 +0000 "GET /calibre.appcache HTTP/1.1" 304 135
67.180.60.11 port-61041 - 17/Oct/2017:14:13:52 +0000 "GET /auto-reload-port?1508249633271 HTTP/1.1" 200 287
67.180.60.11 port-61044 - 17/Oct/2017:14:13:52 +0000 "GET /allow-console-print?1508249633271 HTTP/1.1" 200 287
Any help?
Reply 

#2  gbm 10-17-2017, 11:44 AM
What Linux distro version, Browser and what version of calibre?


bernie
Reply 

#3  mrowz 10-17-2017, 11:52 AM
It's calibre-server 3.9 running on CentOS 7. I was using Chrome but since you asked about browser I also tried it on Safari and Firefox, all had the same issue.
Reply 

#4  kovidgoyal 10-17-2017, 01:32 PM
Those are timeouts, basically the client and the server failed to talk to each other after the intial contact. There is no way to know what is preventing them from talking, so you start by simplifying your server deployment as much as possible. Run just

Code
calibre-server
in a terminal and try connecting to it using curl

curl http://127.0.0.1:8080/mobile

if that works then try the above in a browser, if that works then remove the /mobile bit and see if it still works and then try adding more complications to your server invocation.

And if you have iptables running turn it off for the testing.
Reply 

#5  mrowz 10-18-2017, 07:43 AM
For some reason the server was working when I got up today (go figure).

Next problem, getting it to work in MapleRead. When I try to access the full site it gives the same timeout error and says "Error: Invalid OPDS catalog" at the top.

When I try the /mobile version it gives a list of books, no thumbnails or other images, and also says "Error: Invalid OPDS catalog" at the top. I also can't seem to access any of the books listed. Tapping the epub links does nothing, the Next and Last links do nothing.

Just to test I tried it on Marvin also, which returns "Oops The feed is invalid." for both regular and /mobile URLs.
Reply 

#6  chaley 10-18-2017, 07:56 AM
FWIW: assuming that the server is actually serving, that is that you see XML in a browser when you go to the OPDS feed, the feed works fine in Calibre Companion.

My guess is that some apps cannot handle the query string arguments that calibre 3 puts on OPDS URLs.
Reply 

#7  mrowz 10-18-2017, 10:11 PM
Ahh... so I would use CC to get & manage books from the content server, and then open them on my device in any reader I like?

Will the read position syncing across devices e.g. in MapleRead still work?
Reply 

#8  chaley 10-19-2017, 06:43 AM
Quote mrowz
Ahh... so I would use CC to get & manage books from the content server, and then open them on my device in any reader I like?
In theory, yes. I am the developer of Android CC (I don't own any Apple hardware) so I can't pontificate about "any reader". I know from comments in the CC forum that it works with lots of reader apps.
Quote
Will the read position syncing across devices e.g. in MapleRead still work?
Short answer: I don't know.

Longer answer: this depends on how the reader app matches books on different devices when syncing. On iOS, Apple says that CC cannot hand a book file name to a reader app. Instead CC hands the entire file (contents) to the app, which stores it however it does. If a) the app uses some filename as the sync ID and b) picks some random name when a book is handed to it, then I would expect syncing to be problematic. If instead it syncs using some internal algorithm based on metadata or uses the base file name CC hands it then I would expect sync to work. It also could be that the app syncs by moving the book into cloud storage. That should work with books handed over by CC.

One experiment that might answer the question: put a book into Dropbox (or some cloud provider), use the cloud app to "Send the book to *reader app*", then see how the reader app syncs. AFAIK iOS CC "Sends the book" so it should behave in the same way.

If this is important to you then I suggest you post the question in the CC forum. Some iOS user should be able to shed light on how specific reader apps behave.
Reply 

#9  mrowz 10-19-2017, 01:46 PM
Thanks very much!
Reply 

#10  JP91306 07-18-2018, 05:00 PM
I spent a lot of frustrating time trying to get the Server system to connect to my portable devices...and FINALLY found a solution that appears to work more often than it does not.

IF, like me, you have several possible connections to your router (i:e: Homerouter24 and Homerouter5 and Homerouter Guest)....and...if connections to these services are available to all the devices....as available....

BE SURE that both the server machine and the iPad, Kindle, iPhone, etc., are connecting to the SAME one. It doesn't seem to matter which, they just all have to be the same. So disconnect, and reconnect to the same service that the Server machine is using.

Maybe this should be obvious to everyone (but me), but it wasn't.

I mistakenly assumed that the router would allow connections from the "low" or "highspeed" services to each other. At least with my T-link router, it does NOT.

As soon as I got all the devices on the same connections it all worked, and if I switched everything to the other connections...it still worked....as long as each device used the same connections as the Server. My server machine seemed to prefer the "highspeed" connection...and the devices seemed to prefer the slower one.

Please understand that I just barely "get" the whole router/connection/server system, and the people who REALLY understand it can probably express this better.

I hope this can help someone.

jp
Reply 

Today's Posts | Search this Thread | Login | Register