Closed boonew2 closed 4 years ago
Error looks pretty similar to an older forum post: https://discuss.newrelic.com/t/wildfly-18-openj9-nr-5-7-failed-initializing-module-org-jboss-as-logging/85724
I didn't see anything in the release notes that called out a breaking change, but please let me know if i missed that.
Hi @boonew2 , thanks for the bug report.
We'd like to attempt to reproduce this using your wonderful steps...but can you clarify a few things for us?
fs/opt/jboss/startup-scripts/001-add_nr.sh
make it into the container? It's probably just me, but I'm not seeing it at the moment. Same with fs/opt/jboss/tools/start.sh
. I'm not seeing a volume mount nor am I seeing a relevant COPY in the Dockerfile.Thanks again!
Confirmed that it doesn't happen without the agent and confirmed that it can be reproduced with the above steps.
Just verified that 5.14.0
works. I would have included that instead of 5.9.0
but i got bitten by the alphabetical sorting when browsing https://download.newrelic.com/newrelic/java-agent/newrelic-agent/ š¤¦
We had the build pulling current
and got bit by the update on the 26th when deploying
Also thanks for the quick response!
I think this is related: https://issues.redhat.com/browse/WFLY-895 Looking into a workaround, but no luck yet.
Also related https://issues.redhat.com/browse/LOGMGR-254
I believe that I have a workaround for you, @boonew2 .
Can you try changing the 001-add_nr.sh
(above) to:
JAVA_AGENT='-Dorg.wildfly.logging.skipLogManagerCheck=true -javaagent:/opt/newrelic/newrelic.jar'
echo "NEW_RELIC_AGENT_ENABLED set to true; adding $JAVA_AGENT to JAVA_OPTS..."
echo "JAVA_OPTS=\"\$JAVA_OPTS $JAVA_AGENT\"" >> $JBOSS_HOME/bin/standalone.conf
Note the addition of a system property that causes the check to be skipped -- this is the workaround that succeeded for me.
There is a lot of prior art out there about jboss LogManager not playing nicely with java agents...going back about 7 years. It seems to have been amplified around the time that java modules were introduced.
I tried about 20 different permutations of the recommended changes, but the above is the only thing that worked for me. Please let us know if this works for you as well. Good luck! š š¤
Yup, that seems to fix it; thanks a ton for quick response on this!
I couldn't quite tell from the linked issues where most the finger pointing was settling on ( wildfly, java modules, agents, ...), but if you don't think this is bug in the new relic agent and it would need to get properly resolved elsewhere feel free to close
@boonew2 Thanks for confirming that this workaround worked for you.
Yeah, there are a lot of moving parts to this, but since I think other agents are also implicated and since this workaround modifies jboss behavior, I think we can close it out. Thanks again.
Description
When starting a jboss/keycloak:8.0.2 docker container with the NR agent the container crashes
(I have minimal java knowledge so I'm not sure that the issue is directly with jboss)
Expected Behavior
I would be able to pull the latest NR agent and still have the container start
Troubleshooting or [NR Diag]
Steps to Reproduce
I think this is about the minimal setup of my project (replace the agent version to
5.9.0
to fix the startup error)Dockerfile
:fs/opt/jboss/startup-scripts/001-add_nr.sh
fs/opt/jboss/tools/start.sh
docker-compose.yml
Your Environment
Included in docker files
docker-compose up --build
Additional context