Error starting project in Play Framework. Could not listen on port: 9000

I am trying to start my Play2 project. When I run the activator in my terminal, it loads and finally gives me this error message:

pcsNettyServer - Failed to listen for HTTP on /0.0.0.0:9000! 

but I have not installed anything on this port, and I have no background processes in my terminal. Why does this error appear to me?

+5
source share
1 answer

Since you can start it using a different port, this means that something is really using this port. This may be another application or a previously inhibited activation / playback start.

To find out what uses it, you can use, for example, lsof on Linux:

 $ lsof -i :9000 

Once you find its pid, you can stop this process.

If this port is used by another service, and you really need it, instead of always providing the port to the run command, you can try adding this to your sbtopts (either in the ~/.sbtopts file or SBT_OPTS env var) this:

 -Dhttp.port=9876 
+4
source

Source: https://habr.com/ru/post/1263348/


All Articles