diff --git a/packaging/centos63/cloud-management.rc b/packaging/centos63/cloud-management.rc index 0ef5fc4a171..eb075daee59 100755 --- a/packaging/centos63/cloud-management.rc +++ b/packaging/centos63/cloud-management.rc @@ -88,7 +88,7 @@ start() { echo -n "Starting $PROGNAME" "$SHORTNAME" - if daemon --pidfile $PIDFILE $DAEMON -home "$JAVA_HOME" -cp "$CLASSPATH" -pidfile "$PIDFILE" -user "$USER" \ + if daemon --pidfile $PIDFILE $DAEMON $JAVA_DEBUG -home "$JAVA_HOME" -cp "$CLASSPATH" -pidfile "$PIDFILE" -user "$USER" \ -errfile $LOGDIR/cloudstack-management.err $JAVA_OPTS $CLASS RETVAL=$? then diff --git a/packaging/centos63/cloud-usage.rc b/packaging/centos63/cloud-usage.rc index 774113745d7..15e9ee5b4f8 100755 --- a/packaging/centos63/cloud-usage.rc +++ b/packaging/centos63/cloud-usage.rc @@ -96,7 +96,7 @@ start() { echo -n "Starting $PROGNAME" "$SHORTNAME" - if daemon --pidfile $PIDFILE $DAEMON -home "$JAVA_HOME" -cp "$CLASSPATH" -pidfile "$PIDFILE" -user "$USER" \ + if daemon --pidfile $PIDFILE $DAEMON $JAVA_DEBUG -home "$JAVA_HOME" -cp "$CLASSPATH" -pidfile "$PIDFILE" -user "$USER" \ -errfile $LOGDIR/cloudstack-usage.err -outfile $LOGDIR/cloudstack-usage.out -Dpid=$$ $CLASS RETVAL=$? then diff --git a/packaging/systemd/cloudstack-management.default b/packaging/systemd/cloudstack-management.default index 05f4a508c37..cd6a1cafc13 100644 --- a/packaging/systemd/cloudstack-management.default +++ b/packaging/systemd/cloudstack-management.default @@ -34,6 +34,12 @@ CLASSPATH="/etc/cloudstack/management:/usr/share/cloudstack-common:/usr/share/cl BOOTSTRAP_CLASS=org.apache.cloudstack.ServerDaemon -#You can uncomment this if you want to enable Java remote debugging. -#You can change the parameters at your will. The 'address' field defines the port to be used. -#JAVA_DEBUG="-agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n" \ No newline at end of file +################################################################################################ +#You can uncomment one of these options if you want to enable Java remote debugging. # +#You can change the parameters at your will. The 'address' field defines the port to be used. # +################################################################################################ +# This option here should be used with 'systemmd' based operating systems such as CentOS7, Ubuntu 16, and so on. +#JAVA_DEBUG="-agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n" + +# On the other hand, this option is used by CentOS6. +#JAVA_DEBUG="-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n" \ No newline at end of file