Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 11-05-2009, 01:48 PM   #1
jquest
Member
jquest began at the beginning.
 
Posts: 24
Karma: 10
Join Date: Feb 2008
Device: kindle
calibre-server on port 80 problem

Hi,

I'm running under ubuntu 9.04 amd64. Calibre version 6.20. Installed using binary installer as an upgrade from 6.16.

I want to run the calibre-server under port 80, so my kindle will connect to it ok. I've changed the apache on this system to use port 81, so no conflict there I hope.

The GUI won't let me change the port to anything below 1025, so I tried to run from the command line:

calibre-server -p 80

as a test. When I run as a non sudo user I get the following:

xxx@amd:~$ calibre-server -p 80
Exception in thread HTTPServer Thread-3:
Traceback (most recent call last):
File "/usr/lib64/python2.6/threading.py", line 525, in __bootstrap_inner
self.run()
File "/usr/lib64/python2.6/threading.py", line 477, in run
self.__target(*self.__args, **self.__kwargs)
File "/home/kovid/build/calibre/src/cherrypy/process/servers.py", line 73, in _start_http_thread
File "/home/kovid/build/calibre/src/cherrypy/wsgiserver/__init__.py", line 1596, in start
error: [Errno 13] Permission denied

If I do a sudo -i and run as root I get:

root@amd:/home/nboddie# calibre-server -p 80
Traceback (most recent call last):
File "/tmp/init.py", line 48, in <module>
File "/home/kovid/build/calibre/src/calibre/library/server.py", line 867, in main
File "/home/kovid/build/calibre/src/calibre/library/database2.py", line 407, in __init__
File "/usr/lib64/python2.6/genericpath.py", line 18, in exists
st = os.stat(path)
TypeError: coercing to Unicode: need string or buffer, NoneType found

Is this doable?

Cheers,

Ned
jquest is offline   Reply With Quote
Old 11-05-2009, 02:11 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: 33,608
Karma: 10209526
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Don't run user land apps as root. It's generally a bad idea. Just forward port 80 to 8080 using your router or iptables
kovidgoyal is offline   Reply With Quote
Advert
Old 11-06-2009, 07:04 AM   #3
jquest
Member
jquest began at the beginning.
 
Posts: 24
Karma: 10
Join Date: Feb 2008
Device: kindle
Awesome idea! (I would never have thought of doing this)

It was a piece of cake when I got home last night, issued the following commands:

iptables -t nat -A PREROUTING -p tcp -i eth1 -d XXX.XXX.XXX.XXX --dport 80 -j DNAT --to XXX.XXX.XXX.XXX:8080
iptables -A FORWARD -p tcp -i eth1 -d XXX.XXX.XXX.XXX --dport 8080 -j ACCEPT
iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE

Kindle connected right up.

Thanks so much,

Ned
jquest is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calibre 0.7.19 content server and kindle 3 problem tommet Calibre 6 09-18-2010 06:21 PM
Calibre server problem sdblepas Calibre 0 07-14-2010 01:09 PM
Savory - a calibre port running on the Amazon K2 Nate the great News 0 04-03-2009 10:22 PM
Problem with battery and USB port witch_moon Bookeen 2 12-23-2008 12:34 PM
iLiad Open X server port design256 iRex Developer's Corner 20 10-21-2006 06:51 PM


All times are GMT -4. The time now is 09:36 PM.


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