Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Force quit play framework application

I am unable to bind to my regular port 9000 with the typical error message:

[error] org.jboss.netty.channel.ChannelException: Failed to bind to: /0.0.0.0:9000

However, I do not have anything currently running on that port..

Checking what port 9000 is listing to:

sudo lsof -i -P | grep "9000"

gives me:

java       2642      ow  137u  IPv6 0xe9a3870d7acf02fd      0t0    TCP *:9000 (LISTEN)
java       2642      ow  142u  IPv6 0xe9a3870d7e430f1d      0t0    TCP localhost:9000->localhost:62403 (CLOSE_WAIT)
java       2642      ow  156u  IPv6 0xe9a3870d856676dd      0t0    TCP localhost:9000->localhost:60860 (CLOSE_WAIT)

Any idea how to close this?


Edit

Turns out google chrome is using my 9000 which is kind of weird

Google    51558      ow  125u  IPv4 0xe9a3870d8683581d      0t0    TCP localhost:61238->localhost:9000 (ESTABLISHED)

When I killed it, chrome crashed

Guess I'll have to start using a different port!

like image 770
Omar Wagih Avatar asked Jan 14 '23 00:01

Omar Wagih


2 Answers

Play isn't running anymore?

Otherwise for reference, one can find the Play process with ps auxwww | grep play and kill it withkill <pid> or kill -9 <pid>.

like image 57
Marius Soutier Avatar answered Jan 26 '23 17:01

Marius Soutier


I have the same issue with play framework using scalaVersion := "2.11.7".

java      19068  ecamur  342u  IPv6 40371923      0t0  TCP *:9000 (LISTEN)

I killed using bellow comment

kill -9 19068

It appeared to be nothing was crashed. I ran the application without any issue.

like image 37
ecamur Avatar answered Jan 26 '23 19:01

ecamur