Remote Debugging Java - Solr

5.7k Views Asked by At

I have Solr 5.1 and JDK 1.8 installed on my system right now. I want to debug the Solr server but when I try this command:

java -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=9000 -jar start.jar

I'm getting this error:

ERROR: JDWP Non-server transport dt_socket server=y suspend=y address=9000 must have a connection address specified through the 'address=' option
ERROR: JDWP invalid option: -agentlib:jdwp=transport=dt_socket server=y suspend=y address=9000

Any idea how to fix this issue?

2

There are 2 best solutions below

1
On BEST ANSWER

It shoould be something like this

java "-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=9000" -jar start.jar

It's working now

0
On

From the solr home dir you can execute

bin/solr start -f -a "-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=9000"