Sure.
>>> res = gateway.executeQuery()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/petr-jezek/.local/lib/python2.7/site-packages/py4j/java_gateway.py", line 1158, in __call__
answer = self.gateway_client.send_command(command)
File "/home/petr-jezek/.local/lib/python2.7/site-packages/py4j/java_gateway.py", line 906, in send_command
connection = self._get_connection()
File "/home/petr-jezek/.local/lib/python2.7/site-packages/py4j/java_gateway.py", line 854, in _get_connection
connection = self._create_connection()
File "/home/petr-jezek/.local/lib/python2.7/site-packages/py4j/java_gateway.py", line 860, in _create_connection
connection.start()
File "/home/petr-jezek/.local/lib/python2.7/site-packages/py4j/java_gateway.py", line 997, in start
raise Py4JNetworkError(msg, e)
py4j.protocol.Py4JNetworkError: An error occurred while trying to connect to the Java server (<IP>:25333)
>>>
GatewayServer gatewayServer = new GatewayServer(facade);
gatewayServer.start();
where facade is an interface with the executeQuery method.
And as I said, where java server and python client are run both from localhost it works.
Petr
Dne čtvrtek 20. července 2017 1:37:52 UTC-7 Barthelemy Dagenais napsal(a):