Page 1 of 2

ipv6 servers "Incorrect parameter"

Posted: May 6th, 2013, 7:21 pm
by The_Great_Beast
my server is reader.ipv6.xsnews.nl or 2001:67c:174:101::1337
entering it in sab > config > servers it will say
"Incorrect parameter
Server address "2001:67c:174:101::1337:119" is not valid. "

although i can ping it fine

Code: Select all

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\xx>ping reader.ipv6.xsnews.nl

Pinging reader.ipv6.xsnews.nl [2001:67c:174:101::1337] with 32 bytes of data:
Reply from 2001:67c:174:101::1337: time=1117ms
Reply from 2001:67c:174:101::1337: time=1109ms
Reply from 2001:67c:174:101::1337: time=1083ms
Reply from 2001:67c:174:101::1337: time=1155ms

Ping statistics for 2001:67c:174:101::1337:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 1083ms, Maximum = 1155ms, Average = 1116ms

C:\Users\xx>

Re: ipv6 servers "Incorrect parameter"

Posted: May 7th, 2013, 12:18 am
by sander
What happens when you fill out:

reader.ipv6.xsnews.nl
newszilla6.xs4all.nl
newszilla.xs4all.nl

Re: ipv6 servers "Incorrect parameter"

Posted: May 8th, 2013, 1:43 pm
by The_Great_Beast
sander wrote:What happens when you fill out:

reader.ipv6.xsnews.nl
newszilla6.xs4all.nl
newszilla.xs4all.nl
same as above except for newszilla.xs4all.nl it works

Re: ipv6 servers "Incorrect parameter"

