Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 10-17-2023, 10:04 PM   #1
drawson1
Connoisseur
drawson1 began at the beginning.
 
Posts: 96
Karma: 10
Join Date: Mar 2014
Device: Libra H20, Clara 2E
calibre -s fails ....sometimes :-(

To be more correct, it works in one script and fails in another :-(

The two scripts share IDENTICAL code for the shutdown / restart:

Code:
if (ps -ef | grep "/opt/calibre/bin/calibre" | grep -v grep > /dev/null)
then
    RUNNING=TRUE
    WITH_LIB="--with-library=http://localhost:8080/"
fi

......

[[ -n ${RUNNING} ]] && /usr/bin/calibre -s

.....

[[ -n ${RUNNING} ]] && /usr/bin/calibre &
One of these scripts works exactly as expected; the other one fails with:

Code:
[Errno 111] Connection refused

'shutdown:'
FYI, Both scripts are shutting down calibre so that I can run "calibredb catalog" with some very specific options, and then import the results.

How can I debug the "Connection refused" error?

Environment:
Calibre 6.28.1
OpenSUSE 15.4 with all current patches
XFCE desktop


Thanks!

Dan
drawson1 is offline   Reply With Quote
Old 10-17-2023, 10:10 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: 45,355
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
you will typically get connection refused when calibre is already shutting down.
kovidgoyal is offline   Reply With Quote
Advert
Old 10-18-2023, 07:06 AM   #3
drawson1
Connoisseur
drawson1 began at the beginning.
 
Posts: 96
Karma: 10
Join Date: Mar 2014
Device: Libra H20, Clara 2E
Hmmm .... doesn't seem to be the case. For BOTH scripts, just before I call "calibre -s", the process list looks the same:

Code:
18-Oct-23 06:40 > ps -ef | grep calibre
drawson  31991     1  1 06:38 pts/4    00:00:06 /opt/calibre/bin/calibre
drawson  32036 31991  0 06:38 pts/4    00:00:00 /opt/calibre/bin/calibre-parallel --pipe-worker from calibre.utils.ipc.pool import run_main, worker_main; run_main(41, worker_main)
drawson  32622 31237  0 06:46 pts/4    00:00:00 grep --color=auto calibre
but one of the scripts kills it and the other doesn't. I also tried:

Code:
pkill calibre
(fails)

and

Code:
pkill calibre-parallel
(works)

One other note - even when it fails, the return value from "calibre -s" is still 0 :-(
drawson1 is offline   Reply With Quote
Old 10-18-2023, 07:08 AM   #4
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: 45,355
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
then your permission denied will be one script running as a different user than the other
kovidgoyal is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calibre 3.48 fails to load maddz Calibre 2 02-20-2021 03:57 PM
Calibre fails to convert ConnieL Conversion 8 03-26-2020 12:45 PM
Calibre email fails EightWeight Calibre 4 12-07-2014 04:58 PM
Calibre fails to start? thegreenemachine Calibre 1 03-14-2012 03:38 AM
install calibre 0.8.8 fails knireis Calibre 2 07-08-2011 09:40 AM


All times are GMT -4. The time now is 07:40 PM.


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