WAIT xx secs - Trying to fetch... on ALL from several sites

Get help with all aspects of SABnzbd
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
User avatar
eydaimon
Jr. Member
Jr. Member
Posts: 86
Joined: March 16th, 2008, 2:00 pm

Re: WAIT xx secs - Trying to fetch... on ALL from several si

Post by eydaimon »

I checked the certificate with Chrome and it appears to be OK

Image

Are you sure this is the issue? Or is the https cert different from SSL cert?
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: WAIT xx secs - Trying to fetch... on ALL from several si

Post by shypike »

It depends on whether Chrome uses its own root certificate store
or uses the one provided by the operating system.
Python uses the latter.
Try this tiny Python program:

Code: Select all

#!/usr/bin/python
import urllib2
x = urllib2.urlopen("https://YOUR_URL")
print x
An alternative is to use an older Python version, like 2.5 or 2.6.
Often Unix systems have multiple versions installed.
User avatar
eydaimon
Jr. Member
Jr. Member
Posts: 86
Joined: March 16th, 2008, 2:00 pm

Re: WAIT xx secs - Trying to fetch... on ALL from several si

Post by eydaimon »

Code: Select all

urllib2.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581)>
OK, so what you said is obviously correct.

May I suggest for SABnzbd a couple of things then. First, stop retrying when this is the issue, and second post a message to the user that there's an SSL cert failure, and to contact the provider as a possible solution to fix the issue.

Sound reasonable?

Since it sounds like the fix may take some time, I'll do as you suggest and see about using 2.6 in the meantime while also contacting the provider.
User avatar
eydaimon
Jr. Member
Jr. Member
Posts: 86
Joined: March 16th, 2008, 2:00 pm

Re: WAIT xx secs - Trying to fetch... on ALL from several si

Post by eydaimon »

Looks like my options are python2.7 or python3.x

You didn't suggest python 3.x so it doesn't work I assume?





Code: Select all

python2-2_3
python27-2.7.9
python3-3_3
python32-3.2.5_12
python33-3.3.5_5
python34-3.4.3
and python2 is just an alias to python 2.7
User avatar
eydaimon
Jr. Member
Jr. Member
Posts: 86
Joined: March 16th, 2008, 2:00 pm

Re: WAIT xx secs - Trying to fetch... on ALL from several si

Post by eydaimon »

Installing 2.6.9 with https://github.com/yyuu/pyenv

seems easy enough ;)
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: WAIT xx secs - Trying to fetch... on ALL from several si

Post by shypike »

eydaimon wrote:

Code: Select all

urllib2.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581)>
May I suggest for SABnzbd a couple of things then. First, stop retrying when this is the issue, and second post a message to the user that there's an SSL cert failure, and to contact the provider as a possible solution to fix the issue.

Sound reasonable?
Not that reasonable, since the first line of trouble is in the feedparser.py code, a complicated third-party animal.
The problem that the Python people change the default behaviour overnight.
(And of course that some sites use bad certificates, or at least ones with less-than-general acceptance.)
I'll do my best to come up with a solution, although disabling security mechanisms is that good an idea :(
User avatar
sander
Release Testers
Release Testers
Posts: 9061
Joined: January 22nd, 2008, 2:22 pm

Re: WAIT xx secs - Trying to fetch... on ALL from several si

Post by sander »

Isn't this the same as what I described here: http://forums.sabnzbd.org/viewtopic.php?f=1&t=18565 ?

Ugly workaround (disabling the SSL checking): http://forums.sabnzbd.org/viewtopic.php ... 565#p98483
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: WAIT xx secs - Trying to fetch... on ALL from several si

Post by shypike »

sander wrote: Ugly workaround (disabling the SSL checking): http://forums.sabnzbd.org/viewtopic.php ... 565#p98483
Does that also cover RSS feeds?
User avatar
sander
Release Testers
Release Testers
Posts: 9061
Joined: January 22nd, 2008, 2:22 pm

Re: WAIT xx secs - Trying to fetch... on ALL from several si

Post by sander »

shypike wrote:
sander wrote: Ugly workaround (disabling the SSL checking): http://forums.sabnzbd.org/viewtopic.php ... 565#p98483
Does that also cover RSS feeds?
IIRC: Yes. As it all started with nzbindex.nl versus nzindex.com RSS
User avatar
eydaimon
Jr. Member
Jr. Member
Posts: 86
Joined: March 16th, 2008, 2:00 pm

Re: WAIT xx secs - Trying to fetch... on ALL from several si

Post by eydaimon »

FYI using youtube_dl on the freebsd machine gives me the same error, whereas using youtube_dl on osx with the same version of python does not. ANy idea why that would make a difference?





note: they on the other hand have a --no-check-certificate flag which means I can still use it. But this makes me think it's OS specific
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: WAIT xx secs - Trying to fetch... on ALL from several si

Post by shypike »

eydaimon wrote:FYI using youtube_dl on the freebsd machine gives me the same error, whereas using youtube_dl on osx with the same version of python does not. ANy idea why that would make a difference?
It's specific for Python 2.7.9, no earlier version verifies certificates.
OSX doesn't have it. For Windows only the "original" Python, but not the popular ActiveState Python.
Only very recent Linux/Unix distros have it.
User avatar
eydaimon
Jr. Member
Jr. Member
Posts: 86
Joined: March 16th, 2008, 2:00 pm

Re: WAIT xx secs - Trying to fetch... on ALL from several si

Post by eydaimon »

For now I used Sanders hack (Thank you Sanders!)

And just put

Code: Select all

opt_out_of_certificate_verification = True
if opt_out_of_certificate_verification:
    try:
        import ssl
        ssl._create_default_https_context = ssl._create_unverified_context
    except:
        pass
in the beginning of SABnzbd.py
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: WAIT xx secs - Trying to fetch... on ALL from several si

Post by shypike »

Ok, I'll look at it again as soon as I have my Ubuntu Vivid up and running.
Post Reply