Reputation: 631
When tying to start Hybris in debug mode using Eclipse Kepler showing error
“Failed to connect to remote VM. Connection refused.
Connection refused: connect”
Even I tried by changing the default port also
tomcat.debugjavaoptions=-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=8000,suspend=n
but showing the same error. Any help/suggestion will be appreciated.
Upvotes: 2
Views: 20748
Reputation:
Step 1: Go to local.properties in config folder and add the following lines:
tomcat.debug.port=8001
tomcat.debugjavaoptions=-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=8001,suspend=n -Xverify:none -DforceANSI=true
Make sure the port you use (here 8001) is free.
Step 2: Go to \hybris\bin\platform\tomcat\conf\catalina.properties
and add:
tomcat.enable.debug=true
Step 3: ant all
Step 4: hybrisserver.bat debug
Personally tried and tested, works fine!
Upvotes: 1
Reputation: 21
tomcat.debugjavaoptions=-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=50021,suspend=n -Xverify:none -DforceANSI=true
ant all & hybrisserverstart.bat debug
Upvotes: 1
Reputation: 1085
Upvotes: 2
Reputation: 11
Open file hybris\bin\platform\tomcat\conf\wrapper-debug.conf
and go to the following line:
wrapper.java.additional.36=-Xrunjdwp:transport=dt_socket,server=y,address=8000,suspend=n
In that change port number 8000 to 8001.
Upvotes: 0
Reputation: 14391
Running hybris\bin\platform\hybrisserver.bat debug
should start your server ready to debug but all it actually does is use the configuration in hybris\bin\platform\tomcat\conf\wrapper-debug.conf
. So you need to check that file and add the following lines if they are missing:
wrapper.java.additional.34=-Xdebug
wrapper.java.additional.35=-Xnoagent
wrapper.java.additional.36=-Xrunjdwp:transport=dt_socket,server=y,address=8000,suspend=n
Note the numbers (e.g. 34, 35, 36) need to be adapted according to which additional lines you already have in your .conf file.
Start hybrisserver.bat debug
and wait till it's fully started. Then you can connect on port 80 (set in IntellJ under Run -> Edit Configurations -> Remote...)
Upvotes: 0
Reputation: 66
Please change first debug port using below property
tomcat.debug.port=<please provide port which is free>
in local.properties
file then start server using
hybrisserver.bat debug
Upvotes: 3
Reputation: 51
Go to ...\hybris\bin\platform and run hybrisserver.bat debug in windows or hybrisserver.sh in unix
This will start the hybris server in debug mode
During server start up, you can see a line that says hybris server starting in debug mode at the very start.
Upvotes: 0
Reputation: 522
you should run your hybris server with -debug option in console and by default connect debugger to port 9000 . that worked with me
Upvotes: 0
Reputation: 14775
which version of hybris are you using? How do you currently start hybris? Is hybris and eclipse on the same machine? do you have admin privileges?
i am using hybris 3.1 with eclipse-helios.
First i start hybris without eclipse in debugmode: using ...\platform\tomcat-6\bin\debug.bat at commandline.
After that i start debugging by attaching the eclipse-debugger to that debugmode-running hybris instance using a eclipse debug configuration "remote java application" with connection Properties: host=localhost, port=8000.
Upvotes: 0