Page 1 of 1

0.7.9 ipv6 fails

Posted: January 13th, 2013, 7:01 am
by Hans55
As of 0.7.9 my ipv6 server (newszilla) reports "failing to initialize".
Back to 0.7.7 and the ipv6 server is connected as usual.
Thought to let you know,

Hans

Re: 0.7.9 ipv6 fails

Posted: January 13th, 2013, 7:48 am
by sander
I have no problems with 0.7.9 and newszilla6 on Ubuntu and native IPv6.

However, there's another report with IPv6 and the same error message: http://forums.sabnzbd.org/viewtopic.php ... ize#p77617

So: which platform do you run SABnzbd on? And what kind of IPv6: native, or teredo, or ... ?

Checking: you write "failing to initialize", but I guess you mean "failed to initialize"...?

Re: 0.7.9 ipv6 fails

Posted: January 14th, 2013, 5:48 am
by sander
Hans, two easy checks:

What does http://test-ipv6.com/ say about your IPv6?

Only if that site shows your IPv6 address, continu:

What does

Code: Select all

telnet newszilla6.xs4all.nl 119
result in? NB: On Win7 you first have to install the telnet client as descirbed here: http://technet.microsoft.com/en-us/libr ... s.10).aspx

Re: 0.7.9 ipv6 fails

Posted: January 14th, 2013, 4:31 pm
by 87U8
I upgraded to 0.7.9 and IPv6 connections were always refused, with the error message "Server quit during login sequence". Downgrading to 0.7.6 fixes the issue and I can connect no problem. On Windows 7 x64. I can ping the IPv6 servers at all times.

Re: 0.7.9 ipv6 fails

Posted: January 14th, 2013, 5:27 pm
by shypike
Sounds rather unlikely, given the absolutely minimal changes to socket handling.
Does 0.7.7 work?
What happens if you set "ipv6_servers" in Config->Special to the value 2?
(Using 0.7.9)

Re: 0.7.9 ipv6 fails

Posted: January 14th, 2013, 6:04 pm
by 87U8
Yes, you're right, for whatever reason 0.7.9 didn't connect before but does now! I went from 0.7.6 to 0.7.7, which worked, then 0.7.9 and that also worked.

Re: 0.7.9 ipv6 fails

Posted: January 15th, 2013, 4:50 am
by shypike
Did you need to set "ipv6_servers" in Config->Special to the value 2?
Or did it just spontaneously started working again?

Re: 0.7.9 ipv6 fails

Posted: January 15th, 2013, 7:48 am
by Vyp3R
shypike wrote:Did you need to set "ipv6_servers" in Config->Special to the value 2?
I've had the same problem with Sabnzbd 0.7.9 under Windows 7 x64 as above. Didn't twig that it was an upgrade of Sab that had stopped the ipv6 servers.
Anyway, I've stayed on 0.7.9 and changed "ipv6_servers" to 2 in Config > Special and the servers are all working again! Yay!

So the question remains, why change this value from one version to another, and why didn't it pop up for the beta testers who have Win7 x64?

Re: 0.7.9 ipv6 fails

Posted: January 15th, 2013, 10:03 am
by shypike
SABnzbd tries to test whether or not your system has access to external IPV6 systems;
it uses Google's IPV6-only servers for this test.
Setting the value of the special to 2 will override the result of this test.
It looks that for some reason the test fails on your system, while IPV6 is available.
This is the test used:

Code: Select all

def test_ipv6():
    """ Check if external IPv6 addresses are reachable """
    # Use google.com to test IPv6 access
    try:
        info = socket.getaddrinfo('www.google.com', 80, socket.AF_INET6, socket.SOCK_STREAM,
                                  socket.IPPROTO_IP, socket.AI_CANONNAME)
    except:
        return False

    try:
        af, socktype, proto, canonname, sa = info[0]
        sock = socket.socket(af, socktype, proto)
        sock.settimeout(6)
        sock.connect(sa[0:2])
        sock.close()
        return True
    except:
        return False
This was introduced for the large group of users where the following conditions are true:
1. An OS with active IPv6
2. Not able to actually use IPv6
3. Having a Usenet provider that lists both IPv6 and IPv4 addresses

For a small minority condition 2 is different.
And for an even smaller group the Google test fails, while all other conditions are OK.

Re: 0.7.9 ipv6 fails

Posted: January 15th, 2013, 10:36 am
by sander
And the meaning of "ipv6_servers" is:
"Control the use of IPv6 Usenet server addresses. Only useful when you have an IPv6 capable ISP and connect to servers that (also) have IPv6 addresses. Meaning: 0 = don't use, 1 = use when available and reachable, 2 = force usage (when SABnzbd's detection fails) [0.7.6+ only]"

So with this option "ipv6_servers" you overwrite the outcome of test_ipv6() ?

PS: some nitpicking: you say "it uses Google's IPV6-only servers for this test.", but in the code you use www.google.com and check for IPv6. That's what you mean, right? FWIW: ipv6.google.com is really ipv6-only. What that make the test better?

Re: 0.7.9 ipv6 fails

Posted: January 15th, 2013, 11:35 am
by sander
@Vyp3R

Let's check whether things go wrong in the first test of the code snippet Shypike posted

Can you install python on your Windows, save the code below in a file blabla.py, and then run it "python blabla.py" and post the output here?

Code: Select all

import socket

print "\n\nFirst only IPv6 lookups for www.google.com and ipv6.google.com"


info = socket.getaddrinfo('www.google.com', 80, socket.AF_INET6, socket.SOCK_STREAM,socket.IPPROTO_IP, socket.AI_CANONNAME)
print info

info = socket.getaddrinfo('ipv6.google.com', 80, socket.AF_INET6, socket.SOCK_STREAM,socket.IPPROTO_IP, socket.AI_CANONNAME)
print info


print "\n\nNow normal lookups (IPv4 and IPv6) for www.google.com and ipv6.google.com"

info = socket.getaddrinfo('www.google.com', 80)
print info

info = socket.getaddrinfo('ipv6.google.com', 80)
print info

print "\nFinished\n\n"
Here's my output:


Code: Select all

First only IPv6 lookups for www.google.com and ipv6.google.com
[(10, 1, 6, 'www.google.com', ('2a00:1450:400c:c05::93', 80, 0, 0))]
[(10, 1, 6, 'ipv6.l.google.com', ('2a00:1450:400c:c05::6a', 80, 0, 0))]


Now normal lookups (IPv4 and IPv6) for www.google.com and ipv6.google.com
[(2, 1, 6, '', ('173.194.78.103', 80)), (2, 2, 17, '', ('173.194.78.103', 80)), (2, 3, 0, '', ('173.194.78.103', 80)), (2, 1, 6, '', ('173.194.78.105', 80)), (2, 2, 17, '', ('173.194.78.105', 80)), (2, 3, 0, '', ('173.194.78.105', 80)), (2, 1, 6, '', ('173.194.78.104', 80)), (2, 2, 17, '', ('173.194.78.104', 80)), (2, 3, 0, '', ('173.194.78.104', 80)), (2, 1, 6, '', ('173.194.78.106', 80)), (2, 2, 17, '', ('173.194.78.106', 80)), (2, 3, 0, '', ('173.194.78.106', 80)), (2, 1, 6, '', ('173.194.78.147', 80)), (2, 2, 17, '', ('173.194.78.147', 80)), (2, 3, 0, '', ('173.194.78.147', 80)), (2, 1, 6, '', ('173.194.78.99', 80)), (2, 2, 17, '', ('173.194.78.99', 80)), (2, 3, 0, '', ('173.194.78.99', 80)), (10, 1, 6, '', ('2a00:1450:400c:c05::93', 80, 0, 0)), (10, 2, 17, '', ('2a00:1450:400c:c05::93', 80, 0, 0)), (10, 3, 0, '', ('2a00:1450:400c:c05::93', 80, 0, 0))]
[(10, 1, 6, '', ('2a00:1450:400c:c05::6a', 80, 0, 0)), (10, 2, 17, '', ('2a00:1450:400c:c05::6a', 80, 0, 0)), (10, 3, 0, '', ('2a00:1450:400c:c05::6a', 80, 0, 0))]

Finished

Re: 0.7.9 ipv6 fails

Posted: January 16th, 2013, 7:29 am
by Vyp3R
Here you go...

Code: Select all

First only IPv6 lookups for www.google.com and ipv6.google.com
[(23, 1, 0, 'www.google.com', ('2404:6800:4006:800::1014', 80, 0, 0))]
[(23, 1, 0, 'ipv6.l.google.com', ('2404:6800:4006:804::1012', 80, 0, 0))]


Now normal lookups (IPv4 and IPv6) for www.google.com and ipv6.google.com
[(23, 0, 0, '', ('2404:6800:4006:803::1014', 80, 0, 0)), (2, 0, 0, '', ('74.125.237.113', 80)), 
(2, 0, 0, '', ('74.125.237.112', 80)), (2, 0, 0, '', ('74.125.237.116', 80)), 
(2, 0, 0, '', ('74.125.237.115', 80)), (2, 0, 0, '', ('74.125.237.114', 80))]
[(23, 0, 0, '', ('2404:6800:4006:803::1011', 80, 0, 0))]

Finished

Re: 0.7.9 ipv6 fails

Posted: January 16th, 2013, 8:12 am
by sander
Hmm. Strange: no error message, so the problem must be in the second part of the code snippet. So, can you get the same file blabla.py, and add this at the end:

Code: Select all

af, socktype, proto, canonname, sa = info[0]
sock = socket.socket(af, socktype, proto)
sock.settimeout(6)
sock.connect(sa[0:2])
sock.close()
after each of the four "print info" statements, and then run it again?

I hope that gives an exception error. The only reason I can think of is that the port 80 connection is not succeeding, for example because of a firewall or maybe proxy.

Re: 0.7.9 ipv6 fails

Posted: January 16th, 2013, 8:44 am
by Vyp3R
sander wrote:I hope that gives an exception error.
No it doesn't... Placed the code after each print info statement, just does the same thing:

Code: Select all

First only IPv6 lookups for www.google.com and ipv6.google.com
[(23, 1, 0, 'www.google.com', ('2404:6800:4006:803::1011', 80, 0, 0))]
[(23, 1, 0, 'ipv6.l.google.com', ('2404:6800:4006:803::1014', 80, 0, 0))]


Now normal lookups (IPv4 and IPv6) for www.google.com and ipv6.google.com
[(23, 0, 0, '', ('2404:6800:4006:803::1011', 80, 0, 0)), (2, 0, 0, '', ('74.125.237.116', 80)),
(2, 0, 0, '', ('74.125.237.115', 80)), (2, 0, 0, '', ('74.125.237.112', 80)),
(2, 0, 0, '', ('74.125.237.113', 80)), (2, 0, 0, '', ('74.125.237.114', 80))]
[(23, 0, 0, '', ('2404:6800:4006:803::1014', 80, 0, 0))]

Finished
And before you ask, SABnzbd is listed as an exception in Windows Firewall.

Re: 0.7.9 ipv6 fails

Posted: January 16th, 2013, 9:01 am
by sander
So no exception in 'my' code, so 99,999% sure neither in the code snippet Shypike gave.

... then I'm out of ideas.