[
https://issues.apache.org/jira/browse/THRIFT-2542?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14007290#comment-14007290
]
Chris mildebrandt commented on THRIFT-2542:
-------------------------------------------
It seems the address is a two tuple for IPv4 ('127.0.0.1', 45986), and a four
tuple for IPv6 ('::1', 42642, 0, 0).
I fixed this on my side by replacing the following line in TTornado:
host, port = address
with:
host = address[0]
port = address[1]
> Tornado server fails connections when using IPv6
> ------------------------------------------------
>
> Key: THRIFT-2542
> URL: https://issues.apache.org/jira/browse/THRIFT-2542
> Project: Thrift
> Issue Type: Bug
> Components: Python - Library
> Affects Versions: 0.9.1
> Reporter: Chris mildebrandt
>
> When a client attempts to connect to a tornado server using IPv6, the
> following error is raised:
> ERROR:root:thrift exception in handle_stream
> Traceback (most recent call last):
> File "/usr/local/lib/python2.7/site-packages/thrift/TTornado.py", line 142,
> in handle_stream
> host, port = address
> ValueError: too many values to unpack
> ERROR:tornado.application:Error in connection callback
> Traceback (most recent call last):
> File "/usr/local/lib/python2.7/site-packages/tornado/tcpserver.py", line
> 243, in _handle_connection
> self.handle_stream(stream, address)
> File "/usr/local/lib/python2.7/site-packages/thrift/TTornado.py", line 155,
> in handle_stream
> trans.close()
> UnboundLocalError: local variable 'trans' referenced before assignment
--
This message was sent by Atlassian JIRA
(v6.2#6252)