Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-1888

Java Thrift client can't connect to Python Thrift server on same host

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 0.9
    • Fix Version/s: 0.9.1
    • Component/s: Python - Compiler
    • Labels:
      None
    • Environment:

      Windows 7, Python 2.7.3, Java 1.7.0_11

      Description

      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

        Attachments

          Activity

            People

            • Assignee:
              jfarrell Jake Farrell
              Reporter:
              shymal.raj Shymal Raj
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: