Couldn't launch a debug session

150 views
Skip to first unread message

Kevin Roy

unread,
Oct 31, 2013, 9:21:28 AM10/31/13
to fusio...@googlegroups.com
Hi,

I recently installed FD 3.6.1 with Railo 3.3 and Apache 2.2 (with modcfml) on Windows 8 and I can't get debugging to work.

I had no issues with Railo Express but with Railo I keep getting the " Could not connect to server localhost on port 8002. Ensure the server has correctly been configured for debugging and try again." error.

I followed the instructions on setting up Java for debugging but they didn't seem clear as to where to place the code in the catalina file.

I added "set CATALINA_OPTS=-Djava.compiler=NONE -Xnoagent -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000" to the bottom of the catalina file without success.

Then I noticed there was already 2 places in the catalina file where
set CATALINA_OPTS was empty :

:doStop
shift
set ACTION=stop
set CATALINA_OPTS=
goto execCmd

:doConfigTest
shift
set ACTION=configtest
set CATALINA_OPTS=
goto execCmd


I tried adding the commands to those two lines as well without success. Does it need to be set there as well?

 I also changed the port number a few times inside Eclipse and the catalina file but still the same error message. All this while restarting Tomcat and Apache each time.


I did run netstat to see which ports were being used and 8000 to 8010 didn't show up, so I now the ports are available.

I'm not sure what to try next. I read many other articles but most were for a different OS and not the latest Railo 3.6.1 and there wasn't anything that helped me.

Thanks,

Kevin

Connor Conway

unread,
Oct 31, 2013, 10:21:52 AM10/31/13
to fusio...@googlegroups.com
Hello there Kevin,

the JVM Arguments described in the docs server:

set CATALINA_OPTS=-Djava.compiler=NONE -Xnoagent -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8001

should be placed near the top of your file (Specifically, just below the huge chunk of "rem"'s. 
I have mine placed like this:

//(more rem's here)
rem
rem
rem $Id: catalina.bat 1146096 2011-07-13 15:20:43Z markt $
rem ---------------------------------------------------------------------------

set CATALINA_OPTS=-Djava.compiler=NONE -Xnoagent -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8001

rem Suppress Terminate batch job on CTRL+C
//(start of the if statements)

Once you have inserted these arguments in the correct place, if you run your catalina.bat file from the command line you should see:

Listening for transport dt_socket at address: 8001

Or whichever port number you used. If you see this, start the FusionDebug connection again and it should connect fine.

I will update the documentation to eliminate this confusion :)

All the best,
Connor,
The Fusion Team

Kevin Roy

unread,
Oct 31, 2013, 2:38:43 PM10/31/13
to fusio...@googlegroups.com
 Hi Connor,

I added "set CATALINA_OPTS=-Djava.compiler=NONE -Xnoagent -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8001" and I do see Listening for transport dt_socket at address: 8006 when I execute catalina.bat.

Is this the only thing that needs to be done? I'm still encountering the "Couldn't launch a debug session: Could not connect to server localhost on port 8006. Ensure the server has correctly been configured for debugging and try again." messasge

Port 8006 is not used & I have everything configured locally (Eclipse 3.7.1, Railo 3.3.3 & FD 3.6.1 on Windows 8).

Kevin Roy

unread,
Oct 31, 2013, 2:50:30 PM10/31/13
to fusio...@googlegroups.com
Hi,

I would just like to let my fellow Googlers know that I added "-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8006" to the JAVA tab in Tomcat, as explained at this link : https://groups.google.com/forum/#!topic/fusiondebug/9lwCmApfpOQ

It fixed my error message.

Kevin

Charlie Arehart

unread,
Oct 31, 2013, 4:50:26 PM10/31/13
to fusio...@googlegroups.com

So are you saying the problem solved and you’re debugging successfully now? Just want to make sure we following along should consider this case-closed. :-)

/charlie

David Stockton

unread,
Nov 1, 2013, 5:31:20 AM11/1/13
to fusio...@googlegroups.com
Hello Kevin,

Thanks for posting your fix. As you figured out, the catalina.bat/.sh file is only used when running from the command-line. If you're running as a windows service then you'll need to alter the Tomcat Java preferences.

Many thanks for your contribution back to the group,
David Stockton
Fusion Team


--
You received this message because you are subscribed to the Google Groups "FusionDebug" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fusiondebug...@googlegroups.com.
To post to this group, send email to fusio...@googlegroups.com.
Visit this group at http://groups.google.com/group/fusiondebug.
For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages