Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IntelliJ Idea IDE using port 1099

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)

like image 839
migo Avatar asked Aug 18 '14 23:08

migo


People also ask

How can I change port number in IntelliJ?

Use this spin box to specify the port on which the built-in web server runs. By default this port is set to 63342 through which IntelliJ IDEA accepts connections from services. You can set the port number to any other value starting with 1024 and higher.

How can I tell what ports are running in IntelliJ?

The port appears in the console when you start the app. I can see it via my endpoints tab (Appears next to Console) and then under the beans tab.

How do I stop IntelliJ server running on port 8080?

To stop a process, you can use ⌘F2 on macOS, or Ctrl+F2 on Windows/Linux.


5 Answers

I am sure IntelliJ Idea does not use 1099 port internally. I have used this PORT for Tomcat. I would suggest checking if any of idea plugins that you have installed are running on this port. Most of the operating systems can give you the application name that is running on that port.

Eg: lsof -w -n -i tcp:8080 would give me the application running on 8080 on my linux machine.

Hope this helps.

like image 130
Showdawn Avatar answered Oct 18 '22 10:10

Showdawn


Go to terminal and kill the session

ps -aef | grep 1099
kill -9 PID
like image 11
Neelima Avatar answered Oct 18 '22 10:10

Neelima


on windows :

step 1] find the process : netstat -ano or netstat -aon |find /i "listening" |find "Port no"

step 2] kill the process : Taskkill /F /IM (Process id obtained from above step)

Please see example below:

enter image description here

like image 4
Shashank Bodkhe Avatar answered Oct 18 '22 09:10

Shashank Bodkhe


make sure you have localhost defined in your /etc/hosts file, and that it's defined only once

localhost         127.0.0.1

it was leaving the maven process in intelliJ hanging which caused the port 1099 already in use error even after changing the jmx port to something different.

like image 2
Oubenal Mohcine Avatar answered Oct 18 '22 08:10

Oubenal Mohcine


On my Mac a process called "fsnotifier" is using port 1099. A google on this indicates that it's an IntelliJ file system watcher. Solved by using a different port for JMX.

like image 1
Michael Christensen Avatar answered Oct 18 '22 09:10

Michael Christensen