Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 06-22-2017, 05:00 AM   #1
aCIDsLAM
Enthusiast
aCIDsLAM began at the beginning.
 
Posts: 28
Karma: 10
Join Date: Oct 2016
Device: Xiaomi MI Pad 1, LineageOS14.1
Calibre with SSL, Content Server not loading

Hello, i really like the SSL Feature and its working like it should,
using the https://calibreFQDN:8080/opds URL for external Reader APPS or in the Webbrowser

But using the Main Url the Content Server gets stuck and doesnt load the preview images anymore. Gets timeouts, just shows the book title without picture preview or stopps completly with this message:

Failed to communicate with "interface-data/more-books?library_id=Calibre-Bibliothek", timed out after: 30 seconds

The CPU Load is really low and should be the cause, also the harddisk i/o should. The content server works fine, without ssl.

I tried to set the work count parameter but didnt notice any difference.
aCIDsLAM is offline   Reply With Quote
Old 06-22-2017, 07:57 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,863
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Are you using a valid certificate or a self signed one? It might be that the browser is blocking access when using a self signed one. Check if you can load

/interface-data/more-books

using curl or another command line tool.
kovidgoyal is online now   Reply With Quote
Advert
Old 06-22-2017, 09:02 AM   #3
aCIDsLAM
Enthusiast
aCIDsLAM began at the beginning.
 
Posts: 28
Karma: 10
Join Date: Oct 2016
Device: Xiaomi MI Pad 1, LineageOS14.1
Quote:
Originally Posted by kovidgoyal View Post
Are you using a valid certificate or a self signed one? It might be that the browser is blocking access when using a self signed one. Check if you can load

/interface-data/more-books

using curl or another command line tool.
Its a valid ceftificate so no blocking.
curl gave me this, without auth enabled:
Invalid query: No JSON object could be decoded

I must say, i tried a stresstest through the opds view/link.
It is more stable but after a while it also stops working. The server stops to respond and i cant load the next page. I have to relogin/auth and start again from the beginng.

The same like the main web view, just it takes longer until i get problems.

SOmetimes when the preview fails, i get the picture of the book clicking on it. Sometimes it fails all together. After a while (2-3 Pages) i cant load the next page and get stuck and have to relogin in too.

It seems to me, like it gets worse with every page. The first page shows 80 %, the next one 30 and the last one maybe only one working

