Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 06-20-2017, 07:40 AM   #1
apiontek
Member
apiontek began at the beginning.
 
apiontek's Avatar
 
Posts: 18
Karma: 10
Join Date: Mar 2012
Location: Queens, NY
Device: Kobo Glo HD
calibredb cannot add with content server running

Prior to 3.0, I was always able to simultaneously run the content server *and* use the cli calibredb to add & remove from the library. This is useful for a headless server that runs recipes from cron jobs.
  1. With 3.0, I don't need the content server to make changes, so I run it with "disable-auth," but calibredb complains that "Another calibre program such as calibre-server or the main calibre program is running." Yes, yes it is, but it's not making changes, and I never had any issue in the past.
  2. If I pass the local content server address to calibredb, I can run searches, but to add or remove, it complains, "The username/password combination is incorrect." OK, I understand the content server can't make changes with authentication disabled, but that's an unhelpful message in that situation.
  3. If I do enable-auth on server, I test in chrome and am able to log in, but when I pass the username & password to calibredb, it complains "A username and password is required to access this server." Yes, I know! That's why I'm providing it!

What am I doing wrong? Can you just allow an override to calibredb to allow it to modify the library even with the content server running, for those of us who don't need the content server to write to the library?

Last edited by apiontek; 06-20-2017 at 07:43 AM.
apiontek is offline   Reply With Quote
Old 06-20-2017, 07:41 AM   #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: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
2. Sure it can. See the --enable-local-writes option.
kovidgoyal is offline   Reply With Quote
Advert
Old 06-20-2017, 07:45 AM   #3
apiontek
Member
apiontek began at the beginning.
 
apiontek's Avatar
 
Posts: 18
Karma: 10
Join Date: Mar 2012
Location: Queens, NY
Device: Kobo Glo HD
That's not a solution for me. I don't want visitors to make changes to the database.

I want to make changes to the database with calibredb. While the content server is running. Like I always have.

I understand I can simply downgrade to Calibre 2, but that's not a long-term solution, and I'd like the "read books in browser" feature.
apiontek is offline   Reply With Quote
Old 06-20-2017, 07:49 AM   #4
apiontek
Member
apiontek began at the beginning.
 
apiontek's Avatar
 
Posts: 18
Karma: 10
Join Date: Mar 2012
Location: Queens, NY
Device: Kobo Glo HD
I now see that "enable-local-write" says it "allows anybody connecting from the same computer as the server is running on to make changes"

I missed that before. My mistake, that actually might work great. I'll test.
apiontek is offline   Reply With Quote
Old 07-24-2017, 04:23 PM   #5
sneppie
Junior Member
sneppie began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jul 2017
Device: kobo
Hi, I have exactly the same issue, using the option "--enable-local-write" does not help.

I'm starting calibre on my ubuntu 16 server with:
Code:
calibre-server /srv/ebooks --port=8090 --enable-local-write
When started, calibre works fine, but i cannot add books using:
Code:
calibredb add /srv/ebooks/toadd/ -r --with-library /srv/ebooks
Error message:
Code:
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.
Am I missing something? Thank you in advance!
sneppie is offline   Reply With Quote
Advert
Old 07-24-2017, 11:23 PM   #6
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: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Your --with-library is wrong, it has to specify a server URL. Read the help of that option.
kovidgoyal is offline   Reply With Quote
Old 07-26-2017, 03:52 AM   #7
sneppie
Junior Member
sneppie began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jul 2017
Device: kobo
Fixed, used invalid --with-library.

Correct line is:
Code:
calibredb add /srv/ebooks/toadd/ -r --with-library http://localhost:8090/
Thanks for you help.
sneppie is offline   Reply With Quote
Old 08-04-2017, 03:26 AM   #8
sws
Enthusiast
sws began at the beginning.
 
sws's Avatar
 
Posts: 40
Karma: 10
Join Date: Oct 2012
Device: Pocket Book Touch HD3
Still problems after upgrade to 3.5:

1. started calibre-server with option --enable-local-write
2. try to add ebook to server:
# calibredb add --with-library http://localhost:8081/ --username "user" --password "password" x.epub
3. error:"A username and password is required to access this server"

Well, I did provide both.
What did I do wrong?
sws is offline   Reply With Quote
Old 08-04-2017, 03:37 AM   #9
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: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
That error message is a bit misleading, it can also mean that the username/password is incorrect. I will fix that in the next release.
kovidgoyal is offline   Reply With Quote
Old 08-04-2017, 03:41 AM   #10
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: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Oh and, if you use --enable-local-write then dont also use --enable-auth (--enable-local-write is useful only if you dont want to setup user accounts). If you do setup user accounts, they take precedence.
kovidgoyal is offline   Reply With Quote
Old 08-04-2017, 04:50 AM   #11
sws
Enthusiast
sws began at the beginning.
 
sws's Avatar
 
Posts: 40
Karma: 10
Join Date: Oct 2012
Device: Pocket Book Touch HD3
Thanks for the hints.
1. Changed password and it worked. I had a "!" in the former password which wouldn't work even after escaping it.
2. I started calibre-server with both options and indeed it required username and password.

So for me issue is solved. Thanks again.

Regards,
Sebastian
sws is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calibre-server / Linux don't see calibreDB update when it's running aurigod Calibre 13 11-25-2015 02:44 AM
Running multiple calibredb add jobs simultaneously. AVaughan Library Management 3 10-18-2015 10:16 AM
Running calibre-server with auto add Hiryu Library Management 21 12-05-2014 06:15 PM
Content Server running on Android box? bthoven Devices 3 08-07-2011 03:31 AM
Running Calibre content server as a service mathia Related Tools 31 07-04-2011 09:34 AM


All times are GMT -4. The time now is 11:33 AM.


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