HOWTO: Install/Upgrade Deluge BitTorrent on FFP 0.7-arm

Marvell Kirkwood based
Durandle
Posts: 23
Joined: Thu Oct 09, 2014 10:51 am

Re: HOWTO: Install/Upgrade Deluge BitTorrent on FFP 0.7-arm

Post by Durandle » Thu May 14, 2015 4:44 pm

c_rehash

Doing /ffp/etc/ssl/certs
cacert.pem => c692a373.0

funpkg -u /ffp/funpkg/cache/br2/python/python-2.7.8-arm-1.txz

/ffp/funpkg/cache/br2/python/python-2.7.8-arm-1.txz: No such file or directory

Since I never install 2.7.8 I don'y have the package for it. I tried 2.7.5 which is the most recent old version I have and that was no good. I've re-updated to 2.7.9.

I can't share the one I am using as its a pretty strict closed source (one of those invite only things).

I wonder what Deluge does different to SickGear in its requests, cos SickGear using Python handles https fine - though maybe I am comparing apples and polar-bears.

barmalej2
Posts: 2388
Joined: Sun Apr 29, 2012 5:24 pm

Re: HOWTO: Install/Upgrade Deluge BitTorrent on FFP 0.7-arm

Post by barmalej2 » Thu May 14, 2015 6:35 pm

It is clear now at least, that python is not the culprit for current problem. Deluge directly depends on pyopenssl, which in turn depends on the openssl, cryptography an six. Deluge uses it for encryption and hopefully for establishing https, while SickGear imo uses python native ssl module for establishing https. Of course, this is just my speculation, and I can be wrong.
Well, next round for testing should be to downgrading of libtorrent and deluge.
Look for older packages in cache dir:

Code: Select all

ls /ffp/funpkg/cache/br2/deluge
and use funpkg -u packagename for downgrading them. Restart deluged and check downloading from https tracker again.

barmalej2
Posts: 2388
Joined: Sun Apr 29, 2012 5:24 pm

Re: HOWTO: Install/Upgrade Deluge BitTorrent on FFP 0.7-arm

Post by barmalej2 » Thu May 14, 2015 6:51 pm

Ignore my post above for a while. Let's do downgrading later. Meantime I think, I found the reason:
http://git.deluge-torrent.org/deluge/co ... 1.3-stable
Update your python twisted package first:

Code: Select all

pip install --upgrade Twisted

Restart and check.

Durandle
Posts: 23
Joined: Thu Oct 09, 2014 10:51 am

Re: HOWTO: Install/Upgrade Deluge BitTorrent on FFP 0.7-arm

Post by Durandle » Fri May 15, 2015 4:10 am

I tried Twisted upgrade with no luck. Is there a way to get a more useful error out of Python, like the actual error rather than just a state?

I'll try a downgrade now.

EDIT: Downgrade doesn't even start, I imagine the latest Python + upgraded deps just won't work with it. I don't really want to try and downgrade it all if I can avoid it... I'd be concerned of breaking SickGear for one thing.

barmalej2
Posts: 2388
Joined: Sun Apr 29, 2012 5:24 pm

Re: HOWTO: Install/Upgrade Deluge BitTorrent on FFP 0.7-arm

Post by barmalej2 » Fri May 15, 2015 4:52 am

Is there a way to get a more useful error out of Python, like the actual error rather than just a state?
Unfortunately, it is unknown to me.
Downgrade doesn't even start
Please paste output from logfile.
I'd be concerned of breaking SickGear for one thing.
Purpose is to check, if new deluge or libtorrent versions is the reason for current problem. After all you can upgrade again.

As for downgrading, try this sequence:
Stop deluged first.
Downgrade python to 2.7.5 second.
Revert back to previous Twisted and Setuptools version:

Code: Select all

pip uninstall -y Twisted

Code: Select all

pip uninstall -y setuptools
Remove setuptools ffp package:

Code: Select all

slacker -r setuptools
Install previous versions:

Code: Select all

pip install Twisted==14.0.2 setuptools==7.0

Then downgrade deluge with libtorrent.
Run deluged again

Durandle
Posts: 23
Joined: Thu Oct 09, 2014 10:51 am

Re: HOWTO: Install/Upgrade Deluge BitTorrent on FFP 0.7-arm

Post by Durandle » Fri May 15, 2015 8:01 am

Work is busier than normal today, I'll do this later today. I know you're right about testing properly, I just always feel the setup is super fragile and swapping things in and out may just completely break stuff. I know that is a little paranoid mind :P

barmalej2
Posts: 2388
Joined: Sun Apr 29, 2012 5:24 pm

Re: HOWTO: Install/Upgrade Deluge BitTorrent on FFP 0.7-arm

Post by barmalej2 » Fri May 15, 2015 9:47 am

