Page 1 of 1
Deluge on Android
Posted: Fri Nov 06, 2015 12:12 pm
by alllexx
Has anyone tried to run Deluge on Android? Deluge from develop branch (20150922) I installed on my Asus TF-101 using my Optware-ng project (look
here to learn how) gives this error:
Code: Select all
root@tf101:/data/local # deluged
root@tf101:/data/local # 12:04:21 [ERROR ][deluge.core.rpcserver] Couldn't listen on localhost:58846: [Errno -2] Name or service not known.
and then forces my tablet into reboot.
I wonder if it is possible to get it to work with Android? Transmission works fine, but I like Deluge better

Thanks
Re: Deluge on Android
Posted: Fri Nov 06, 2015 12:31 pm
by alllexx
Hm, no, deluged does work, but somewhat unstable. It is started OK by Optware-ng init.d script, but trying to stop it causes a reboot. If I disable deluged init script and reboot, and try to launch it later manually, I get the same error as above:
Code: Select all
root@tf101:/data/local # deluged
root@tf101:/data/local # 12:29:53 [ERROR ][deluge.core.rpcserver] Couldn't listen on localhost:58846: [Errno -2] Name or service not known.
and another reboot...
Re: Deluge on Android
Posted: Fri Nov 06, 2015 12:59 pm
by Cas
That error will be coming from twisted or lower level, I can't think of anything in Deluge that should need altered for it work on Android.
Separate to your issue I notice there are no line numbers in non-dev mode logging, why is not very helpful...
Re: Deluge on Android
Posted: Fri Nov 06, 2015 1:33 pm
by alllexx
Cas, thank you for your reply!
Here's error in dev mode:
Code: Select all
root@tf101:/data/local # deluged
root@tf101:/data/local # 13:27:28.708 [ERROR ][deluge.core.rpcserver:355 ] Couldn't listen on localhost:58846: [Errno -2] Name or service not known.
and here're lines 348-357:
Code: Select all
# Check for SSL keys and generate some if needed
check_ssl_keys()
try:
reactor.listenSSL(port, self.factory, ServerContextFactory(), interface=hostname)
except Exception as ex:
log.info("Daemon already running or port not available..")
log.error(ex)
sys.exit(0)
Clearly, reactor.listenSSL(port, self.factory, ServerContextFactory(), interface=hostname) fails for some reason.
Sadly, now my tablet won't boot, stuck at boot animation. I only have access via Optware-ng's dropbear, which apparently starts before boot process hangs. But I can still tinker with it before doing a wipe, so please let me know if you have any ideas

Thanks
Re: Deluge on Android
Posted: Fri Nov 06, 2015 5:21 pm
by Cas
I wonder if localhost lookup is not working.
You could alter the log.error to log.exception and it should output the entire traceback, may or may not provide more info.
Re: Deluge on Android
Posted: Sun Nov 08, 2015 2:35 pm
by alllexx
Cas,
Sorry for the delay. Here's the traceback:
Code: Select all
root@tf101:/data/local # deluged
root@tf101:/data/local # 14:33:33.794 [ERROR ][deluge.core.rpcserver:355 ] Couldn't listen on localhost:58846: [Errno -2] Name or service not known.
Traceback (most recent call last):
File "/opt/lib/python2.7/site-packages/deluge/core/rpcserver.py", line 352, in __init__
reactor.listenSSL(port, self.factory, ServerContextFactory(), interface=hostname)
File "/data/Optware-ng/lib/python2.7/site-packages/twisted/internet/posixbase.py", line 522, in listenSSL
port = self.listenTCP(port, tlsFactory, backlog, interface)
File "/data/Optware-ng/lib/python2.7/site-packages/twisted/internet/posixbase.py", line 495, in listenTCP
p.startListening()
File "/data/Optware-ng/lib/python2.7/site-packages/twisted/internet/tcp.py", line 990, in startListening
raise CannotListenError(self.interface, self.port, le)
CannotListenError: Couldn't listen on localhost:58846: [Errno -2] Name or service not known.
Also, `nslookup localhost` works fine:
Code: Select all
root@tf101:/data/local # nslookup localhost
Server: 8.8.4.4
Address 1: 8.8.4.4 google-public-dns-b.google.com
Name: localhost
Address 1: 127.0.0.1 localhost
Re: Deluge on Android
Posted: Mon Nov 09, 2015 1:03 pm
by Cas
What is the contents of your /etc/hosts file? Have you asked any android developers about the issue? It is something in the configuration of the system so out with Deluge and Twisted.
Re: Deluge on Android
Posted: Wed Nov 11, 2015 3:10 pm
by alllexx
My /etc/hosts used to be pretty long, since it contained blocked ad sites (and it did contain "127.0.0.1 localhost"). I then issued `echo "127.0.0.1 localhost" > /etc/hosts`, but it didn't help.
Honestly, I'm not sure whom to contact on this. Maybe, I should first try to run deluged on other firmwares/devices