I can't debug application from Eclipse

5,424 views
Skip to first unread message

Reiterweg

unread,
Apr 21, 2012, 5:15:23 AM4/21/12
to play-fr...@googlegroups.com
Hi,

I'm trying to debug a test application form Eclipse but I can't, it says me:

"Failed to connect to remote VM. Connection refused."

It doesn't give me more information about the problem.

I'm using:
  • Ubuntu 11.10 64 bits
  • OpenJDK 1.6.0_24 64 bits
  • Eclipse Indigo Service Release 2, build id 20120216-1857
  • play! 2.0 / play! 2.1-SNAPSHOT (from GitHub)
Thank you so much in advance if anyone can give a clue for this trouble.
Screenshot.png

Mariot Chauvin

unread,
Apr 23, 2012, 4:35:37 AM4/23/12
to play-fr...@googlegroups.com
Hi,

You probably try to connect to the wrong port.
Check that port specified in the debug configuration you launch is the same as the one indicated in the play console.

Cheers,

Mariot

2012/4/21 Reiterweg <reit...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To view this discussion on the web visit https://groups.google.com/d/msg/play-framework/-/Jtgyp_ZBhXkJ.
To post to this group, send email to play-fr...@googlegroups.com.
To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.

Message has been deleted

Reiterweg

unread,
Apr 23, 2012, 6:02:01 AM4/23/12
to play-framework
I thought that was that, but I did the test using the default port
9999, and then try with 9000; both of them are showed at console
when play starts the application. After that, I've used 8000 just to
test.

Something curious is that when I'm trying to do the same test with
IDEA, it gives a slightly different response: unexpected handshake (or
invalid handshake, something like that).

On 23 abr, 03:35, Mariot Chauvin <m...@zenexity.com> wrote:
> Hi,
>
> You probably try to connect to the wrong port.
> Check that port specified in the debug configuration you launch is the same
> as the one indicated in the play console.
>
> Cheers,
>
> Mariot
>
> 2012/4/21 Reiterweg <reiter...@gmail.com>
>
>
>
>
>
>
>
> > Hi,
>
> > I'm trying to debug a test application form Eclipse but I can't, it says
> > me:
>
> > "Failed to connect to remote VM. Connection refused."
>
> > It doesn't give me more information about the problem.
>
> > I'm using:
>
> >    - Ubuntu 11.10 64 bits
> >    - OpenJDK 1.6.0_24 64 bits
> >    - Eclipse Indigo Service Release 2, build id 20120216-1857
> >    - play! 2.0 / play! 2.1-SNAPSHOT (from GitHub)

Leonard Punt

unread,
Apr 23, 2012, 6:39:23 AM4/23/12
to play-fr...@googlegroups.com
Are you sure you started Play in debug mode? (play debug)

Leonard

Reiterweg

unread,
Apr 23, 2012, 6:44:35 AM4/23/12
to play-fr...@googlegroups.com
Totally sure and doesn't work. I was looking for the *.launch files but seems that those files are not used for 2.0+ versions.

Rolf Wemmenhove

unread,
May 4, 2012, 9:56:05 AM5/4/12
to play-fr...@googlegroups.com
Hi reiterweg, 

My eclipse shows the same problem as your IntelliJ seems to have: 'Failed to connect to remote VM. Received invalid handshake.'

Did you manage to get it working in the end? From my search on Google and SO, this doesn't seem to be a common problem.

1. I double checked if I installed the play framework correctly (Latest stable Play version v2.0.1, JDK 6, r/w access on install folder, path variable, $ play help, etc.). 
2. Then I followed the tutorial to create myFirstApp (http://www.playframework.org/documentation/2.0.1/NewApplication)
3. Next the (slightly confusing) instructions from the debugging tutorial: http://www.playframework.org/documentation/2.0.1/IDE
No luck.
4. Then tried again, following the instructions in Mansoor Siddiqui's answer on SO (using $ play debug run)
Still no luck, same error.

I'd appreciate any help anyone has to offer!

Rolf

Rolf Wemmenhove

unread,
May 14, 2012, 8:34:16 AM5/14/12
to play-fr...@googlegroups.com
Solved it! For anyone who also has this issue: I solved the problem by changing the port number from 9999 to something else then connect the debugger to that new port. There was probably some other process listening on that port. 

To change the port number, set the following environment variable in your OS: export JPDA_PORT=1234

Then instead of starting play with 'play debug' use 'play', as 'play debug' will override this variable and use 9999.

Tom Carchrae

unread,
May 14, 2012, 9:34:22 AM5/14/12
to play-fr...@googlegroups.com
This often happens to me when an old Play process has not quit.  Instead of Play not running, it will assign a random JPDA port.  It took me ages (and much head scratching) to figure that out.  

Tom

--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To view this discussion on the web visit https://groups.google.com/d/msg/play-framework/-/ViS2m5n-tO0J.

Yuvraj Verma

unread,
Dec 8, 2014, 1:07:45 AM12/8/14
to play-fr...@googlegroups.com
USE FOLLOWING IN UBUNTU TERMINAL:  to debug with PLAY 2.2.4 on ubuntu
$ play debug -Dhttp.port=1234 -Dhttp.address=127.0.0.1

1234 :- any port of your choice

THEN

$ run <your port>
eg: run 3000


Got to eclipse debug configuration, in connection properties add host = localhost, port = 9999, then go to source tab and add your java project as source, then clock on apply and debug...I worked for three days to find out this.
Reply all
Reply to author
Forward
0 new messages