You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Shymal Raj (JIRA)" <ji...@apache.org> on 2013/03/14 23:56:13 UTC

[jira] [Created] (THRIFT-1888) Java Thrift client can't connect to Python Thrift server on same host

Shymal Raj created THRIFT-1888:
----------------------------------

             Summary: Java Thrift client can't connect to Python Thrift server on same host
                 Key: THRIFT-1888
                 URL: https://issues.apache.org/jira/browse/THRIFT-1888
             Project: Thrift
          Issue Type: Bug
          Components: Python - Compiler
    Affects Versions: 0.9
         Environment: Windows 7, Python 2.7.3, Java 1.7.0_11
            Reporter: Shymal Raj
            Priority: Critical


I have a very simple thrift server written in Python and a corresponding client in Java. I keep getting a connection refused error when I try to connect to the Python server from the Java client (see error below). However, I am able to connect to the Python server using a Python client. And if I run the Python server on a remote machine, then I am able to connect to it from the Java client. However, for my use case, both need to be on the same host. I think this was working in 0.8.0.

org.apache.thrift.transport.TTransportException: java.net.ConnectException: Connection refused: connect
	at org.apache.thrift.transport.TSocket.open(TSocket.java:185)
	at org.apache.thrift.transport.TFramedTransport.open(TFramedTransport.java:81)

Caused by: java.net.ConnectException: Connection refused: connect
	at java.net.DualStackPlainSocketImpl.connect0(Native Method)
	at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:69)
	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
	at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:157)
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:391)
	at java.net.Socket.connect(Socket.java:579)
	at org.apache.thrift.transport.TSocket.open(TSocket.java:180)
	... 18 more

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira