Hodossy Szabolcs
Hodossy Szabolcs

Reputation: 1668

Netbeans attach debugger connection refused

I am using a Tomcat 7.0.50 server on Ubuntu 12.04 and I am trying to remotely debug my app with netbeans. So I started my server in debug mode with the following lines in catalina.sh:

if [ "$1" = "jpda" ] ; then
  if [ -z "$JPDA_TRANSPORT" ]; then
    JPDA_TRANSPORT="dt_socket"
  fi
  if [ -z "$JPDA_ADDRESS" ]; then
    JPDA_ADDRESS="8000"
  fi
  if [ -z "$JPDA_SUSPEND" ]; then
    JPDA_SUSPEND="n"
  fi
  if [ -z "$JPDA_OPTS" ]; then
    JPDA_OPTS="-agentlib:jdwp=transport=$JPDA_TRANSPORT,address=$JPDA_ADDRESS,server=y,suspend=$JPDA_SUSPEND"
  fi
  CATALINA_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n"
  shift
fi

but the connection is still refused. Any ideas? Any help would be appreciated.

Br,

Szabolcs

Upvotes: 2

Views: 3108

Answers (1)

Hodossy Szabolcs
Hodossy Szabolcs

Reputation: 1668

I managed to solve this problem, besides modifying catalina.sh, one should call it with jpda start "$@" command in startup.sh.

Upvotes: 1

Related Questions