I have added additional steps for downgrading post instructions, because previous versions of deluge is not compatible with latest setuptools.
It is pretty much safe to downgrade, cause you always has ability revert changes back by upgrading to current versions of packages.

Durandle
Posts: 23
Joined: Thu Oct 09, 2014 10:51 am

Re: HOWTO: Install/Upgrade Deluge BitTorrent on FFP 0.7-arm

Post by Durandle » Sat May 16, 2015 7:36 am

Ok I tried all that. With the downgraded libtorrent, it results in deluge crashing on load:

Traceback (most recent call last):
File "/ffp/lib/python2.7/site-packages/deluge/main.py", line 230, in start_daemon
Daemon(options, args)
File "/ffp/lib/python2.7/site-packages/deluge/core/daemon.py", line 136, in __init__
from deluge.core.core import Core
File "/ffp/lib/python2.7/site-packages/deluge/core/core.py", line 36, in <module>
from deluge._libtorrent import lt
File "/ffp/lib/python2.7/site-packages/deluge/_libtorrent.py", line 59, in <module>
import libtorrent as lt
ImportError: File not found

Keeping libtorrent updated means it doesn't crash but also still gives the same error as before.

barmalej2
Posts: 2388
Joined: Sun Apr 29, 2012 5:24 pm

Re: HOWTO: Install/Upgrade Deluge BitTorrent on FFP 0.7-arm

Post by barmalej2 » Sat May 16, 2015 12:09 pm

Which libtorrent version was used to run previous deluge version?

Durandle
Posts: 23
Joined: Thu Oct 09, 2014 10:51 am

Re: HOWTO: Install/Upgrade Deluge BitTorrent on FFP 0.7-arm

Post by Durandle » Wed May 20, 2015 7:17 am

I was using libtorrent-0.16.16_svn9886-arm-2.txz, the only other one I have cached.

barmalej2
Posts: 2388
Joined: Sun Apr 29, 2012 5:24 pm

Re: HOWTO: Install/Upgrade Deluge BitTorrent on FFP 0.7-arm

Post by barmalej2 » Wed May 27, 2015 7:23 pm

I will try to prepare updated libtorrent and deluge packages. Lets hope, it will help you with https trackers issue.

Durandle
Posts: 23
Joined: Thu Oct 09, 2014 10:51 am

Re: HOWTO: Install/Upgrade Deluge BitTorrent on FFP 0.7-arm

Post by Durandle » Thu May 28, 2015 3:12 am

I really appreciate that, though honestly if it eats up much of your time, leave it be. I can work something out, be it using a different client or perhaps resorting to http trackers, though I'd have to use a VPN then (since the tracker traffic would otherwise be blocked, stupid ISP)

barmalej2
Posts: 2388
Joined: Sun Apr 29, 2012 5:24 pm

Re: HOWTO: Install/Upgrade Deluge BitTorrent on FFP 0.7-arm

Post by barmalej2 » Fri May 29, 2015 6:16 pm

though honestly if it eats up much of your time, leave it be

It is not a problem (sometimes). Most of the time, prepared build scripts works for me :) Libttorent takes about 4 hours to compile (I leave my NAS for night for that), deluge-from 4 to 20 minutes (depends on release and github speed).
Anyway new builds are ready for testing.
Stop deluged daemon first:

Code: Select all

sh /ffp/start/deluged.sh stop
Install with funpkg tool:
http://downloads.zyxel.nas-central.org/ ... -arm-2.txz
http://downloads.zyxel.nas-central.org/ ... -arm-2.txz
Update python Twisted and setuptools packages as well:

Code: Select all

pip install -U Twisted setuptools
Run deluged daemon again:

Code: Select all

sh /ffp/start/deluged.sh start

Durandle
Posts: 23
Joined: Thu Oct 09, 2014 10:51 am

Re: HOWTO: Install/Upgrade Deluge BitTorrent on FFP 0.7-arm

Post by Durandle » Mon Jun 01, 2015 4:56 am

Thanks for doing all that, it's still giving me "(-1) unknown state" on the tracker in the debug log. For the sake of (a) having it work and (b) not wasting peoples time any further, I'll flip the switch to make things http only and configure a VPN on my NAS. Kinda a sucky solution but I think its the only one I have right now. I may take a look at the Python code to see if there are some hints for what the error actually is (I am actually a programmer, just never used Python).

barmalej2
Posts: 2388
Joined: Sun Apr 29, 2012 5:24 pm

Re: HOWTO: Install/Upgrade Deluge BitTorrent on FFP 0.7-arm

Post by barmalej2 » Mon Jun 01, 2015 7:31 pm

Well, it is understandable. For last shot, please paste outputs of :

Code: Select all

ls /ffp/etc/ssl | grep pem
and

Code: Select all

ls /ffp/etc/ssl/certs | grep pem

Post Reply