# Rospy and Jython - TCPROS cannot start

Hello! I am currently using a Rethink Robotics Baxter robot, which uses Rospy and has interface scripts written in Python.

What we would like to do is to use Jython to execute those scripts, so that we can then write Java programs that import Jython and run the Python scripts. We have set up a development environment with Jython 2.7 and Rospy Indigo and have set all the necessary modules up correctly. However, when we try to init_node from the Jython interpreter, it seems that the TCPROS server cannot start.

jython
>>> import rospy
>>> rospy.init_node('node_name', anonymous=True)
[ERROR] [WallTime: 1435119377.844000] unable to start TCPROS server: [Errno 107] Socket is not connected
Traceback (most recent call last):
File "/opt/ros/indigo/lib/python2.7/dist-packages/rospy/impl/tcpros_base.py", line 283, in start_server
self.tcp_ros_server = TCPServer(self._tcp_server_callback, self.port)
File "/opt/ros/indigo/lib/python2.7/dist-packages/rospy/impl/tcpros_base.py", line 132, in __init__
self.server_sock = self._create_server_sock()
File "opt/ros/indigo/lib/python2.7/dist-packages/rospy/impl/tcpros_base.py", line 194, in _create_server_sock