You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We noticed that our Quarkus containers (which use run-java.sh v1.3.8) running on Kubernetes spit out a lot of the following errors when starting up:
/deployments/run-java.sh: line 332: [: Picked up JAVA_TOOL_OPTIONS: -javaagent:/appinsights/applicationinsights-agent.jar: integer expression expected
/deployments/run-java.sh: line 380: [: Picked up JAVA_TOOL_OPTIONS: -javaagent:/appinsights/applicationinsights-agent.jar: integer expression expected
/deployments/run-java.sh: line 420: [: Picked up JAVA_TOOL_OPTIONS: -javaagent:/appinsights/applicationinsights-agent.jar: integer expression expected
/deployments/run-java.sh: line 457: [: Picked up JAVA_TOOL_OPTIONS: -javaagent:/appinsights/applicationinsights-agent.jar: integer expression expected
/deployments/run-java.sh: line 332: [: Picked up JAVA_TOOL_OPTIONS: -javaagent:/appinsights/applicationinsights-agent.jar: integer expression expected
/deployments/run-java.sh: line 380: [: Picked up JAVA_TOOL_OPTIONS: -javaagent:/appinsights/applicationinsights-agent.jar: integer expression expected
/deployments/run-java.sh: line 420: [: Picked up JAVA_TOOL_OPTIONS: -javaagent:/appinsights/applicationinsights-agent.jar: integer expression expected
/deployments/run-java.sh: line 457: [: Picked up JAVA_TOOL_OPTIONS: -javaagent:/appinsights/applicationinsights-agent.jar: integer expression expected
Background: we want to inject the MS Azure Application Insights Agent into all our Java apps without the need to bundle the agent into the Quarkus container, so we inject a sidecar container that downloads the agent jar file and sets the JAVA_TOOL_OPTIONS environment variable.
Now if you set either JAVA_TOOL_OPTIONS or JDK_JAVA_OPTIONS environment variables the java process will print out a line telling that it picked up this environment variable when starting:
$ export JAVA_TOOL_OPTIONS=-Dfoo=bar
$ java -version
Picked up JAVA_TOOL_OPTIONS: -Dfoo=bar
openjdk version "11.0.16.1" 2022-08-12
OpenJDK Runtime Environment Temurin-11.0.16.1+1 (build 11.0.16.1+1)
OpenJDK 64-Bit Server VM Temurin-11.0.16.1+1 (build 11.0.16.1+1, mixed mode)
This breaks the code in run-java.sh which determines the Java version so we get a lot of error messages and probably other side effects.
Thanks for pointing that out, but unfortunately, I don't have any time to spend on java-run-sh. Happy to integrate a PR though if you are fancy to provide one.
We noticed that our Quarkus containers (which use
run-java.sh
v1.3.8) running on Kubernetes spit out a lot of the following errors when starting up:Background: we want to inject the MS Azure Application Insights Agent into all our Java apps without the need to bundle the agent into the Quarkus container, so we inject a sidecar container that downloads the agent jar file and sets the
JAVA_TOOL_OPTIONS
environment variable.Now if you set either
JAVA_TOOL_OPTIONS
orJDK_JAVA_OPTIONS
environment variables thejava
process will print out a line telling that it picked up this environment variable when starting:This breaks the code in
run-java.sh
which determines the Java version so we get a lot of error messages and probably other side effects.Check out pinterest/ktlint#1544 to see how others fixed this.
The text was updated successfully, but these errors were encountered: