Re: [CherryPy] #960: IOError Port 8080 not bound on '::0' in helloworld on IPv6

67 views
Skip to first unread message

CherryPy

unread,
Oct 3, 2009, 3:27:12 PM10/3/09
to cherrypy...@googlegroups.com
#960: IOError Port 8080 not bound on '::0' in helloworld on IPv6
---------------------------+------------------------------------------------
Reporter: jaraco | Owner: fumanchu
Type: defect | Status: assigned
Priority: normal | Milestone: 3.2
Component: CherryPy code | Resolution:
Keywords: IPv6 binding |
---------------------------+------------------------------------------------
Changes (by fumanchu):

* owner: jaraco => fumanchu
* status: new => assigned

Comment:

OK, first, '::' works like a charm in Ubuntu 8.04, with Firefox pointed at
`http://localhost:8088`. It also works fine when the app is served from
Ubuntu, but browsed via Firefox in a Windows XP VM pointed at
`http://my.ipv4.address:8088`.

The patches I just committed in [2542] get us closer on Windows: the app
no longer raises 'port not bound'. But I can't browse to it from FF, IE or
Opera.

--
Ticket URL: <http://www.cherrypy.org/ticket/960>
CherryPy <http://www.cherrypy.org>
CherryPy - a pythonic, object-oriented HTTP framework

CherryPy

unread,
Oct 3, 2009, 3:50:24 PM10/3/09
to cherrypy...@googlegroups.com
#960: IOError Port 8080 not bound on '::0' in helloworld on IPv6
---------------------------+------------------------------------------------
Reporter: jaraco | Owner: fumanchu
Type: defect | Status: closed
Priority: normal | Milestone: 3.2
Component: CherryPy code | Resolution: fixed
Keywords: IPv6 binding |
---------------------------+------------------------------------------------
Changes (by fumanchu):

* resolution: => fixed
* status: assigned => closed

Comment:

> But I can't browse to it from FF, IE or Opera.

...which is understandable, since WinXP doesn't support dual-stack IPv6/4
sockets. Using `telnet ::1 8088` gets there just fine.

CherryPy

unread,
Oct 3, 2009, 5:06:26 PM10/3/09
to cherrypy...@googlegroups.com
#960: IOError Port 8080 not bound on '::0' in helloworld on IPv6
---------------------------+------------------------------------------------
Reporter: jaraco | Owner: fumanchu
Type: defect | Status: closed
Priority: normal | Milestone: 3.2
Component: CherryPy code | Resolution: fixed
Keywords: IPv6 binding |
---------------------------+------------------------------------------------
Comment (by fumanchu):

...and it works fine now on 32-bit Vista with Python 2.6.1 and FF.

CherryPy

unread,
Oct 19, 2009, 5:51:18 PM10/19/09
to cherrypy...@googlegroups.com
#960: IOError Port 8080 not bound on '::0' in helloworld on IPv6
---------------------------+------------------------------------------------
Reporter: jaraco | Owner: fumanchu
Type: defect | Status: reopened
Priority: normal | Milestone: 3.2
Component: CherryPy code | Resolution:
Keywords: IPv6 binding |
---------------------------+------------------------------------------------
Changes (by jaraco):

* cc: => jar...@jaraco.com
* resolution: fixed =>
* status: closed => reopened

Comment:

I'm still experiencing this problem with [2542] and [2560]. I'll continue
to investigate.

CherryPy

unread,
Oct 19, 2009, 6:45:38 PM10/19/09
to cherrypy...@googlegroups.com
#960: IOError Port 8080 not bound on '::0' in helloworld on IPv6
---------------------------+------------------------------------------------
Reporter: jaraco | Owner: fumanchu
Type: defect | Status: reopened
Priority: normal | Milestone: 3.2
Component: CherryPy code | Resolution:
Keywords: IPv6 binding |
---------------------------+------------------------------------------------
Comment (by jaraco):

The problem appears to be that '::0' is being passed to
cherrypy.process.servers.wait_for_occupied_port, and check_port attempts
to connect to ::0, which is not valid. When the user uses '0.0.0.0' as the
bind address, the check address is translated to '127.0.0.1' for the
purposes of wait_for_occupied_port. The same needs to be done for IPv6
(use '::1' to test the port).

CherryPy

unread,
Oct 19, 2009, 8:14:05 PM10/19/09
to cherrypy...@googlegroups.com
#960: IOError Port 8080 not bound on '::0' in helloworld on IPv6
---------------------------+------------------------------------------------
Reporter: jaraco | Owner: fumanchu
Type: defect | Status: reopened
Priority: normal | Milestone: 3.2
Component: CherryPy code | Resolution:
Keywords: IPv6 binding |
---------------------------+------------------------------------------------
Comment (by jaraco):

It turns out that the reason it is failing for me is because I'm using a
non-canonical form for INADDR6_ANY. As in this bug description, I was
using ::0 to bind to all addresses, but process/servers.py expects only ::
at one point.

I am attaching a new patch against the latest trunk. This patch addresses
the issue, but because it also changes the logic somewhat, I want to run
it by fumanchu. An alternate approach would be to simply add '::0' and
'::0:0:0:0' to client_host().

Probably the best solution would be to have something for parsing IPv6
addresses, such as the ipaddr project (http://code.google.com/p/ipaddr-
py/). It's a single .py file, so probably could be included inline (still
no dependencies).

CherryPy

unread,
Oct 29, 2009, 8:59:09 PM10/29/09
to cherrypy...@googlegroups.com
#960: IOError Port 8080 not bound on '::0' in helloworld on IPv6
---------------------------+------------------------------------------------
Reporter: jaraco | Owner: fumanchu
Type: defect | Status: closed
Priority: normal | Milestone: 3.2
Component: CherryPy code | Resolution: fixed
Keywords: IPv6 binding |
---------------------------+------------------------------------------------
Changes (by jaraco):

* resolution: => fixed
* status: reopened => closed

Comment:

Fixed in r2563.
Reply all
Reply to author
Forward
0 new messages