Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java says: all ports in use #3349

Closed
LoekvanKooten opened this issue Jul 3, 2018 · 8 comments
Closed

Java says: all ports in use #3349

LoekvanKooten opened this issue Jul 3, 2018 · 8 comments

Comments

@LoekvanKooten
Copy link

Microsoft Windows [Version 10.0.17134.112]

./mmt start

gives:

2018-07-03 15:38:15,184 INFO eu.modernmt.aligner.fastalign.FastAlign [main] Loaded 1 FastAlign models in 0s 2018-07-03 15:38:15,465 INFO eu.modernmt.cluster.ClusterNode [main] Model loaded in 0.323s 2018-07-03 15:38:15,466 INFO eu.modernmt.cluster.ClusterNode [main] Starting embedded Kafka process 2018-07-03 15:38:15,477 FATAL eu.modernmt.facade.ModernMT [main] Unexpected exception thrown by thread [main] eu.modernmt.engine.BootstrapException: java.io.IOException: Port 9092 is already in use by another process at eu.modernmt.cluster.kafka.EmbeddedKafka.start(EmbeddedKafka.java:36) at eu.modernmt.cluster.ClusterNode.start(ClusterNode.java:339) at eu.modernmt.facade.ModernMT.start(ModernMT.java:57) at eu.modernmt.cli.ClusterNodeMain.main(ClusterNodeMain.java:168) Caused by: java.io.IOException: Port 9092 is already in use by another process at eu.modernmt.cluster.kafka.EmbeddedKafka.start(EmbeddedKafka.java:59) at eu.modernmt.cluster.kafka.EmbeddedKafka.start(EmbeddedKafka.java:32) ... 3 more

The server should start. Port 9092 is already in use, but netstat shows that no port is in use or whatsoever. Starting the engine on another port does not change anything: all ports are in use, while netstat shows that no ports are used at all.

@shoffmeister
Copy link

shoffmeister commented Jul 3, 2018

Is port 9092 in use on the Windows side?

netstat, when executed inside the WSL container, only sees the Linux side.

Example: sudo netstat -plnt right now gives me

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name

although my Windows "host" has servers running.

(Aside from that, perhaps you could amend your steps with what needs to be installed to be able to execute ./nmt start - something like sudo apt install my-ocean?)

@therealkenc
Copy link
Collaborator

CONTRIBUTING.md

@therealkenc
Copy link
Collaborator

therealkenc commented Jul 4, 2018

Wait I am following the OP now.

Port 9092 is already in use, but netstat shows that no port is in use or whatsoever

netstat doesn't fly on WSL #2249. There is no Linux side. Try:

$  netstat.exe -an | grep 9092

This is either a dupe or linux-behavior depending on one's disposition. Going with the latter given the issue title. The port is occupied.

@LoekvanKooten
Copy link
Author

Thank you for your comments so far. The port is not used on Windows either.

Full installation instructions for ModernMT:
https://github.com/ModernMT/MMT/blob/master/INSTALL.md

I went for option 2 (Binaries) as there was no way I could get the Docker working (nvidia-docker doesn't like WSL I hear).

@LoekvanKooten
Copy link
Author

This issue has been confirmed here: modernmt/modernmt#340 but the makers of ModernMT basically blame WSL and won't dive into it.

@therealkenc
Copy link
Collaborator

therealkenc commented Jul 6, 2018

basically blame WSL and won't dive into it.

No what they said was "try changing ports", which is indeed good advice. In your OP you said quoth "Port 9092 is already in use". In that case (sic) neither ModernMT/MMT nor WSL is to "blame" and there isn't an issue to confirm or deep dive. If you had the port in use already on Real Linux it would not work on that port either. It works in VirtualBox because you are now on a different network address and the port is not in use there. A VM might well be better suited to your scenario if you want two processes open on port 9092 at the same time.

@therealkenc
Copy link
Collaborator

therealkenc commented Jul 6, 2018

Wait; hold up. I clicked through your install link and ran headlong into "At least one CUDA-capable GPU". So you've got bigger (unrelated) issues than occupied ports. You will want to stick to a VM for now until CUDA is supported in WSL regardless.

@LoekvanKooten
Copy link
Author

Changing the ports didn't change anything, but if CUDA is not supported by WSL yet, then everything indeed ends there for now. Thank you very much for looking into this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants