[trunk] no listening on IPv6 interfaces like ::1

Questions and bug reports for Beta releases should be posted here.
Forum rules
Help us help you:
  • 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.
Post Reply
User avatar
sander
Release Testers
Release Testers
Posts: 8832
Joined: January 22nd, 2008, 2:22 pm

[trunk] no listening on IPv6 interfaces like ::1

Post by sander »

The trunk version (downloaded today) is not reacting to IPv6 requests like http://[::1]:8080/sabnzbd/

Web Host is on "0.0.0.0" and restarted.  IPv4 is working OK: http://192.168.2.188:8080/sabnzbd/ is reacting.

Running on Ubuntu Linux 8.04
Please don't send me unrequested PM's; the forum is the best way to communicate.
If someone helps you, please reply to that help.
f you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: [trunk] no listening on IPv6 interfaces like ::1

Post by shypike »

The new release of CherryPy doesn't allow double interfaces in the way the old one did.
There's probably not much we can do about it.
It does listen to IPV6 if you specify an IPV6 address.
User avatar
switch
Moderator
Moderator
Posts: 1380
Joined: January 17th, 2008, 3:55 pm
Location: UK

Re: [trunk] no listening on IPv6 interfaces like ::1

Post by switch »

The new cherrypy version has proper support for 0.0.0.0 as it is an ipv4 address for listening on all ipv4 addresses.

For ipv6 addresses, try a hostname of :::
Not sure if it needs any extra sabnzbd code to function.
User avatar
sander
Release Testers
Release Testers
Posts: 8832
Joined: January 22nd, 2008, 2:22 pm

Re: [trunk] no listening on IPv6 interfaces like ::1

Post by sander »

"[::]" (without the quotes) seems to be the solution:

::1 works
full IPv6 name works
localhost works
full IPv4 address works ( http://192.168.2.188:8080/sabnzbd/)
Last edited by sander on February 2nd, 2009, 5:00 pm, edited 1 time in total.
Please don't send me unrequested PM's; the forum is the best way to communicate.
If someone helps you, please reply to that help.
f you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: [trunk] no listening on IPv6 interfaces like ::1

Post by shypike »

So [::] is (sort of) the equivalent of 0.0.0.0 ?
I never stop learning  ;D
User avatar
sander
Release Testers
Release Testers
Posts: 8832
Joined: January 22nd, 2008, 2:22 pm

Re: [trunk] no listening on IPv6 interfaces like ::1

Post by sander »

shypike wrote: So [::] is (sort of) the equivalent of 0.0.0.0 ?
I never stop learning  ;D
Yep: Wikipedia http://en.wikipedia.org/wiki/IPv6#Notation tells this:
the undetermined IPv6 address (zero value), i.e., all bits are zero, is simply ::
I think the [] around the :: are needed to make clear it's a literal IPv6 address.
Please don't send me unrequested PM's; the forum is the best way to communicate.
If someone helps you, please reply to that help.
f you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
User avatar
sander
Release Testers
Release Testers
Posts: 8832
Joined: January 22nd, 2008, 2:22 pm

Re: [trunk] no listening on IPv6 interfaces like ::1

Post by sander »

PS: More from Wikipedia http://en.wikipedia.org/wiki/IPv6#Special_addresses
There are a number of addresses with special meaning in IPv6:

Unspecified address

    * ::/128 — the address with all zero bits is called the unspecified address. This address must never be assigned to an interface and is to be used only in software before the application has learned its host's source address appropriate for a pending connection. Routers must not forward packets with the unspecified address.
Please don't send me unrequested PM's; the forum is the best way to communicate.
If someone helps you, please reply to that help.
f you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
User avatar
sander
Release Testers
Release Testers
Posts: 8832
Joined: January 22nd, 2008, 2:22 pm

Re: [trunk] no listening on IPv6 interfaces like ::1

Post by sander »

Summary on IPv6 in trunk version 2009-03-02:
1) [::] in SAB config makes starting SAB impossible
2) :: in SAB config results in SAB functioning and listening on IPv6, BUT auto-starting the webbrowser is not succesful:

Code: Select all

2009-03-03 19:38:17,585::INFO::[SABnzbd:941] Starting web-interface on :::8080
So:
SAB should be able to handle [ and ] around litteral IPv6 address (as it already did)
and/or
in the auto-start URL, SAB should insert [ and ].


Long story (and sorry for the garbage):



I can't get the trunk version of 2009-03-02 to listen on IPv6 with '[::]':

0.0.0.0 does not listen to IPv6 (as already determined)
[::] as host in the SAB config results in SAB not starting up anymore.

Code: Select all

sander@linuxmint6 ~/svn-sabnbzd-2/SABnzbd/trunk/main $ ./SABnzbd.py -f mijn-configje.cfg
Traceback (most recent call last):
  File "./SABnzbd.py", line 1024, in <module>
    main()
  File "./SABnzbd.py", line 694, in main
    cherrypy.process.servers.check_port(browserhost, https_port)
  File "/home/sander/svn-sabnbzd-2/SABnzbd/trunk/main/cherrypy/process/servers.py", line 228, in check_port
    socket.SOCK_STREAM):
socket.gaierror: (-2, 'Name or service not known')


sander@linuxmint6 ~/svn-sabnbzd-2/SABnzbd/trunk/main $ grep '::' mijn-configje.cfg 
host = [::]
sander@linuxmint6 ~/svn-sabnbzd-2/SABnzbd/trunk/main $ grep host mijn-configje.cfg 
host = [::]
host = news.ipv6.eweka.nl
sander@linuxmint6 ~/svn-sabnbzd-2/SABnzbd/trunk/main $ 

When I fill out the exact 2001: IPv6 address in the SAB config WITHOUT [ and ], and then connect to that interface, it works:

Code: Select all

sander@linuxmint6 ~ $ telnet 2001:838:3a3:0:218:deaa:fe10:c506 8080
Trying 2001:838:3a3:0:218:deff:fe10:c506...
Connected to 2001:838:3a3:0:218:deff:fe10:c506.
Escape character is '^]'.
GET /
HTTP/1.1 400
Content-Length: 22
Content-Type: text/plain

Malformed Request-LineConnection closed by foreign host.
sander@linuxmint6 ~ $ 

However, autostarting the web-interface from SAB does not work:

Code: Select all

2009-03-03 19:33:45,657::INFO::[SABnzbd:941] Starting web-interface on 2001:838:3a3:0:218:deff:fe10:c506:8080
which is not correct, of course.

Whenn I fill out [ and ] in the sab conf (like "host = [2001:838:3a3:0:218:deff:fe10:c506]"), I get the same error:

Code: Select all

sander@linuxmint6 ~/svn-sabnbzd-2/SABnzbd/trunk/main $ ./SABnzbd.py -f mijn-configje.cfg
Traceback (most recent call last):
  File "./SABnzbd.py", line 1024, in <module>
    main()
  File "./SABnzbd.py", line 694, in main
    cherrypy.process.servers.check_port(browserhost, https_port)
  File "/home/sander/svn-sabnbzd-2/SABnzbd/trunk/main/cherrypy/process/servers.py", line 228, in check_port
    socket.SOCK_STREAM):
socket.gaierror: (-2, 'Name or service not known')
sander@linuxmint6 ~/svn-sabnbzd-2/SABnzbd/trunk/main $ 
Please don't send me unrequested PM's; the forum is the best way to communicate.
If someone helps you, please reply to that help.
f you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
User avatar
switch
Moderator
Moderator
Posts: 1380
Joined: January 17th, 2008, 3:55 pm
Location: UK

Re: [trunk] no listening on IPv6 interfaces like ::1

Post by switch »

Using a host of :: is still on my to-do list. I'll get around to it eventually.
User avatar
sander
Release Testers
Release Testers
Posts: 8832
Joined: January 22nd, 2008, 2:22 pm

Re: [trunk] no listening on IPv6 interfaces like ::1

Post by sander »

As a reference: with SAB 0.4.7 on Ubuntu 9.04 Alpha 5, filling out [::] works OK, and results in this logging:

Code: Select all

2009-03-03 20:59:27,475::INFO::Starting web-interface on :::8080
03/Mar/2009:20:59:27 CONFIG INFO Server parameters:
03/Mar/2009:20:59:27 CONFIG INFO   server.environment: production
03/Mar/2009:20:59:27 CONFIG INFO   server.log_to_screen: True
03/Mar/2009:20:59:27 CONFIG INFO   server.log_file: /home/sander/.sabnzbd/logs/cherrypy.log
03/Mar/2009:20:59:27 CONFIG INFO   server.log_tracebacks: True
03/Mar/2009:20:59:27 CONFIG INFO   server.log_request_headers: False
03/Mar/2009:20:59:27 CONFIG INFO   server.protocol_version: HTTP/1.0
03/Mar/2009:20:59:27 CONFIG INFO   server.socket_host: ::
03/Mar/2009:20:59:27 CONFIG INFO   server.socket_port: 8080
03/Mar/2009:20:59:27 CONFIG INFO   server.socket_file: 
03/Mar/2009:20:59:27 CONFIG INFO   server.reverse_dns: False
03/Mar/2009:20:59:27 CONFIG INFO   server.socket_queue_size: 5
03/Mar/2009:20:59:27 CONFIG INFO   server.thread_pool: 10
03/Mar/2009:20:59:27 HTTP INFO Serving HTTP on http://:::8080/
2009-03-03 20:59:27,665::INFO::Lauching browser with http://[::]:8080/sabnzbd
Please don't send me unrequested PM's; the forum is the best way to communicate.
If someone helps you, please reply to that help.
f you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
pip
Newbie
Newbie
Posts: 6
Joined: April 24th, 2009, 3:43 pm

Re: [trunk] no listening on IPv6 interfaces like ::1

Post by pip »

i assume the reference to cherrypy is the older 2008-11-08 CherryPy 3.1.1 released
http://www.cherrypy.org/

theres a newer one now released just the other day 2009-04-12 CherryPy 3.1.2 released

does that have any fixes and speedups we might find useful?

BTW i just found a very cool web page for IPv4 to IPv6 address conversion and back, it even includes IP Multicasting addressing for IPv6 ;)

http://www.subnetonline.com/pages/subne ... verter.php

perhaps something like this might be very useful on this sab forum directly, if you can get a copy of their serverside scripts, perhaps if you ask them....


is multicast binary streaming to VLC a potential reality on the likes of the http://go6.net/4105/freenet.asp (useing its automaticly supplyed delegated user domain for the given IP's) through the IPv4 to IPv6 tunnels ?


PS : is there a reason the top sticky post SABnzbd-0.4.6 RC2 is available
« on: December 07, 2008, 04:51:23 PM »

hasnt been updated in a long time or was it just forgotten ......
Last edited by pip on April 26th, 2009, 4:30 pm, edited 1 time in total.
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: [trunk] no listening on IPv6 interfaces like ::1

Post by shypike »

Thanks for the tip.
We were already on an intermediate version of CherryPy, because
3.1.1 had too many bugs.
Obviously we prefer to use official releases.

We'll have a look at any IPV6 issues.
To be honest, it's a very tiny part of our users who are interested in it.
And nobody of the team has native IPV6 access.
Post Reply