Skip to content

Commit

Permalink
fix(cloud-native): applications are failing to start when prometheus …
Browse files Browse the repository at this point in the history
…metrics are enabled (#10459)

* fix(cloud-native): applications are failing to start when prometheus metrics are enabled

Signed-off-by: iromli <[email protected]>

* fix(docker-jans-all-in-one): applications are failing to start when prometheus metrics are enabled

Signed-off-by: moabu <[email protected]>

---------

Signed-off-by: iromli <[email protected]>
Signed-off-by: moabu <[email protected]>
Co-authored-by: Mohammad Abudayyeh <[email protected]>
  • Loading branch information
iromli and moabu authored Dec 19, 2024
1 parent 96e5d24 commit b293ebe
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions docker-jans-all-in-one/app/bin/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ set -e

get_prometheus_lib() {
if [ -n "${CN_PROMETHEUS_PORT}" ]; then
prom_agent_version="0.17.2"
agent_version=${PROMETHEUS_AGENT_VERSION:-1.0.1}

if [ ! -f /opt/prometheus/jmx_prometheus_javaagent.jar ]; then
wget -q https://repo1.maven.org/maven2/io/prometheus/jmx/jmx_prometheus_javaagent/${prom_agent_version}/jmx_prometheus_javaagent-${prom_agent_version}.jar -O /opt/prometheus/jmx_prometheus_javaagent.jar
curl -sS "https://repo1.maven.org/maven2/io/prometheus/jmx/jmx_prometheus_javaagent/${agent_version}/jmx_prometheus_javaagent-${agent_version}.jar" -o /opt/prometheus/jmx_prometheus_javaagent.jar
fi
fi
}
Expand Down
4 changes: 2 additions & 2 deletions docker-jans-auth-server/scripts/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ get_prometheus_opt() {

get_prometheus_lib() {
if [ -n "${CN_PROMETHEUS_PORT}" ]; then
prom_agent_version="0.17.2"
agent_version=${PROMETHEUS_AGENT_VERSION:-1.0.1}

if [ ! -f /opt/prometheus/jmx_prometheus_javaagent.jar ]; then
wget -q https://repo1.maven.org/maven2/io/prometheus/jmx/jmx_prometheus_javaagent/${prom_agent_version}/jmx_prometheus_javaagent-${prom_agent_version}.jar -O /opt/prometheus/jmx_prometheus_javaagent.jar
curl -sS "https://repo1.maven.org/maven2/io/prometheus/jmx/jmx_prometheus_javaagent/${agent_version}/jmx_prometheus_javaagent-${agent_version}.jar" -o /opt/prometheus/jmx_prometheus_javaagent.jar
fi
fi
}
Expand Down
2 changes: 1 addition & 1 deletion docker-jans-casa/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ FROM bellsoft/liberica-openjre-alpine:17.0.12@sha256:29cb2ee552c7c7a924b6a1b5980

RUN apk update \
&& apk upgrade --available \
&& apk add --no-cache python3 openssl tini py3-cryptography py3-psycopg2 py3-grpcio \
&& apk add --no-cache python3 openssl tini py3-cryptography py3-psycopg2 py3-grpcio curl \
&& apk add --no-cache --virtual .build-deps git wget zip

# =====
Expand Down
4 changes: 2 additions & 2 deletions docker-jans-casa/scripts/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ get_prometheus_opt() {

get_prometheus_lib() {
if [ -n "${CN_PROMETHEUS_PORT}" ]; then
prom_agent_version="0.17.2"
agent_version=${PROMETHEUS_AGENT_VERSION:-1.0.1}

if [ ! -f /opt/prometheus/jmx_prometheus_javaagent.jar ]; then
wget -q https://repo1.maven.org/maven2/io/prometheus/jmx/jmx_prometheus_javaagent/${prom_agent_version}/jmx_prometheus_javaagent-${prom_agent_version}.jar -O /opt/prometheus/jmx_prometheus_javaagent.jar
curl -sS "https://repo1.maven.org/maven2/io/prometheus/jmx/jmx_prometheus_javaagent/${agent_version}/jmx_prometheus_javaagent-${agent_version}.jar" -o /opt/prometheus/jmx_prometheus_javaagent.jar
fi
fi
}
Expand Down
4 changes: 2 additions & 2 deletions docker-jans-config-api/scripts/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ get_prometheus_opt() {

get_prometheus_lib() {
if [ -n "${CN_PROMETHEUS_PORT}" ]; then
prom_agent_version="0.17.2"
agent_version=${PROMETHEUS_AGENT_VERSION:-1.0.1}

if [ ! -f /opt/prometheus/jmx_prometheus_javaagent.jar ]; then
wget -q https://repo1.maven.org/maven2/io/prometheus/jmx/jmx_prometheus_javaagent/${prom_agent_version}/jmx_prometheus_javaagent-${prom_agent_version}.jar -O /opt/prometheus/jmx_prometheus_javaagent.jar
curl -sS "https://repo1.maven.org/maven2/io/prometheus/jmx/jmx_prometheus_javaagent/${agent_version}/jmx_prometheus_javaagent-${agent_version}.jar" -o /opt/prometheus/jmx_prometheus_javaagent.jar
fi
fi
}
Expand Down
4 changes: 2 additions & 2 deletions docker-jans-fido2/scripts/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ get_prometheus_opt() {

get_prometheus_lib() {
if [ -n "${CN_PROMETHEUS_PORT}" ]; then
prom_agent_version="0.17.2"
agent_version=${PROMETHEUS_AGENT_VERSION:-1.0.1}

if [ ! -f /opt/prometheus/jmx_prometheus_javaagent.jar ]; then
wget -q https://repo1.maven.org/maven2/io/prometheus/jmx/jmx_prometheus_javaagent/${prom_agent_version}/jmx_prometheus_javaagent-${prom_agent_version}.jar -O /opt/prometheus/jmx_prometheus_javaagent.jar
curl -sS "https://repo1.maven.org/maven2/io/prometheus/jmx/jmx_prometheus_javaagent/${agent_version}/jmx_prometheus_javaagent-${agent_version}.jar" -o /opt/prometheus/jmx_prometheus_javaagent.jar
fi
fi
}
Expand Down
4 changes: 2 additions & 2 deletions docker-jans-keycloak-link/scripts/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ get_prometheus_opt() {

get_prometheus_lib() {
if [ -n "${CN_PROMETHEUS_PORT}" ]; then
prom_agent_version="0.17.2"
agent_version=${PROMETHEUS_AGENT_VERSION:-1.0.1}

if [ ! -f /opt/prometheus/jmx_prometheus_javaagent.jar ]; then
wget -q https://repo1.maven.org/maven2/io/prometheus/jmx/jmx_prometheus_javaagent/${prom_agent_version}/jmx_prometheus_javaagent-${prom_agent_version}.jar -O /opt/prometheus/jmx_prometheus_javaagent.jar
curl -sS "https://repo1.maven.org/maven2/io/prometheus/jmx/jmx_prometheus_javaagent/${agent_version}/jmx_prometheus_javaagent-${agent_version}.jar" -o /opt/prometheus/jmx_prometheus_javaagent.jar
fi
fi
}
Expand Down
4 changes: 2 additions & 2 deletions docker-jans-link/scripts/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ get_prometheus_opt() {

get_prometheus_lib() {
if [ -n "${CN_PROMETHEUS_PORT}" ]; then
prom_agent_version="0.17.2"
agent_version=${PROMETHEUS_AGENT_VERSION:-1.0.1}

if [ ! -f /opt/prometheus/jmx_prometheus_javaagent.jar ]; then
wget -q https://repo1.maven.org/maven2/io/prometheus/jmx/jmx_prometheus_javaagent/${prom_agent_version}/jmx_prometheus_javaagent-${prom_agent_version}.jar -O /opt/prometheus/jmx_prometheus_javaagent.jar
curl -sS "https://repo1.maven.org/maven2/io/prometheus/jmx/jmx_prometheus_javaagent/${agent_version}/jmx_prometheus_javaagent-${agent_version}.jar" -o /opt/prometheus/jmx_prometheus_javaagent.jar
fi
fi
}
Expand Down
4 changes: 2 additions & 2 deletions docker-jans-scim/scripts/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ get_prometheus_opt() {

get_prometheus_lib() {
if [ -n "${CN_PROMETHEUS_PORT}" ]; then
prom_agent_version="0.17.2"
agent_version=${PROMETHEUS_AGENT_VERSION:-1.0.1}

if [ ! -f /opt/prometheus/jmx_prometheus_javaagent.jar ]; then
wget -q https://repo1.maven.org/maven2/io/prometheus/jmx/jmx_prometheus_javaagent/${prom_agent_version}/jmx_prometheus_javaagent-${prom_agent_version}.jar -O /opt/prometheus/jmx_prometheus_javaagent.jar
curl -sS "https://repo1.maven.org/maven2/io/prometheus/jmx/jmx_prometheus_javaagent/${agent_version}/jmx_prometheus_javaagent-${agent_version}.jar" -o /opt/prometheus/jmx_prometheus_javaagent.jar
fi
fi
}
Expand Down

0 comments on commit b293ebe

Please sign in to comment.