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 09-06-2021, 12:41 PM   #1
ljfriese
Junior Member
ljfriese began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Sep 2021
Device: Onyx Boox
Server auth requiring double login

Hey,

First off, awesome software.

I'm encountering two odd behaviours with my calibre server, wondering if there is a fix or if it's just a side effect of my potentially odd set-up.

Behaviour 1: I have to log in twice when accessing the server. That is, I enter the username/password, submit, the login modal returns, I re-enter, submit, and I'm in.

Behaviour 2: On boot up my server logs some warnings:

Code:
-- Journal begins at Wed 2021-09-01 11:36:23 PDT, ends at Mon 2021-09-06 09:35:51 PDT. --
Sep 06 09:27:18 babel systemd[1]: Started calibre content server.
Sep 06 09:27:29 babel calibre-server[455]: QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-lucas'
Sep 06 09:27:30 babel calibre-server[455]: calibre server listening on 0.0.0.0:8080
Sep 06 09:27:30 babel calibre-server[455]: OPDS feeds advertised via BonJour at: 192.168.86.29 port: 8080
Sep 06 09:31:30 babel calibre-server[455]: Unhandled exception in state: State: _job_done Client: 192.168.86.242:57751 Request: POST /interface-data/set-sess>
Sep 06 09:31:30 babel calibre-server[455]: Traceback (most recent call last):
Sep 06 09:31:30 babel calibre-server[455]:   File "/usr/lib/calibre/calibre/srv/loop.py", line 621, in tick
Sep 06 09:31:30 babel calibre-server[455]:     conn.handle_event(event)
Sep 06 09:31:30 babel calibre-server[455]:   File "/usr/lib/calibre/calibre/srv/loop.py", line 345, in _job_done
Sep 06 09:31:30 babel calibre-server[455]:     self.job_done(*event)
Sep 06 09:31:30 babel calibre-server[455]:   File "/usr/lib/calibre/calibre/srv/http_response.py", line 502, in job_done
Sep 06 09:31:30 babel calibre-server[455]:     reraise(etype, e, tb)
Sep 06 09:31:30 babel calibre-server[455]:   File "/usr/lib/calibre/polyglot/builtins.py", line 61, in reraise
Sep 06 09:31:30 babel calibre-server[455]:     raise value
Sep 06 09:31:30 babel calibre-server[455]:   File "/usr/lib/calibre/calibre/srv/pool.py", line 35, in run
Sep 06 09:31:30 babel calibre-server[455]:     result = func()
Sep 06 09:31:30 babel calibre-server[455]:   File "/usr/lib/calibre/calibre/srv/http_response.py", line 459, in run_request_handler
Sep 06 09:31:30 babel calibre-server[455]:     result = self.request_handler(data)
Sep 06 09:31:30 babel calibre-server[455]:   File "/usr/lib/calibre/calibre/srv/routes.py", line 313, in dispatch
Sep 06 09:31:30 babel calibre-server[455]:     ans = endpoint_(self.ctx, data, *args)
Sep 06 09:31:30 babel calibre-server[455]:   File "/usr/lib/calibre/calibre/srv/code.py", line 327, in set_session_data
Sep 06 09:31:30 babel calibre-server[455]:     ctx.user_manager.set_session_data(rd.username, ud)
Sep 06 09:31:30 babel calibre-server[455]:   File "/usr/lib/calibre/calibre/srv/users.py", line 145, in set_session_data
Sep 06 09:31:30 babel calibre-server[455]:     c.execute('UPDATE users SET session_data=? WHERE name=?', (data, username))
Sep 06 09:31:30 babel calibre-server[455]: apsw.ReadOnlyError: ReadOnlyError: attempt to write a readonly database
Sep 06 09:32:09 babel calibre-server[455]: Unhandled exception in state: State: _job_done Client: 192.168.86.1:50046 Request: POST /interface-data/set-sessio>
Sep 06 09:32:09 babel calibre-server[455]: Traceback (most recent call last):
Sep 06 09:32:09 babel calibre-server[455]:   File "/usr/lib/calibre/calibre/srv/loop.py", line 621, in tick
Sep 06 09:32:09 babel calibre-server[455]:     conn.handle_event(event)
Sep 06 09:32:09 babel calibre-server[455]:   File "/usr/lib/calibre/calibre/srv/loop.py", line 345, in _job_done
Sep 06 09:32:09 babel calibre-server[455]:     self.job_done(*event)
Sep 06 09:32:09 babel calibre-server[455]:   File "/usr/lib/calibre/calibre/srv/http_response.py", line 502, in job_done
Sep 06 09:32:09 babel calibre-server[455]:     reraise(etype, e, tb)
Sep 06 09:32:09 babel calibre-server[455]:   File "/usr/lib/calibre/polyglot/builtins.py", line 61, in reraise
Sep 06 09:32:09 babel calibre-server[455]:     raise value
Sep 06 09:32:09 babel calibre-server[455]:   File "/usr/lib/calibre/calibre/srv/pool.py", line 35, in run
Sep 06 09:32:09 babel calibre-server[455]:     result = func()
Anything to be concerned about there?

My potentially-odd build that I mentioned is:

I'm running calibre 5.12 (aware it's not fully up to date) on a headless debian server hosted on a raspberry Pi 4b. The calibre library is being synced onto the pi via rsync from Dropbox.
ljfriese is offline   Reply With Quote
Old 09-06-2021, 01:24 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,185
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
1 is probably because of 2. 2 is complaining about a read only database, so check the permission on the users database (--userdb)
kovidgoyal is offline   Reply With Quote
Advert
Old 09-07-2021, 05:28 PM   #3
ljfriese
Junior Member
ljfriese began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Sep 2021
Device: Onyx Boox
Thanks - That led me to the solution.

I created the userdb as a root user and then was running the server non-root. Non-root didn't have write permissions to the db.

Fix: sudo chmod 777 /srv/calibre

Both issues are resolved.
ljfriese is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Login failure with userdb with content server rodvp Server 7 11-27-2020 12:48 AM
Content Server Login method SASSBS Server 1 07-23-2018 02:55 AM
Send Mail via SMTP-Server without Auth? bluebell Devices 1 10-15-2011 06:53 AM
Calibre Content Server - login The QCC Calibre 2 03-14-2011 10:13 PM
Login/Password for Calibre Server myudkowsky Calibre 15 11-21-2010 10:07 PM


All times are GMT -4. The time now is 07:08 AM.


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