Solved

Unable to open debugger port in Intellij idea

Posted on 2016-09-15
6
848 Views
Last Modified: 2016-10-06
HI,
when i try to run a remote debugging configuration on intellij idea its gives the following error :
Screen-Shot-2016-09-15-at-3.55.11-PM.pngThe configuration is :
Screen-Shot-2016-09-15-at-3.55.21-PM.pngI tried changing the port number also but didnt work.
I am starting my java application with :
sudo java -DFLOCK_APPS_CONFIG=config.samp -jar target/flock-notes.jar -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=12345

Although i am running this program on local machine but i creating a remote debug config on intellij this is because i am running my server on port 443 and for that i need to start the intellij with root permissions. which i want to avoid so i starting it from command line. and for debuggin purpose creating a debug configuration on intellij ...

Why this port error could be there.. This was not happening earlier but somehow it started happening now.

Thanks
0
Comment
Question by:Rohit Bajaj
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 36

Accepted Solution

by:
mccarl earned 500 total points
ID: 41800766
After starting your java app from the command line, try the following command and post back what it returns...

sudo netstat -ano | grep 12345

Open in new window

1
 

Author Comment

by:Rohit Bajaj
ID: 41801093
HI,
There is no ouput and o seems to be not an option :
 
DDVMACRO:~ ro$ netstat -an | grep 12345
DDVMACRO:~ ro$ netstat -ano | grep 12345
netstat: illegal option -- o
Usage:	netstat [-AaLlnW] [-f address_family | -p protocol]
	netstat [-gilns] [-f address_family]
	netstat -i | -I interface [-w wait] [-abdgRtS]
	netstat -s [-s] [-f address_family | -p protocol] [-w wait]
	netstat -i | -I interface -s [-f address_family | -p protocol]
	netstat -m [-m]
	netstat -r [-Aaln] [-f address_family]
	netstat -rs [-s]

Open in new window

0
 
LVL 36

Expert Comment

by:mccarl
ID: 41804353
Ok, the -o option is not really needed anyway. But the fact that you have no output means that for whatever reason your java app is not listening on that port. Can you double check the command line that you are starting it with and also make sure that it is really running? Until you get some output from the above command, IntelliJ will not work either.
0
 

Author Comment

by:Rohit Bajaj
ID: 41804958
There was a problem with my command. Although the application was running but it was not listening to 12345 . The following did the trick :
sudo java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=12345 -DFLOCK_APPS_CONFIG=config.sample -jar target/flock-notes.jar
Basically the arguments should have been provided earlier.

Also what is 12345 in this case ? Is it the socket number ?
Thanks
0
 
LVL 36

Expert Comment

by:mccarl
ID: 41805072
12345 is the port number. Just like your web server listens on port 80 (or 443 for https) and your ftp server listens on port 21. The debugging agent inside your Java app is listening for connections on port 12345.
0

Featured Post

Quiz: What Do These Organizations Have In Common?

Hint: Their teams ended up taking quizzes, too.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I had a project requirement for a displaying a user workbench .This workbench would consist multiple data grids .In each grid the user will be able to see a large number of data. These data grids should allow the user to 1. Sort 2. Export the …
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question