Skip to content

Commit

Permalink
fix(mae): use JAVA_TOOL_OPTIONS instead of JDK_JAVA_OPTIONS
Browse files Browse the repository at this point in the history
JDK_JAVA_OPTIONS is loaded twice by java (probably alpine bug).
As a workaround using: JAVA_TOOL_OPTIONS
  • Loading branch information
szalai1 authored Oct 4, 2022
1 parent bea5a07 commit 3b856ab
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docker/datahub-mae-consumer/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ if [[ ${GRAPH_SERVICE_IMPL:-} != elasticsearch ]] && [[ ${SKIP_NEO4J_CHECK:-fals
dockerize_args+=("-wait" "$NEO4J_HOST")
fi

JDK_JAVA_OPTIONS="${JDK_JAVA_OPTIONS:-}${JAVA_OPTS:+ JAVA_OPTS}${JMX_OPTS:+ JMX_OPTS}"
JAVA_TOOL_OPTIONS="${JDK_JAVA_OPTIONS:-}${JAVA_OPTS:+ JAVA_OPTS}${JMX_OPTS:+ JMX_OPTS}"
if [[ ${ENABLE_OTEL:-false} == true ]]; then
JDK_JAVA_OPTIONS="$JDK_JAVA_OPTIONS -javaagent:opentelemetry-javaagent-all.jar"
JAVA_TOOL_OPTIONS="$JAVA_TOOL_OPTIONS -javaagent:opentelemetry-javaagent-all.jar"
fi
if [[ ${ENABLE_PROMETHEUS:-false} == true ]]; then
JDK_JAVA_OPTIONS="$JDK_JAVA_OPTIONS -javaagent:jmx_prometheus_javaagent.jar=4318:/datahub/datahub-mae-consumer/scripts/prometheus-config.yaml"
JAVA_TOOL_OPTIONS="$JAVA_TOOL_OPTIONS -javaagent:jmx_prometheus_javaagent.jar=4318:/datahub/datahub-mae-consumer/scripts/prometheus-config.yaml"
fi

export JDK_JAVA_OPTIONS
export JAVA_TOOL_OPTIONS
exec dockerize "${dockerize_args[@]}" java -jar /datahub/datahub-mae-consumer/bin/mae-consumer-job.jar

0 comments on commit 3b856ab

Please sign in to comment.