I'm using IntelliJ Idea Community Edition IDE and I'm trying to run a Maven WebApp with Jetty by command line. I'm on a RedHat box
I run this command:
mvn clean install -P deployJetty -Djetty.port=8083
And I get this error:
Listening for transport dt_socket at address: 5005
Error: Exception thrown by the agent : java.rmi.server.ExportException: Port already in use: 1099; nested exception is:
java.net.BindException: Address already in use
The funny thing is that when I close IntelliJ Idea, the 1099 port is released. I can't find the reason why and how Idea is using this port.
Any ideas ? Thank you.
Note: As a workaround, I'm closing Idea, running Jetty and then opening Idea (and I guess forcing it to pick another port)