View Single Post
Old 01-27-2018, 12:23 AM   #19
ckronengold
Member
ckronengold began at the beginning.
 
Posts: 21
Karma: 10
Join Date: Jan 2018
Device: kindle basic
Quote:
Originally Posted by kovidgoyal View Post
Dont follow the tutorial at digital ocean, it is out of date. Since calibre 3.0 multiple calibre programs cannot access the same library at the same time.

Once again, use calibredb --with-library with the server URL and in the server either setup a username or password or use the --enable-local-write option.
Got it. I streamlined my install to be as "traditional" as possible, rather than trying to piece together the bits from outdated sources. My bad on that front for sure.

So I'm almost there. I've got the CalibreServer.service starting Calibre on reboot and the "CalibreAdd" folder being monitored.

But now its not adding the books.

My Cron is kicking out "Another calibre program such as calibre-server or the main calibre program is running. Having multiple programs that can make changes to a calibre library running at the same time is a bad idea. calibredb can connect directly to a running calibre content server, to make changes through it, instead. See the documentation of the --with-library option for details."

This is after a fresh restart, so I'm not sure which other instance could be running. I haven't opened Calibre. When I stop the server in the CLI (systemctl stop calibreserver.service) and then launch the actual program, it loads up. If I don't stop it first, the program gives me the error warning about another service running that accesses the database.

So I'm confused about where the other instance is coming from.

Crontab -e:
*/2 * * * * calibredb add -r /mnt/mediastore/CalibreAdd/* --username user --password password --library-path ~/mnt/mediastore/CalibreLibrary/

Getting the same error with */1 * * * * calibredb add --with-library "192.168.1.25:8080/#CalibreLibrary" as well.

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

[Service]
Type=simple
User=user
Group=group
ExecStart=/opt/calibre/calibre-server "/mnt/mediastore/CalibreLibrary"

[Install]
WantedBy=multi-user.target

calibreserver.service - calibre content server
Loaded: loaded (/etc/systemd/system/calibreserver.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2018-01-27 00:35:31 EST; 3min 56s ago
Main PID: 1130 (calibre-server)
Tasks: 14 (limit: 4915)
CGroup: /system.slice/calibreserver.service
└─1130 /opt/calibre/bin/calibre-server /mnt/mediastore/CalibreLibrary

Jan 27 00:35:31 corbuntu systemd[1]: Started calibre content server.
Jan 27 00:35:33 corbuntu calibre-server[1130]: calibre server listening on 0.0.0.0:8080
Jan 27 00:35:35 corbuntu calibre-server[1130]: OPDS feeds advertised via BonJour at: 127.0.1.1 port: 8080

Last edited by ckronengold; 01-27-2018 at 01:15 AM.
ckronengold is offline   Reply With Quote