Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Remote debugging connection refused on Mac

 
Ricardy Banks
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Platform:
XServer G5, OSX 10.3.8, Java 1.4.2_05

I am running JBoss/Tomcat with JPDA remote debugging turned on but I keep getting "Failed to connect to remote VM. Connectin refused" when I try to remote debug via eclipse. Any ideas?
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is the port the same for the server and the IDE? Maybe on Mac the App Server uses a different port than the default, and Eclipse use the standard default 5000, I think or is it 8000, or 5001. I forget, I can open up IDEA but I am lazy right now. Sorry, I will open it soon since I need to code today, then I will post the defualt.

Mark
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK I was off and close at the same time. The default in IntelliJ IDEA has is 5005. I also know that Eclipse uses a different default.

Mark
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Eclipse's default is port 8000.

Oh, and make sure that you aren't already connected too. That sometimes happens to me, I am already connected and didn't remember, so I connect again and get a refusal.

Mark
[ March 28, 2005: Message edited by: Mark Spritzler ]
 
Ricardy Banks
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using Eclipse and set the port to 7000 on both the server and the client.

I found the following on another post but I am still not sure what to do:

"Yo Rob, whatup buddy? I see no one has answered your question yet. Why doesn't anyone ever answer your questions? Is it because the only questions you ask cannot be answered by mere mortals?

The answer to your question is that MacOSX is using a slightly different method of obtaining the local hosts's IP address than Windows. If the DHCP server supplies a name for the ethernet port to which you connect, getHostName() on MacOS returns that name instead of "localhost", which is a problem if that name is not in the DNS. (And normally it won't be.) So what you have to do is manually add the port name to your local host database on the Mac using NetInfo, and point it to "localhost", and then all is well."
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic