py4j / py4j

Py4J enables Python programs to dynamically access arbitrary Java objects

Home Page:https://www.py4j.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

loss java address set for JavaClient

143230 opened this issue · comments

in py4j-java/src/main/java/py4j/JavaServer.java there must use the defaultaddress() to set the java address, when in docker, this may cause problem of connection, so need to add constructor that can pass the java address to JavaClient

public JavaServer(Object entryPoint, InetAddress address, int port, int connectTimeout, int readTimeout,
List<Class<? extends Command>> customCommands, Py4JPythonClientPerThread pythonClient, String authToken) {
super(entryPoint, port, address, connectTimeout, readTimeout, customCommands, pythonClient,
ServerSocketFactory.getDefault(), authToken);
}