Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Server

Notices

Reply
 
Thread Tools Search this Thread
Old 07-13-2020, 02:45 PM   #1
Dibarcus
Junior Member
Dibarcus began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jul 2020
Device: iOS
Viewer problem running behind Apache

I've been running calibre-server 4.20 behind Apache using digest authentication with no problems. But I wanted the sync feature to work so I got rid of digest authentication and setup the calibre user database. Now I'm having trouble with the Viewer webapp. I've cleared the browser cache, credentials, etc but the problem persists.

All catalog browsing functions appear to work and downloading always works, but when a book is selected and "Read" is pressed, I see this error error in the browser: (firefox)

Code:
Could not download book
Could not open MyBook. Failed to download some book data, click "Show details" for more information
Details:

Code:
OEBPS/Text/vde31.05.xhtml
Failed to communicate with "/book-file/827/EPUB/789472/15944457100/OEBPS/Text%2Fvde31.05.xhtml? library_id=Calibre_Library&1594651600287", with status: [400 (error)] Bad Request
The uri in the Request Line and the Authorization header do not match

From the system log

Code:
server calibre-server[1636444]: Authorization URI mismatch: 

(u'book-file', u'827', u'EPUB', u'789472', u'15944457100', u'OEBPS', u'Text', u'vde31.05.xhtml') 
!= 
(u'book-file', u'827', u'EPUB', u'789472', u'15944457100', u'OEBPS', u'Text/vde31.05.xhtml') 

from client: 127.0.0.1
Calibre server is started from a systemd script:

Code:
[Unit]
Description=calibre content server
After=network.target

[Service]
Type=simple
User=calibre
Group=calibre
ExecStart=/opt/calibre/calibre-server \
	--port 8082 \
	--listen-on 127.0.0.1 \
	--userdb /etc/httpd/calibre.sqlite \
	--enable-auth \
	"/share/Calibre Library" 

[Install]
WantedBy=multi-user.target
Apache configuration:

Code:
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so

<VirtualHost *:80>
	ServerName calibre.myserver.com
	AllowEncodedSlashes On
	ProxyPreserveHost On
	ProxyPass "/" http://localhost:8082/
</VirtualHost>
To make the problem more mysterious, some titles in my collection work ok with the Viewer. But all of them worked before I switched to using the built-in calibre user database instead of apache authentication.

Thanks for any insights.
Dibarcus is offline   Reply With Quote
Old 07-13-2020, 10:54 PM   #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: 45,320
Karma: 27111242
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
The problem has to do with the slashes in the file names. Its over a decade since I used apache so cant help you with that. You will need to get apache to handle the slashes correctly.
kovidgoyal is online now   Reply With Quote
Advert
Old 07-17-2020, 03:25 PM   #3
Dibarcus
Junior Member
Dibarcus began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jul 2020
Device: iOS
It does appear to be a slash problem. I decided that I prefer to run calibre-server directly because of the user database feature.

Thanks
Dibarcus is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
New ebook-viewer in Linux - problem running as root cikasole Calibre 4 10-21-2019 09:32 AM
Problem running Calibre under Windows 10 aceflor Calibre 11 01-31-2016 10:37 AM
Running Calibre on apache.. mnsweeps Calibre 3 03-28-2011 02:32 AM
Calibre 0.7.5 problem install and running jean-paul Calibre 3 06-28-2010 04:15 PM
Problem running scripts from ContentLister Fellball iRex 1 03-13-2009 08:16 PM


All times are GMT -4. The time now is 03:52 AM.


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