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 08-11-2023, 11:20 AM   #1
MrRalphMan
Junior Member
MrRalphMan began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Aug 2023
Device: Kindle
Question Error when running calibredb from Cron - Login related I think

Hi All,

I've been using


So I've installed Calibre on a Rocky Linux box and wanted to have an Incoming directory on the server, so I can drop any new books there and have a CRON job run to pick them up.
This works, but only for a while and then I get an Server 500 error.

Searching this seems to show this is a authentication issue, but I have the correct username/password in the command.

When it does start failing, I log onto the web based GUI, on port 8080, and it starts working.

So although the username/password is in the command, it doesn't work until I actually log into the server.

Cron line:
Code:
*/5 * * * * calibredb add /home/incoming_books/ -r --with-library http://localhost:8080#calibre-library --username <username> --password <password> && rm -r /home/incoming_books/*
UserID/Password and Path have been redacted.

This is the output I get:
Code:
Traceback (most recent call last):
  File "runpy.py", line 194, in _run_module_as_main
  File "runpy.py", line 87, in _run_code
  File "site.py", line 45, in <module>
  File "site.py", line 41, in main
  File "calibre/db/cli/main.py", line 250, in main
  File "calibre/db/cli/main.py", line 40, in run_cmd
  File "calibre/db/cli/cmd_add.py", line 474, in main
  File "calibre/db/cli/cmd_add.py", line 268, in do_add
  File "calibre/db/cli/main.py", line 182, in run
  File "calibre/db/cli/main.py", line 204, in remote_run
  File "mechanize/_mechanize.py", line 241, in open_novisit
  File "mechanize/_mechanize.py", line 313, in _mech_open
mechanize._response.httperror_seek_wrapper: HTTP Error 500: Internal Server Error
What am I doing wrong or is this not something I can easily do?

Paul
MrRalphMan is offline   Reply With Quote
Old 08-11-2023, 09:03 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: 44,000
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Look at th elogs of the server to see what the actual error is.
kovidgoyal is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
'calibredb add' throws python error when calibre-server is running CubGeek Server 2 09-17-2021 11:01 AM
Running calibredb from a cron script rolgiati Server 13 03-05-2019 04:43 PM
calibredb cannot add with content server running apiontek Calibre 10 08-04-2017 04:50 AM
Calibredb not working when GUI is running webdjoe Calibre 9 07-26-2017 04:29 AM
CalibreDB not running on my environment JackED42 Devices 4 10-03-2016 02:25 AM


All times are GMT -4. The time now is 06:26 AM.


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