11-05-2009, 12:48 PM | #1 |
Member
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 |
11-05-2009, 01:11 PM | #2 |
creator of calibre
Posts: 44,356
Karma: 23661992
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
|
Advert | |
|
11-06-2009, 06:04 AM | #3 |
Member
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 |
|
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 05:21 PM |
Calibre server problem | sdblepas | Calibre | 0 | 07-14-2010 12:09 PM |
Savory - a calibre port running on the Amazon K2 | Nate the great | News | 0 | 04-03-2009 09:22 PM |
Problem with battery and USB port | witch_moon | Bookeen | 2 | 12-23-2008 11:34 AM |
iLiad Open X server port | design256 | iRex Developer's Corner | 20 | 10-21-2006 05:51 PM |