While browsing i also got these two. DOnt know if they help:
Uncaught TypeError: Cannot read property 'firstChild' of null
Error at https://calibre.FQDN:8080/:19495:21
Traceback (most recent call last):
at ct_impl (https://calibre.FQDN:8080/:7016:26)
at HTMLDivElement.check_for_books_loaded (https://calibre.FQDN:8080/:19666:13)
at create_books_list (https://calibre.FQDN:8080/:19616:13)
at abort_get_more_books (https://calibre.FQDN:8080/:19505:52)
at XMLHttpRequest.ρσ_anonfunc (https://calibre.FQDN:8080/:4864:21)
at complete_callback (https://calibre.FQDN:8080/:4853:17)
at got_more_books (https://calibre.FQDN:8080/:19522:13)
at update_fetching_status (https://calibre.FQDN:8080/:19495:21)
TypeError: Cannot read property 'firstChild' of null

TypeError: more is null
Error at https://calibre.FQDN:8080/:19495:17

Console output sometimes throws this. Dont know, if its related:
QObject::startTimer: Timers can only be used with threads started with QThread

To mention again, i dont have this problems when it runs encrypted.
aCIDsLAM is offline   Reply With Quote
Old 06-22-2017, 10:11 AM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,863
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by aCIDsLAM View Post

To mention again, i dont have this problems when it runs encrypted.

I'm confused are you saying you have this problem when running with SSL or dont have it when running with SSL?
kovidgoyal is online now   Reply With Quote
Old 06-22-2017, 10:50 AM   #5
aCIDsLAM
Enthusiast
aCIDsLAM began at the beginning.
 
Posts: 28
Karma: 10
Join Date: Oct 2016
Device: Xiaomi MI Pad 1, LineageOS14.1
Quote:
Originally Posted by kovidgoyal View Post
I'm confused are you saying you have this problem when running with SSL or dont have it when running with SSL?
Sorry. that was a typo. I mean i dont have the problems, when its unencrypted. Only when its encrypted, using the ssl cert.
aCIDsLAM is offline   Reply With Quote
Advert
Old 06-22-2017, 11:53 AM   #6
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,863
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
I found a bug with SSL on linux/macOS https://github.com/kovidgoyal/calibr...c4e23caf38254d

So it should be fixed in the next release assuming you are running the server on one of those OSes.
kovidgoyal is online now   Reply With Quote
Old 06-22-2017, 01:27 PM   #7
aCIDsLAM
Enthusiast
aCIDsLAM began at the beginning.
 
Posts: 28
Karma: 10
Join Date: Oct 2016
Device: Xiaomi MI Pad 1, LineageOS14.1
Quote:
Originally Posted by kovidgoyal View Post
I found a bug with SSL on linux/macOS https://github.com/kovidgoyal/calibr...c4e23caf38254d

So it should be fixed in the next release assuming you are running the server on one of those OSes.


No, Windows Server 2016 Core Server (Without GUI) and no opelgl.dll
But nice, that it helped you, to find a bug.
aCIDsLAM is offline   Reply With Quote
Old 06-22-2017, 01:51 PM   #8
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,863
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Check in the server log if there are any errors. You can use --log and --access-log to specify paths to error and access logs respectively
kovidgoyal is online now   Reply With Quote
Old 06-22-2017, 04:30 PM   #9
aCIDsLAM
Enthusiast
aCIDsLAM began at the beginning.
 
Posts: 28
Karma: 10
Join Date: Oct 2016
Device: Xiaomi MI Pad 1, LineageOS14.1
Quote:
Originally Posted by kovidgoyal View Post
Check in the server log if there are any errors. You can use --log and --access-log to specify paths to error and access logs respectively

There you go.
Attached Files
File Type: txt calibrelog.txt (723 Bytes, 177 views)
File Type: txt caccess.txt (7.7 KB, 206 views)
aCIDsLAM is offline   Reply With Quote
Old 06-22-2017, 10:34 PM   #10
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,863
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
This should take care of it: https://github.com/kovidgoyal/calibr...33279677a390a9
kovidgoyal is online now   Reply With Quote
Old 06-23-2017, 02:00 AM   #11
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,863
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Actually, my fix was incorrect, this is the correct fix:
https://github.com/kovidgoyal/calibr...86efe754de85a2

so you will have to wait for 3.2
kovidgoyal is online now   Reply With Quote
Old 06-23-2017, 03:08 AM   #12
aCIDsLAM
Enthusiast
aCIDsLAM began at the beginning.
 
Posts: 28
Karma: 10
Join Date: Oct 2016
Device: Xiaomi MI Pad 1, LineageOS14.1
Quote:
Originally Posted by kovidgoyal View Post
Actually, my fix was incorrect, this is the correct fix:
https://github.com/kovidgoyal/calibr...86efe754de85a2

so you will have to wait for 3.2
Ok, no problem. Im glad, you found the problem
aCIDsLAM is offline   Reply With Quote
Old 06-24-2017, 06:34 AM   #13
aCIDsLAM
Enthusiast
aCIDsLAM began at the beginning.
 
Posts: 28
Karma: 10
Join Date: Oct 2016
Device: Xiaomi MI Pad 1, LineageOS14.1
Quote:
Originally Posted by kovidgoyal View Post
Actually, my fix was incorrect, this is the correct fix:
https://github.com/kovidgoyal/calibr...86efe754de85a2

so you will have to wait for 3.2
If you included it in 3.1.1, i must say the problem sill seems to exist and i have to capture futher logs maybe.
aCIDsLAM is offline   Reply With Quote
Old 06-24-2017, 08:03 AM   #14
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,863
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Yes it is included. If the problem is stil happening then more server logs are needed.
kovidgoyal is online now   Reply With Quote
Old 06-25-2017, 05:01 PM   #15
aCIDsLAM
Enthusiast
aCIDsLAM began at the beginning.
 
Posts: 28
Karma: 10
Join Date: Oct 2016
Device: Xiaomi MI Pad 1, LineageOS14.1
Quote:
Originally Posted by kovidgoyal View Post
Yes it is included. If the problem is stil happening then more server logs are needed.


I ran it quite a while with the --log switch, i still get the same problems data not loading (next books, preview images) and
"Failed to communicate with "/interface-data/more-books?library_id=Calibre-Bibliothek", timed out after: 30 seconds" errors but the only entrys i get, are not from me, some port scan access from the Internet, you see below

Is there more i can do?

Unhandled exception in state: State: do_ssl_handshake Client: 46.174.191.32:32744 Request: WebSocketConnection
Traceback (most recent call last):
File "site-packages\calibre\srv\loop.py", line 536, in tick
File "site-packages\calibre\srv\loop.py", line 177, in do_ssl_handshake
SSLError: [SSL: HTTP_REQUEST] http request (_ssl.c:590)

calibre server listening on 0.0.0.0:8080
Unhandled exception in state: State: do_ssl_handshake Client: 60.191.38.77:2559 Request: WebSocketConnection
Traceback (most recent call last):
File "site-packages\calibre\srv\loop.py", line 536, in tick
File "site-packages\calibre\srv\loop.py", line 177, in do_ssl_handshake
SSLError: [SSL: HTTP_REQUEST] http request (_ssl.c:590)
aCIDsLAM is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calibre 3.0 Content Server Perpetual Loading Please Wait skipster10 Calibre 3 06-16-2017 12:35 PM
calibre-server on vps alongside apache with ssl g33kdad Related Tools 2 01-01-2016 12:09 AM
Calibre Content Server and Windows Home Server 2011 HughMcC Calibre 8 10-01-2014 07:26 AM
500 Internal Server Error accessing content server Calibre 0.8.8 DaddyO57 Calibre 1 07-20-2012 06:08 PM
SSL and content server timoco Calibre 2 04-13-2011 10:42 AM


All times are GMT -4. The time now is 12:36 AM.


MobileRead.com is a privately owned, operated and funded community.