aspose file tools*
The moose likes JBoss/WildFly and the fly likes Unable to open debugger port Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Unable to open debugger port" Watch "Unable to open debugger port" New topic
Author

Unable to open debugger port

MuraliKrishna Bhadragiri
Greenhorn

Joined: Jul 14, 2008
Posts: 5
Hi ,
I am using intellij idea editor. When i configure the jboss-4.0.1 and trying to debug the application , it is giving the following error in th pop up .

Unable to open debugger port : java.net.ConnectException "Connection refused: connect"

Can anyone help me out to solve this issue.

regards,
krish...
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5830
    
    7

Look in the run script (run.bat or run.conf, depending on your operating system), and uncomment the JAVA_OPTS setting to enable debugging. Here is an example from run.conf:

# Sample JPDA settings for remote socket debuging
JAVA_OPTS="$JAVA_OPTS -Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y"


JBoss In Action
MuraliKrishna Bhadragiri
Greenhorn

Joined: Jul 14, 2008
Posts: 5
Hi Peter,
Thanks for reply. Actually I am new to JBoss . When i tried by modifying the JAVA_OPTS in the run.bat as you suggested in the following way :

previous:-
JAVA_OPTS=-classic -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y %JAVA_OPTS%

new:-
JAVA_OPTS="$JAVA_OPTS -Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y"

Then I run the jboss server manually by clicking "run.bat" in the jboss bin.Then I started the debugger in the intellij idea editor.
But when i gave http://localhost:8080/ in the browser its displaying the jboss home page and on giving http://localhost:8787/ , I get this exception in the pop up generated in editor .

Error running jboss: Unable to open debugger port : java.io.IOException "handshake failed - unrecognized message from target VM"

and in the editor console this message is displayed:
Disconnected from the target VM, address: 'localhost:8787', transport: 'socket'

Can you please give me the steps that I have to follow to debug the application from the idea editor.

thanks and regards,
Krish...
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5830
    
    7

First, I told you to uncomment the JAVA_OPTS that enable debugging. Because you did not say which operating system you were using, I had to guess, so I showed you the debugging settings in the run.conf file. Based on what you posted, it looks like you already uncommented JAVA_OPTS that enable debugging in run.bat. You should revert the settings back to what was there.

Second, I don't use Idea so I do not know what to do to get it to hook up with the the JVM to debug it. Obviously, opening your browser to the debugging port (8787) is not the correct thing to do.

Look in the Idea documentation on how to debug a remote Java application, that should give you the rest of the steps. Or maybe someone else who uses Idea can help.
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9046
    
  10
http://www.jetbrains.net/devnet/message/5208639


JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Unable to open debugger port