Solved

Unable to open debugger port in Intellij idea

Posted on 2016-09-15
6
148 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
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 one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.

863 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now