View Single Post
Old 12-04-2017, 08:16 PM   #3
haertig
Addict
haertig ought to be getting tired of karma fortunes by now.haertig ought to be getting tired of karma fortunes by now.haertig ought to be getting tired of karma fortunes by now.haertig ought to be getting tired of karma fortunes by now.haertig ought to be getting tired of karma fortunes by now.haertig ought to be getting tired of karma fortunes by now.haertig ought to be getting tired of karma fortunes by now.haertig ought to be getting tired of karma fortunes by now.haertig ought to be getting tired of karma fortunes by now.haertig ought to be getting tired of karma fortunes by now.haertig ought to be getting tired of karma fortunes by now.
 
Posts: 386
Karma: 2586988
Join Date: Sep 2017
Device: PaperWhite 3, Fire HD8 Gen7, Sansa Clip v2 Rockbox (audiobooks)
On the Pi, I got Calibre installed, along with NGINX reverse proxy with LetsEncrypt https and client cert authentication. Library is being rsyned from my main Calibre installation triggered by systemd timer on the Pi. Looking good!

calibre-server works nicely. No memory problems with my 400-ish book library and Pi's 1Gb system memory. Slight slowness when drawing main page (main calibre-server on powerful machine does this instantly, the Pi takes about 3 seconds, but this is acceptable). On individual book pages, the Pi-based calibre-server does not display the book cover art, but my main caliber-server does. Need to troubleshoot this minor issue. But overall, I'm happy!

Now trying to set up user profiles on Pi calibre-server. Running into an issue here. Before attempting user admin, I ran "pacman -S sqlite", so that's now installed. But I don't know sqlite (yet), so I haven't touched it other than running the pacman installation. Possibly I need to do some sqlite configuration/setup before I try to use calibre-server to manage users? See errors I'm getting below.

Manually created directory /srv/calibre, ownership by userid "calibre", the same userid I'm using to run calibre-server.

Thanks again for all the help you've given me for this project, both in this thread and in other threads I've created. I've just about got this thing nailed down to exactly what I want!

[calibre@rpi3b ~]$ calibre-server --userdb /srv/caliber/users-sqlite --manage-users
Code:
1) Add a new user
2) Edit an existing user
3) Remove a user
4) Cancel

What do you want to do? [1-4]: 1
Enter the username: guest
Traceback (most recent call last):
  File "/usr/bin/calibre-server", line 20, in <module>
    sys.exit(main())
  File "/usr/lib/calibre/calibre/srv/standalone.py", line 176, in main
    manage_users_cli(opts.userdb)
  File "/usr/lib/calibre/calibre/srv/manage_users_cli.py", line 218, in manage_users_cli
    actions[0]()
  File "/usr/lib/calibre/calibre/srv/manage_users_cli.py", line 214, in toplevel
    _('Cancel')])]()
  File "/usr/lib/calibre/calibre/srv/manage_users_cli.py", line 93, in add_user
    username = get_valid(_('Enter the username'), m.validate_username)
  File "/usr/lib/calibre/calibre/srv/manage_users_cli.py", line 54, in get_valid
    fail_message = invalidq(ans)
  File "/usr/lib/calibre/calibre/srv/users.py", line 140, in validate_username
    if self.has_user(username):
  File "/usr/lib/calibre/calibre/srv/users.py", line 137, in has_user
    return self.get(username) is not None
  File "/usr/lib/calibre/calibre/srv/users.py", line 132, in get
    for pw, in self.conn.cursor().execute(
  File "/usr/lib/calibre/calibre/srv/users.py", line 79, in conn
    self._conn = apsw.Connection(self.path)
apsw.CantOpenError: CantOpenError: unable to open database file
[calibre@rpi3b ~]$
"Unable to open database file", but permissions look correct:
Code:
[root@rpi3b]# cd /srv
[root@rpi3b]# pwd
/srv
[root@rpi3b]# ls -al
total 20
drwxr-xr-x  5 root    root    4096 Dec  4 17:48 .
drwxr-xr-x 16 root    root    4096 Dec  1 16:56 ..
drwxr-xr-x  2 calibre calibre 4096 Dec  4 17:48 calibre
dr-xr-xr-x  2 root    ftp     4096 Mar 31  2017 ftp
drwxr-xr-x  2 root    root    4096 Mar 31  2017 http
[root@rpi3b]#
haertig is offline   Reply With Quote