Solved

Unable to open debugger port in Intellij idea

Posted on 2016-09-15
6
215 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
  • 3
  • 2
6 Comments
 
LVL 35

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 35

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 35

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
split53 challenge 7 95
diffSum example 4 36
Why my table column Id is not passed to java object? 4 38
hibernate jars 4 28
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.

786 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