From 1656bfdacd736c043a1963e301efc56cc9f0ca20 Mon Sep 17 00:00:00 2001 From: JP Pakalapati Date: Wed, 5 Jul 2023 22:34:35 +0530 Subject: [PATCH 1/5] Add `jolokia.jar` to docker image --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 60364fd8..27001a47 100644 --- a/Dockerfile +++ b/Dockerfile @@ -36,9 +36,9 @@ RUN tar xzf /tmp/debezium.tar.gz -C $SERVER_HOME --strip-components 1 &&\ rm -f /tmp/debezium.tar.gz # -# Add jmxterm for liveness probes +# Add jolokia for healthchecks over jmx # -ADD --chown=jboss:jboss https://github.com/jiaqi/jmxterm/releases/download/v1.0.3/jmxterm-1.0.3-uber.jar $SERVER_HOME/jmxterm-uber.jar +ADD --chown=jboss:jboss https://repo1.maven.org/maven2/org/jolokia/jolokia-jvm/1.7.2/jolokia-jvm-1.7.2.jar $SERVER_HOME/jolokia.jar COPY --chown=jboss:jboss bridge-run.sh $SERVER_HOME From f288825b084a0efa04250f74e503374e07de65f9 Mon Sep 17 00:00:00 2001 From: JP Pakalapati Date: Fri, 7 Jul 2023 22:16:51 +0530 Subject: [PATCH 2/5] Add `jolokia.jar` to java runtime --- bridge-run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bridge-run.sh b/bridge-run.sh index 519d680b..39d8b201 100755 --- a/bridge-run.sh +++ b/bridge-run.sh @@ -1,6 +1,6 @@ #!/bin/bash -export JAVA_OPTS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005 -Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.port=9012 -Dcom.sun.management.jmxremote.rmi.port=9012 -Djava.rmi.server.hostname=$POD_IP" +export JAVA_OPTS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005 -javaagent:jolokia.jar" if [[ -v PULSAR_SERVICE_ACCOUNT_JSON ]]; then echo "$PULSAR_SERVICE_ACCOUNT_JSON" > /tmp/pulsar_creds.json From 7663b1f61361b7f3611b86d8730f221a52eb03f7 Mon Sep 17 00:00:00 2001 From: JP Pakalapati Date: Sat, 8 Jul 2023 02:24:18 +0530 Subject: [PATCH 3/5] Increase heap space to 4GB --- bridge-run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bridge-run.sh b/bridge-run.sh index 39d8b201..76e9efa8 100755 --- a/bridge-run.sh +++ b/bridge-run.sh @@ -1,6 +1,6 @@ #!/bin/bash -export JAVA_OPTS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005 -javaagent:jolokia.jar" +export JAVA_OPTS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005 -javaagent:jolokia.jar -Xmx4G" if [[ -v PULSAR_SERVICE_ACCOUNT_JSON ]]; then echo "$PULSAR_SERVICE_ACCOUNT_JSON" > /tmp/pulsar_creds.json From e9de332c823ba7f3bed8ead6bfc3af71c2f29abd Mon Sep 17 00:00:00 2001 From: JP Pakalapati Date: Tue, 11 Jul 2023 00:17:18 +0530 Subject: [PATCH 4/5] Move Xmx parameter to `DEBEZIUM_OPTS` env variable --- bridge-run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bridge-run.sh b/bridge-run.sh index 76e9efa8..39d8b201 100755 --- a/bridge-run.sh +++ b/bridge-run.sh @@ -1,6 +1,6 @@ #!/bin/bash -export JAVA_OPTS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005 -javaagent:jolokia.jar -Xmx4G" +export JAVA_OPTS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005 -javaagent:jolokia.jar" if [[ -v PULSAR_SERVICE_ACCOUNT_JSON ]]; then echo "$PULSAR_SERVICE_ACCOUNT_JSON" > /tmp/pulsar_creds.json From 24bad8732f2d6a9b888a1ad37c2fbba7ab0eb10a Mon Sep 17 00:00:00 2001 From: JP Pakalapati Date: Wed, 26 Jul 2023 23:27:12 +0530 Subject: [PATCH 5/5] Add back jmx for exporting metrics into datadog --- bridge-run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bridge-run.sh b/bridge-run.sh index 39d8b201..26379a8e 100755 --- a/bridge-run.sh +++ b/bridge-run.sh @@ -1,6 +1,6 @@ #!/bin/bash -export JAVA_OPTS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005 -javaagent:jolokia.jar" +export JAVA_OPTS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005 -javaagent:jolokia.jar -Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.port=9012 -Dcom.sun.management.jmxremote.rmi.port=9012 -Djava.rmi.server.hostname=$POD_IP" if [[ -v PULSAR_SERVICE_ACCOUNT_JSON ]]; then echo "$PULSAR_SERVICE_ACCOUNT_JSON" > /tmp/pulsar_creds.json