Skip to content

Commit df6288f

Browse files
Extend PR#2535 to enable remote debugging for CentOS63 as well (#3128)
This PR is an extension of #2535. By doing this, we also create an easy method to enable remote debug in CentOS63 as well.
1 parent 8849382 commit df6288f

3 files changed

Lines changed: 11 additions & 5 deletions

File tree

packaging/centos63/cloud-management.rc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ start() {
8888

8989
echo -n "Starting $PROGNAME" "$SHORTNAME"
9090

91-
if daemon --pidfile $PIDFILE $DAEMON -home "$JAVA_HOME" -cp "$CLASSPATH" -pidfile "$PIDFILE" -user "$USER" \
91+
if daemon --pidfile $PIDFILE $DAEMON $JAVA_DEBUG -home "$JAVA_HOME" -cp "$CLASSPATH" -pidfile "$PIDFILE" -user "$USER" \
9292
-errfile $LOGDIR/cloudstack-management.err $JAVA_OPTS $CLASS
9393
RETVAL=$?
9494
then

packaging/centos63/cloud-usage.rc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ start() {
9696

9797
echo -n "Starting $PROGNAME" "$SHORTNAME"
9898

99-
if daemon --pidfile $PIDFILE $DAEMON -home "$JAVA_HOME" -cp "$CLASSPATH" -pidfile "$PIDFILE" -user "$USER" \
99+
if daemon --pidfile $PIDFILE $DAEMON $JAVA_DEBUG -home "$JAVA_HOME" -cp "$CLASSPATH" -pidfile "$PIDFILE" -user "$USER" \
100100
-errfile $LOGDIR/cloudstack-usage.err -outfile $LOGDIR/cloudstack-usage.out -Dpid=$$ $CLASS
101101
RETVAL=$?
102102
then

packaging/systemd/cloudstack-management.default

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@ CLASSPATH="/etc/cloudstack/management:/usr/share/cloudstack-common:/usr/share/cl
3434

3535
BOOTSTRAP_CLASS=org.apache.cloudstack.ServerDaemon
3636

37-
#You can uncomment this if you want to enable Java remote debugging.
38-
#You can change the parameters at your will. The 'address' field defines the port to be used.
39-
#JAVA_DEBUG="-agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n"
37+
################################################################################################
38+
#You can uncomment one of these options if you want to enable Java remote debugging. #
39+
#You can change the parameters at your will. The 'address' field defines the port to be used. #
40+
################################################################################################
41+
# This option here should be used with 'systemmd' based operating systems such as CentOS7, Ubuntu 16, and so on.
42+
#JAVA_DEBUG="-agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n"
43+
44+
# On the other hand, this option is used by CentOS6.
45+
#JAVA_DEBUG="-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n"

0 commit comments

Comments
 (0)