Python 2.7.9 and SABnzbd SSL Problem [FIXED]

The discussion lounge for third-party packages.
Forum rules
Please note the Disclaimer before modifying your Synology Product.
dakh
Student
Student
Posts: 62
Joined: Tue Apr 17, 2012 12:05 pm

Python 2.7.9 and SABnzbd SSL Problem [FIXED]

Postby dakh » Sun Mar 22, 2015 3:08 pm

There is an issue with SABnzbd 0.7.20 (and lower) with python 2.7.9 with untrusted HTTPS index/RSS sites.

Within Sabnzbd, I can't now retrieve nzb files from nzb.su and OZnzb since upgrading to Python 2.7.9, when connecting using HTTPS.

Manually adding nzb file downloads OK - but not via Couchpotato or Sickbeard anymore :-(

I get this in message Sabnzbd:

WAIT xx sec / Trying to fetch NZB from https://[oznzb url]/[SOMEFEEDID]

It is documented here http://forums.sabnzbd.org/viewtopic.php ... 7&start=15

and here

http://forums.sabnzbd.org/viewtopic.php?f=2&t=18509


Anyone else have this issue, or have a fix, please?

I would like to downgrade to Python 2.7.8 if anyone can send me a direct download link for a DS1812+ please?
Last edited by dakh on Mon Mar 23, 2015 12:43 am, edited 2 times in total.
stefaanbolle
Experienced
Experienced
Posts: 130
Joined: Fri Nov 30, 2012 7:44 pm

Re: Python 2.7.9 and SABnzbd SSL Problem

Postby stefaanbolle » Sun Mar 22, 2015 4:16 pm

Since upgrading the python package I cannot run sabnzbd anymore on my DS213+
I removed the package and reinstalled but same issue. Package failed to start
trazom24
I'm New!
I'm New!
Posts: 5
Joined: Thu Mar 20, 2014 12:21 pm

Re: Python 2.7.9 and SABnzbd SSL Problem

Postby trazom24 » Sun Mar 22, 2015 4:23 pm

Same here.

Updated to python 2.7.9 and since then I get the error messages described for all Usenet requests. Everything is broken.

I tried uninstalling python 2.7.9 and re-installing 2.7.8 (which doesn't check for certificates on the untrusted URLs and thus doesn't have this problem), but no good as 2.7.8 is now incompatible with my current version of DSM - also upgraded recently (5.1 - 5022 update 4). So it appears the old circular problem of not being able to go back to something that once worked.

I suspect this is broken for everyone who uses their DSM for usenet requests through Sickbeard, SABnzbd, etc.

Still looking to see if there is a way to disable the certificate checking in 2.7.9.

An alternative is Sonarr which doesn't run on python, but obviously that requires a day's worth of work setting up and migrating the configuration from Sickbeard, which I am loathe do to at this point.
dakh
Student
Student
Posts: 62
Joined: Tue Apr 17, 2012 12:05 pm

Re: Python 2.7.9 and SABnzbd SSL Problem

Postby dakh » Sun Mar 22, 2015 6:54 pm

I have reported it to SynoCommunity:

Here is the thread - looks like they are on the case. Just have to wait while they work their magic - seems like a generic Python issue, as opposed to a specific Synology issue.

https://github.com/SynoCommunity/spksrc/issues/1575

Sonarr and NZBget might be the way to go if there is no quick fix I guess. But this will take a while to set up.
Last edited by dakh on Mon Mar 23, 2015 12:42 am, edited 1 time in total.
robpaxton
I'm New!
I'm New!
Posts: 1
Joined: Sun Mar 22, 2015 7:58 pm

Re: Python 2.7.9 and SABnzbd SSL Problem

Postby robpaxton » Sun Mar 22, 2015 9:02 pm

A temporary solution is edit Sickbeard.py and add the code as per https://github.com/abeloin/SickRage/commit/21fcea2c3155f57dba5c64a55f1f8fee02804256

also modify Sabnzbd.py as per sander's first post at http://forums.sabnzbd.org/viewtopic.php?f=1&t=18565

This seems to have worked for me.
dakh
Student
Student
Posts: 62
Joined: Tue Apr 17, 2012 12:05 pm

Re: Python 2.7.9 and SABnzbd SSL Problem

Postby dakh » Sun Mar 22, 2015 9:55 pm

FIXED:
From Github - thanks to Dr Bean.

This might just work as a quick fix: ln -s /etc/ssl/certs/ca-certificates.crt /usr/local/python/cert.pem
Note: at your own risk. I tested with Sickbeard, but I don't have an infrastructure available for proper testing right now.
If this works, then we probably know how to provide a fix from within the Python package.


SSH into the Diskstation, and execute as root:

ln -s /etc/ssl/certs/ca-certificates.crt /usr/local/python/cert.pem

I have tested myself as working using SABnzb on my 1812+ running DSM 5.1 5022 update 4, Python 2.7.9, and SABnzb 0.7.20-13
gator
Student
Student
Posts: 75
Joined: Sun Oct 27, 2013 3:06 am

Re: Python 2.7.9 and SABnzbd SSL Problem [FIXED]

Postby gator » Mon Mar 23, 2015 2:39 am

I have tried the

Code: Select all

ln -s /etc/ssl/certs/ca-certificates.crt /usr/local/python/cert.pem
fix, but it does not seem to work for me.

If I goto https://diskstation.example.com:9090/ or https://diskstation.example.com:8081/ sites from chrome I get a green https and padlock. When I try wget of those same sites I get:

Code: Select all

> wget https://diskstation.example.com:9090/
--2015-03-22 21:30:13--  https://diskstation.example.com:9090/
Resolving diskstation.example.com... xx.xx.xx.xx
Connecting to diskstation.example.com|xx.xx.xx.xx|:9090... connected.
ERROR: cannot verify diskstation.example.com's certificate, issued by '/C=IL/O=StartCom Ltd./OU=Secure Digital Certificate Signing/CN=StartCom Class 1 Primary Intermediate Server CA':
  Unable to locally verify the issuer's authority.
To connect to diskstation.example.com insecurely, use `--no-check-certificate'.
>

Also wget has no problem with https://diskstation.example.com/

Is there something else I need to do to get it to work?

Thanks
dakh
Student
Student
Posts: 62
Joined: Tue Apr 17, 2012 12:05 pm

Re: Python 2.7.9 and SABnzbd SSL Problem [FIXED]

Postby dakh » Mon Mar 23, 2015 11:23 am

There is a discussion regarding self-signed certificates at the SynoCommunity GitHib thread:

https://github.com/SynoCommunity/spksrc ... t-84930841

But as you have observed this fix does not work for self-signed certificates.

BTW - Python 2.7.9 has been updated in Packeage Centre.
zoomee
Novice
Novice
Posts: 47
Joined: Fri Jan 18, 2013 11:45 pm

Re: Python 2.7.9 and SABnzbd SSL Problem [FIXED]

Postby zoomee » Mon Mar 23, 2015 8:24 pm

I've purposely not upgraded python to the latest release as it ALWAYS breaks sabnzbd lol.

Let us know when its safe to do so please chaps - thanks
DS-415+ 3x3Tb WD red + 1x2Tb WD Purple
gator
Student
Student
Posts: 75
Joined: Sun Oct 27, 2013 3:06 am

Re: Python 2.7.9 and SABnzbd SSL Problem [FIXED]

Postby gator » Mon Mar 23, 2015 8:57 pm

My certificate is not self signed. It is from https://www.startssl.com which is StartCom ltd.

I also just took the fix out and updated Python and still get the error.
marlowe310
Trainee
Trainee
Posts: 16
Joined: Sat Apr 26, 2014 9:37 am

Re: Python 2.7.9 and SABnzbd SSL Problem [FIXED]

Postby marlowe310 » Mon Mar 23, 2015 11:55 pm

Apologies for the basic question, but how do you reverse the quickfix listed above -- and is reversing it necessary, once Python gets updated (again, since the most recent update doesn't seem to have fixed the issue)?

I want to get my Sickbeard/NZBget working, but I don't want to do anything that'll cause longer term issues down the road.

Thanks much for any help/info.
marlowe310
Trainee
Trainee
Posts: 16
Joined: Sat Apr 26, 2014 9:37 am

Re: Python 2.7.9 and SABnzbd SSL Problem [FIXED]

Postby marlowe310 » Tue Mar 24, 2015 2:23 am

Went ahead and tried the quickfix and got back an error stating "file exists".

I tried rebooting after that, but nothing seems to have changed -- Sickbeard still cannot connect to NZBget, nor any indexers. Am I doing something wrong? Or missing the obvious solution?

Thanks much.
dakh
Student
Student
Posts: 62
Joined: Tue Apr 17, 2012 12:05 pm

Re: Python 2.7.9 and SABnzbd SSL Problem [FIXED]

Postby dakh » Tue Mar 24, 2015 12:09 pm

Did you try the Python 2.7.9 update released yesterday from SynoCommunity?
marlowe310
Trainee
Trainee
Posts: 16
Joined: Sat Apr 26, 2014 9:37 am

Re: Python 2.7.9 and SABnzbd SSL Problem [FIXED]

Postby marlowe310 » Tue Mar 24, 2015 8:16 pm

I did -- it didn't seem to change the situation at all. I've shifted over to Sonarr for the time being, but I fear that's unsustainable as I'm running a DS213j, and Mono alone seems to dominate my CPU all the time.

Has the update worked for other people's sickbeard config?
dakh
Student
Student
Posts: 62
Joined: Tue Apr 17, 2012 12:05 pm

Re: Python 2.7.9 and SABnzbd SSL Problem [FIXED]

Postby dakh » Tue Mar 24, 2015 11:28 pm

I suggest you take a look here:

https://github.com/SynoCommunity/spksrc/issues/1600

Maybe you can turn off https for internal traffic?

Return to “Third-party Packages”

Who is online

Users browsing this forum: No registered users and 2 guests