Solved

Unable to open debugger port in Intellij idea

Posted on 2016-09-15
6
78 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
HashMap Vs TreeMap 12 47
create a gui in perl 3 42
solarwind tftp server 2 30
@SBGen Method 3 25
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
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:
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

771 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

10 Experts available now in Live!

Get 1:1 Help Now