Joy
Joy

Reputation: 631

Not able to start hybris in debug mode

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

Answers (9)

user19030239
user19030239

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

Amit
Amit

Reputation: 21

tomcat.debugjavaoptions=-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=50021,suspend=n -Xverify:none -DforceANSI=true
  1. Close Eclipse/intelliJ
  2. Change port
  3. ant all & hybrisserverstart.bat debug

Upvotes: 1

Atul Jain
Atul Jain

Reputation: 1085

  1. Place tomcat.debug.port= into local.properties.
  2. Place tomcat.debugjavaoptions=-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=port_number>,suspend=n -Xverify:none -DforceANSI=true into local.properties
  3. Go to eclipse Debug Configuration, set port same as in local.properties.
  4. In commons tab check Debug option
  5. Place tomcat.enable.debug=true into catalina.properties
  6. Then start server hybrisserver.bat debug (For Windows OS).

Upvotes: 2

marcos
marcos

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

Marc
Marc

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

manish
manish

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

shravs
shravs

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

Abed Yaseen
Abed Yaseen

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

k3b
k3b

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

Related Questions