From d213a4d956677aec1f5f770844e6afbf7edfbb22 Mon Sep 17 00:00:00 2001 From: slavkap <51903378+slavkap@users.noreply.github.com> Date: Tue, 29 Sep 2020 09:56:14 +0300 Subject: [PATCH] systemd: Binding listening socket to all address for remote debug (#4345) Since Java 9 the notation 'address=port' only applies to localhost. For remote debug you have to explicitly specify that you want to listen to all IP addresses (e.g. address=*8000) --- packaging/systemd/cloudstack-agent.default | 2 +- packaging/systemd/cloudstack-management.default | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packaging/systemd/cloudstack-agent.default b/packaging/systemd/cloudstack-agent.default index dba2c0ce532..a319c4e227e 100644 --- a/packaging/systemd/cloudstack-agent.default +++ b/packaging/systemd/cloudstack-agent.default @@ -23,4 +23,4 @@ JAVA_CLASS=com.cloud.agent.AgentShell #You can uncomment this if you want to enable Java remote debugging. #Feel free to 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" +#JAVA_DEBUG="-agentlib:jdwp=transport=dt_socket,address=*:8000,server=y,suspend=n" diff --git a/packaging/systemd/cloudstack-management.default b/packaging/systemd/cloudstack-management.default index d59ebad9d74..de41a6d8969 100644 --- a/packaging/systemd/cloudstack-management.default +++ b/packaging/systemd/cloudstack-management.default @@ -26,7 +26,7 @@ BOOTSTRAP_CLASS=org.apache.cloudstack.ServerDaemon #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" +#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 +#JAVA_DEBUG="-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n"