ipv6 servers "Incorrect parameter"

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.
The_Great_Beast
Release Testers
Release Testers
Posts: 11
Joined: February 17th, 2011, 12:41 am

ipv6 servers "Incorrect parameter"

Post 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>
Last edited by The_Great_Beast on May 8th, 2013, 1:46 pm, edited 1 time in total.
User avatar
sander
Release Testers
Release Testers
Posts: 8824
Joined: January 22nd, 2008, 2:22 pm

Re: ipv6 servers "Incorrect parameter"

Post by sander »

What happens when you fill out:

reader.ipv6.xsnews.nl
newszilla6.xs4all.nl
newszilla.xs4all.nl
The_Great_Beast
Release Testers
Release Testers
Posts: 11
Joined: February 17th, 2011, 12:41 am

Re: ipv6 servers "Incorrect parameter"

Post 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
User avatar
sander
Release Testers
Release Testers
Posts: 8824
Joined: January 22nd, 2008, 2:22 pm

Re: ipv6 servers "Incorrect parameter"

Post 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?
The_Great_Beast
Release Testers
Release Testers
Posts: 11
Joined: February 17th, 2011, 12:41 am

Re: ipv6 servers "Incorrect parameter"

Post 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
User avatar
sander
Release Testers
Release Testers
Posts: 8824
Joined: January 22nd, 2008, 2:22 pm

Re: ipv6 servers "Incorrect parameter"

Post 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))]
>>> 
$ 
The_Great_Beast
Release Testers
Release Testers
Posts: 11
Joined: February 17th, 2011, 12:41 am

Re: ipv6 servers "Incorrect parameter"

Post 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))]
>>>
User avatar
sander
Release Testers
Release Testers
Posts: 8824
Joined: January 22nd, 2008, 2:22 pm

Re: ipv6 servers "Incorrect parameter"

Post 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?
The_Great_Beast
Release Testers
Release Testers
Posts: 11
Joined: February 17th, 2011, 12:41 am

Re: ipv6 servers "Incorrect parameter"

Post by The_Great_Beast »

ipv6_servers = 1
User avatar
sander
Release Testers
Release Testers
Posts: 8824
Joined: January 22nd, 2008, 2:22 pm

Re: ipv6 servers "Incorrect parameter"

Post 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...
User avatar
sander
Release Testers
Release Testers
Posts: 8824
Joined: January 22nd, 2008, 2:22 pm

Re: ipv6 servers "Incorrect parameter"

Post 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..."
The_Great_Beast
Release Testers
Release Testers
Posts: 11
Joined: February 17th, 2011, 12:41 am

Re: ipv6 servers "Incorrect parameter"

Post by The_Great_Beast »

Code: Select all

  File "c:\python33\testing-ipv6.py", line 22
    print "hello!"
                 ^
SyntaxError: invalid syntax
User avatar
sander
Release Testers
Release Testers
Posts: 8824
Joined: January 22nd, 2008, 2:22 pm

Re: ipv6 servers "Incorrect parameter"

Post 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.
The_Great_Beast
Release Testers
Release Testers
Posts: 11
Joined: February 17th, 2011, 12:41 am

Re: ipv6 servers "Incorrect parameter"

Post by The_Great_Beast »

Code: Select all

c:\python33\python.exe c:\python33\testing-ipv6.py
hello!
True
bye...
User avatar
sander
Release Testers
Release Testers
Posts: 8824
Joined: January 22nd, 2008, 2:22 pm

Re: ipv6 servers "Incorrect parameter"

Post by sander »

Stop SABnzbd, in sabnzbd.ini, can you change ipv6_servers to 2? Then start SABnzbd again and try again.
Post Reply