raydp icon indicating copy to clipboard operation
raydp copied to clipboard

when i create initialization twice ray,raydp , An error occurred。

Open chinaboyll opened this issue 3 years ago • 11 comments

My version: Ray Cluster:1.3.0 Raydp:0.3.0 Python: 3.6.4 when i create initialization twice ray,raydp , An error occurred。 first run is OK. bu start the second is error.

Caused by: java.net.BindException: Address already in use (Bind failed) at java.net.PlainSocketImpl.socketBind(Native Method) at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:387) at java.net.ServerSocket.bind(ServerSocket.java:375) at py4j.GatewayServer.startSocket(GatewayServer.java:786)

I set config configs={"spark.ui.port":"xxx"} and configs={"spark.port.maxRetries":"100"}

It's invalid

please help me~~

chinaboyll avatar Sep 03 '21 06:09 chinaboyll

You only need to init once. If you see this error, it is because the pervious driver is not closed properly. You can find the Java process ID and kill it.

carsonwang avatar Sep 06 '21 01:09 carsonwang

You only need to init once. If you see this error, it is because the pervious driver is not closed properly. You can find the Java process ID and kill it.

What if I want to start two spark driver on the same time? What should I do?

Bowen0729 avatar Jul 26 '22 06:07 Bowen0729

@Bowen0729 , can you please share more about your use case and requirement?

carsonwang avatar Jul 26 '22 07:07 carsonwang

Two users both use raydp in the same conda environment, one of them throw exception address already in use

Bowen0729 avatar Jul 26 '22 07:07 Bowen0729

@Bowen0729 , can you please share more about your use case and requirement?

The Java Gateway port is always 25333, why not a random port?

Bowen0729 avatar Jul 26 '22 08:07 Bowen0729

This sounds like an issue. So two users will run their Spark driver on the same node and connect to the same Ray cluster, right? Are you interested in submitting a PR for this?

carsonwang avatar Jul 26 '22 08:07 carsonwang

This sounds like an issue. So two users will run their Spark driver on the same node and connect to the same Ray cluster, right? Are you interested in submitting a PR for this?

Sure, I will submit a PR recently. Thank you for your reply

Bowen0729 avatar Jul 26 '22 08:07 Bowen0729

Great! Thanks!

carsonwang avatar Jul 26 '22 08:07 carsonwang

@Bowen0729 @carsonwang In this case how do we distinguish the user call init_spark twice by mistake or by intention?

pang-wu avatar Aug 01 '22 07:08 pang-wu

It's a issue about the java gateway always starts with the default port, so when user call init_spark twice in different session, the new java gateway cannot start.

when user call init_spark in the same session, raydp will throw "The spark environment has inited".

Bowen0729 avatar Aug 01 '22 07:08 Bowen0729

+1 on that issue. It's annoying since we are possibly running multiple ray+raydp instances on the same host... Especially when there are multiple users!

Hoeze avatar Sep 07 '22 22:09 Hoeze

close as stale. fixed

kira-lin avatar Apr 14 '23 08:04 kira-lin