IntelliJ Idea IDE using port 1099
Asked Answered
F

8

22

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)

Framework answered 18/8, 2014 at 23:26 Comment(1)
So obviously IntelliJ is using port 1099, probably for an RMI Registry of its own.Bohlin
C
27

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.

Closure answered 19/8, 2014 at 2:26 Comment(2)
The process using port 1099 is 'java' (jdk through IntelliJ). But you had the solution. The issue was in FindBugs plugin. Uninstalling it solved the problem. Thank you @Sachi!Framework
It was findbugs for me too. I really don't know why, that plugin was never a problem.. but after I updated tomcat it.. it was sitting on the portUtta
F
11

Go to terminal and kill the session

ps -aef | grep 1099
kill -9 PID
Frumenty answered 26/10, 2017 at 5:49 Comment(0)
C
5

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

Chanachance answered 25/6, 2019 at 8:3 Comment(0)
O
2

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.

Octroi answered 11/10, 2016 at 18:9 Comment(1)
Helped on similar issue (port 1100)Objective
M
1

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.

Mickiemickle answered 12/11, 2015 at 13:25 Comment(0)
E
0

In my case I got disconnected from the JBoss instance that I had started in IDEA, and the server continued to run, thus using the 1099 port for JMX.

You can either kill the server process using that port (it'll be a java process using a lot of memory) or create a remote debug configuration that you can use in case you don't want to restart the server. Use the same debug ports for the local and remote debug configurations.

Elmer answered 2/2, 2016 at 11:30 Comment(0)
R
0

Since it is easy to tackle with Terminal. Open the Terminal and type following.

fuser 1099/tcp

If a process uses above port, it should return something output like this.

1099/tcp:            2222

The last column value (2222) is referred to the Process ID (PID).

Just KILL it as follows.

kill -9 2222

Now you can start debugging.

Ruth answered 22/4, 2019 at 2:28 Comment(0)
I
0

On windows command line :

1. find which process uses port 1099

netstat -ano -p tcp |find "1099"

enter image description here

2. Process with PID 2112 is listening on port 1099. Now we can query task list to find the process.

tasklist |find "2112"

enter image description here

Also You can check the windows task manager. enter image description here

3. Kill the process from task manager, by right click on the item and selecting End task or via command line :
taskkill /F /PID 2112

Increate answered 2/3, 2022 at 14:42 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.