View Single Post
Old 08-27-2017, 08:35 PM   #8
oblongau
Member
oblongau began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Sep 2013
Location: Australia
Device: Calibre; Galaxy SII
Getting closer... I've created a new Linux username and modified /etc/systemd/system/calibre-server.service:

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

[Service]
Type=simple
User=calibreserver
Group=calibreserver

ExecStart=/usr/bin/calibre-server\
--max-opds-items=30\
--max-opds-ungrouped-items=100\
--port 8282 \
--log="/opt/calibre/calibre-server.log"\
--enable-auth \
--userdb="/home/bob/.config/calibre/server-users.sqlite"\
"/home/bob/Calibre Library"

[Install]
WantedBy=multi-user.target
The server starts, and I can now run the calibre GUI while the server is running.

Server log:
Code:
calibre server listening on 0.0.0.0:8282
OPDS feeds advertised via BonJour at: 192.168.0.2 port: 8282
However, when I try to use Web page access (http://192.168.0.2:8282/) I get prompted for the calibre username (as expected) and that is accepted. That username and password is set in Preferences|Sharing over the net|User accounts and is not the same as the new Linux username.

When I click on the Web "Calibre Library" button the Web page responds:

Code:
Failed to load books from calibre library, with error:
Failed to communicate with "/interface-data/books-init?library_id=Calibre_Library&sort=author_sort.asc&1503879907902", with status: [500] Internal Server Error
The server log says:
Code:
Unhandled exception in state: State: _job_done Client: 192.168.0.2:46202 Request: GET /interface-data/books-init?library_id=Calibre_Library&sort=author_sort.asc&1503879644611 HTTP/1.1
Traceback (most recent call last):
  File "site-packages/calibre/srv/loop.py", line 565, in tick
  File "site-packages/calibre/srv/loop.py", line 303, in _job_done
  File "site-packages/calibre/srv/pool.py", line 35, in run
  File "site-packages/calibre/srv/http_response.py", line 441, in run_request_handler
  File "site-packages/calibre/srv/routes.py", line 300, in dispatch
  File "site-packages/calibre/srv/auth.py", line 258, in __call__
  File "site-packages/calibre/srv/auth.py", line 281, in do_http_auth
  File "site-packages/calibre/srv/users.py", line 132, in get
  File "site-packages/calibre/srv/users.py", line 79, in conn
CantOpenError: CantOpenError: unable to open database file
/home/bob/Calibre Library has permissions 777.
/home/bob/.config/calibre/server-users.sqlite has permissions 777.

Which "database file" can't it open?

What now?
oblongau is offline   Reply With Quote