Posted: May 9th, 2013, 3:36 am
by sander
My guess it that something is wrong with IPv6 resolving from within python. (Python seems to have it's own name resolving setup, which can be different from the OS name resolving setup).

Do you have python installed? Can you run "python.exe" from the commandline?

Re: ipv6 servers "Incorrect parameter"

Posted: May 9th, 2013, 12:37 pm
by The_Great_Beast
sander wrote:My guess it that something is wrong with IPv6 resolving from within python. (Python seems to have it's own name resolving setup, which can be different from the OS name resolving setup).

Do you have python installed? Can you run "python.exe" from the commandline?
it was not installed. I have it installed now to C:\Python33 and have python.exe

Re: ipv6 servers "Incorrect parameter"

Posted: May 9th, 2013, 1:00 pm
by sander
Python 3.3 ... ouch. That's not used by SABnzbd. Let's try anyway:

Start python. Then in python, type:

Code: Select all

import socket
socket.getaddrinfo('www.google.com', None)
socket.getaddrinfo('ipv6.google.com', None)
and post the full output here. See mine below.

Code: Select all

$ python
Python 2.7.4 (default, Apr 19 2013, 18:28:01) 
[GCC 4.7.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import socket
>>> socket.getaddrinfo('localhost', None)
[(2, 1, 6, '', ('127.0.0.1', 0)), (2, 2, 17, '', ('127.0.0.1', 0)), (2, 3, 0, '', ('127.0.0.1', 0))]
>>> socket.getaddrinfo('www.google.com', None)
[(10, 1, 6, '', ('2a00:1450:400c:c06::63', 0, 0, 0)), (10, 2, 17, '', ('2a00:1450:400c:c06::63', 0, 0, 0)), (10, 3, 0, '', ('2a00:1450:400c:c06::63', 0, 0, 0)), (2, 1, 6, '', ('74.125.132.106', 0)), (2, 2, 17, '', ('74.125.132.106', 0)), (2, 3, 0, '', ('74.125.132.106', 0)), (2, 1, 6, '', ('74.125.132.104', 0)), (2, 2, 17, '', ('74.125.132.104', 0)), (2, 3, 0, '', ('74.125.132.104', 0)), (2, 1, 6, '', ('74.125.132.105', 0)), (2, 2, 17, '', ('74.125.132.105', 0)), (2, 3, 0, '', ('74.125.132.105', 0)), (2, 1, 6, '', ('74.125.132.103', 0)), (2, 2, 17, '', ('74.125.132.103', 0)), (2, 3, 0, '', ('74.125.132.103', 0)), (2, 1, 6, '', ('74.125.132.147', 0)), (2, 2, 17, '', ('74.125.132.147', 0)), (2, 3, 0, '', ('74.125.132.147', 0)), (2, 1, 6, '', ('74.125.132.99', 0)), (2, 2, 17, '', ('74.125.132.99', 0)), (2, 3, 0, '', ('74.125.132.99', 0))]
>>> socket.getaddrinfo('ipv6.google.com', None)
[(10, 1, 6, '', ('2a00:1450:400c:c03::63', 0, 0, 0)), (10, 2, 17, '', ('2a00:1450:400c:c03::63', 0, 0, 0)), (10, 3, 0, '', ('2a00:1450:400c:c03::63', 0, 0, 0))]
>>>
PS:

FWIW I tested the code on my python3 too, with the same result as under python (read: python2):

Code: Select all

$ python3
Python 3.3.1 (default, Apr 17 2013, 22:30:32) 
[GCC 4.7.3] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import socket
>>> socket.getaddrinfo('www.google.com', None)
[(10, 1, 6, '', ('2a00:1450:400c:c05::68', 0, 0, 0)), (10, 2, 17, '', ('2a00:1450:400c:c05::68', 0, 0, 0)), (10, 3, 0, '', ('2a00:1450:400c:c05::68', 0, 0, 0)), (2, 1, 6, '', ('173.194.67.99', 0)), (2, 2, 17, '', ('173.194.67.99', 0)), (2, 3, 0, '', ('173.194.67.99', 0)), (2, 1, 6, '', ('173.194.67.103', 0)), (2, 2, 17, '', ('173.194.67.103', 0)), (2, 3, 0, '', ('173.194.67.103', 0)), (2, 1, 6, '', ('173.194.67.147', 0)), (2, 2, 17, '', ('173.194.67.147', 0)), (2, 3, 0, '', ('173.194.67.147', 0)), (2, 1, 6, '', ('173.194.67.106', 0)), (2, 2, 17, '', ('173.194.67.106', 0)), (2, 3, 0, '', ('173.194.67.106', 0)), (2, 1, 6, '', ('173.194.67.104', 0)), (2, 2, 17, '', ('173.194.67.104', 0)), (2, 3, 0, '', ('173.194.67.104', 0)), (2, 1, 6, '', ('173.194.67.105', 0)), (2, 2, 17, '', ('173.194.67.105', 0)), (2, 3, 0, '', ('173.194.67.105', 0))]
>>> socket.getaddrinfo('ipv6.google.com', None)
[(10, 1, 6, '', ('2a00:1450:400c:c03::63', 0, 0, 0)), (10, 2, 17, '', ('2a00:1450:400c:c03::63', 0, 0, 0)), (10, 3, 0, '', ('2a00:1450:400c:c03::63', 0, 0, 0))]
>>> 
$ 

Re: ipv6 servers "Incorrect parameter"

Posted: May 9th, 2013, 2:14 pm
by The_Great_Beast
I can install the other version if needed.

Code: Select all

Python 3.3.1 (v3.3.1:d9893d13c628, Apr  6 2013, 20:30:21) [MSC v.1600 64 bit (AM
D64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import socket
>>> socket.getaddrinfo('www.google.com', None)
[(23, 0, 0, '', ('2607:f8b0:400f:800::1013', 0, 0, 0)), (2, 0, 0, '', ('74.125.2
25.212', 0)), (2, 0, 0, '', ('74.125.225.211', 0)), (2, 0, 0, '', ('74.125.225.2
08', 0)), (2, 0, 0, '', ('74.125.225.209', 0)), (2, 0, 0, '', ('74.125.225.210',
 0))]
>>> socket.getaddrinfo('ipv6.google.com', None)
[(23, 0, 0, '', ('2607:f8b0:400f:800::1013', 0, 0, 0))]
>>>

Re: ipv6 servers "Incorrect parameter"

Posted: May 9th, 2013, 3:02 pm
by sander
So IPv6 name resolving does work in Python. Not what I expected.

Can you find and open sabnzbd.ini, and in there find the line "ipv6_servers =". What's the value filled out?

Re: ipv6 servers "Incorrect parameter"

Posted: May 9th, 2013, 3:24 pm
by The_Great_Beast
ipv6_servers = 1

Re: ipv6 servers "Incorrect parameter"

Posted: May 9th, 2013, 4:12 pm
by sander
The_Great_Beast wrote:ipv6_servers = 1
That's good.

I had at a look at the SABnzbd code (check_server() and GetServerParms()), but I can't reproduce the *correct* working so far...

Re: ipv6 servers "Incorrect parameter"

Posted: May 9th, 2013, 5:08 pm
by sander
OK: with newszilla6.xs4all.nl correctly resolving and ipv6_servers = 1, I can only reproduce the "Server address ... is not valid." with "_EXTERNAL_IPV6 : False"

And that's set / defined as:

Code: Select all

_EXTERNAL_IPV6 = test_ipv6()
Can you copy-paste the code below into a file testing-ipv6.py, and then let python run it? Can you post the output here?

Code: Select all

import socket

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

print "hello!"
print test_ipv6()
print "bye..."

Re: ipv6 servers "Incorrect parameter"

Posted: May 9th, 2013, 6:41 pm
by The_Great_Beast

Code: Select all

  File "c:\python33\testing-ipv6.py", line 22
    print "hello!"
                 ^
SyntaxError: invalid syntax

Re: ipv6 servers "Incorrect parameter"

Posted: May 9th, 2013, 11:14 pm
by sander
Ah ... the difference between python2 and python3. Change the last three lines to:

print("hello!")
print(test_ipv6())
print("bye...")

To be sure: the file is here: http://www.appelboor.com/dump/testing-ipv6.py . Download it, and run it with python.

Re: ipv6 servers "Incorrect parameter"

Posted: May 10th, 2013, 1:53 pm
by The_Great_Beast

Code: Select all

c:\python33\python.exe c:\python33\testing-ipv6.py
hello!
True
bye...

Re: ipv6 servers "Incorrect parameter"

Posted: May 11th, 2013, 1:49 am
by sander
Stop SABnzbd, in sabnzbd.ini, can you change ipv6_servers to 2? Then start SABnzbd again and try again.