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 12-04-2019, 02:05 AM   #1
Corusco
Junior Member
Corusco began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Dec 2019
Device: iDevices
Broken pipe error when doing add --with-library

I'm attempting to test the typical command to add in to my crontab to update my library on a headless server:
Code:
calibredb add /array/media/books/* --with-library http://localhost:8001/#books --username user --password pass
The command begins to execute, hangs for 8-10 seconds without any console return, and then kicks back with the following trace:

Quote:
Traceback (most recent call last):
File "site.py", line 77, in main
File "site-packages/calibre/db/cli/main.py", line 257, in main
File "site-packages/calibre/db/cli/main.py", line 54, in run_cmd
File "site-packages/calibre/db/cli/cmd_add.py", line 383, in main
File "site-packages/calibre/db/cli/cmd_add.py", line 192, in do_add
File "site-packages/calibre/db/cli/main.py", line 190, in run
File "site-packages/calibre/db/cli/main.py", line 212, in remote_run
File "site-packages/mechanize/_mechanize.py", line 238, in open_novisit
File "site-packages/mechanize/_mechanize.py", line 283, in _mech_open
File "site-packages/mechanize/_opener.py", line 193, in open
File "site-packages/mechanize/_urllib2_fork.py", line 375, in _open
File "site-packages/mechanize/_urllib2_fork.py", line 363, in _call_chain
File "site-packages/mechanize/_urllib2_fork.py", line 1200, in http_open
File "site-packages/mechanize/_urllib2_fork.py", line 1182, in do_open
URLError: <urlopen error [Errno 32] Broken pipe>
I looked in that function on _urlib2_fork.py, and the only point I can see this sort of error creeping up is on a
Code:
try 
except
on a host connection toward the bottom of the func.

I do think I have a valid initial connection because I get valid returns from calibre if I form the calibredb command wrong, such as needing user/pass or name the library incorrectly.

I notice the host object has a timeout variable and I can't see where that's getting set. It makes sense that a timeout of some sort would indicate a dead connection if there isn't a return. Scanning the dir does take a bit of time when I've added while Calibre is stopped.

Really, all I'm looking for is the right way to keep my lib updated.
Corusco is offline   Reply With Quote
Old 12-04-2019, 05:09 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,859
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Does adding single books work? Are you using the official calibre binaries? what version?
kovidgoyal is offline   Reply With Quote
Old 12-05-2019, 12:21 AM   #3
Corusco
Junior Member
Corusco began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Dec 2019
Device: iDevices
Thanks for your prompt reply, Kovid. I really appreciate how much of your time you dedicate to supporting Calibre. Your suggestion about trying a single book gave me a few ideas to try this evening.

I'm using version 4.3, official binary.

I did try a couple of single books. One was a standard .epub file from my collection, another was a file I quickly made with
Code:
touch test.epub
Each time, the command exited with "Not Found". Deliberately mistyping the file path exits with printing the entire path with lowercase "not found".

I tried running tail -f on my calibre log file and nothing is being logged to the file when I try - what seems to be - a properly formatted command. When running the calibredb add command with improper login credentials, it does show failed login attempts, so that validates at least my logfile is being written to properly and my host address is right.

Hope this helps in guiding me toward more things to try. Thank you again!
Corusco is offline   Reply With Quote
Old 12-05-2019, 01:43 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: 43,859
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
First I suggest using --enable-local-write which dispenses with the need for usernames and passwords. And whch log is this the error log or the access log?
kovidgoyal is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Kindle PW3 5.9.6.1 ssh broken pipe leaves broken ssh xception Kindle Developer's Corner 8 01-27-2019 10:23 AM
Plugin error: IOError: [Errno 32] Broken pipe stoduk Development 6 12-30-2015 07:14 AM
ERROR: Unhandled exception: <b>IOError</b>:[Errno 32] Broken pipe Martin77 Calibre 3 12-24-2015 07:50 AM
Broken pipe issues jasonfedelem Library Management 8 06-05-2015 07:34 AM
another broken pipe bambuko Calibre 7 02-15-2015 09:19 AM


All times are GMT -4. The time now is 10:39 AM.


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