Not a customer? Click the 'Start a free trial' link to begin a 30-day SaaS trial of our product and to join our community.
Existing Cisco AppDynamics customers should click the 'Sign In' button to authenticate to access the community
01-10-2019 04:33 AM
Hi,
Hi, I have a Java application with log4j2, my log file is configured to save in JSON, so when I start my application to appdynamics, a runtime error occurs, so my application is not monitored.
My application starts but is not being monitored.
That's my log4j2.xml:
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="WARN">
<Appenders>
<File name="log" fileName="./src/log/log.json">
<JsonLayout complete="true" compact="false" />
<JsonLayout compact="true" eventEol="true" />
<Policies>
<SizeBasedTriggeringPolicy size="20 MB" />
</Policies>
</File>
<Console name="Console" target="SYSTEM_OUT">
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" />
</Console>
</Appenders>
<Loggers>
<Root level="info">
<AppenderRef ref="Console" level="info" />
<AppenderRef ref="log" level="error" />
</Root>
</Loggers>
</Configuration>
If I delete this section "<JsonLayout complete="true" compact="false" />
<JsonLayout compact="true" eventEol="true" />", the application works and is monitored.
Error Log:
2019-01-08 17:21:23,721 WARN JNDI lookup class is not available because this JRE does not support JNDI. JNDI string lookups will not be available, continuing configuration. java.lang.ClassCastException: Cannot cast org.apache.logging.log4j.core.lookup.JndiLookup to org.apache.logging.log4j.core.lookup.StrLookup
at java.lang.Class.cast(Class.java:3369)
at org.apache.logging.log4j.util.LoaderUtil.newCheckedInstanceOf(LoaderUtil.java:163)
at org.apache.logging.log4j.core.util.Loader.newCheckedInstanceOf(Loader.java:311)...
2019-01-08 17:21:23,725 WARN JMX runtime input lookup class is not available because this JRE does not support JMX. JMX lookups will not be available, continuing configuration. java.lang.ClassCastException: Cannot cast org.apache.logging.log4j.core.lookup.JmxRuntimeInputArgumentsLookup to org.apache.logging.log4j.core.lookup.StrLookup
at java.lang.Class.cast(Class.java:3369)...
java.lang.NoClassDefFoundError: com/fasterxml/jackson/core/JsonProcessingException
at java.lang.Class.getDeclaredMethods0(Native Method)
01-10-2019 07:03 PM
Hi Odair,
Thanks for posting the question on the Community.
We identified a similar issue on your agent version:4.5.x, so could you try below steps to use 4.4.x agent version instead?
If you cannot use 4.4.x agent version for some reason, please try to add below arguments in JVM option:
-Dappdynamics.agent.log4j2.disabled=true -Dlog4j.ignoreTCL=true
Let me know if this helped you.
Many thanks,
Naoto
Thanks,
Naoto Yamamoto
01-11-2019 03:00 AM - edited 01-11-2019 03:02 AM
@Naoto.Yamamoto wrote:
Hi Odair,
Thanks for posting the question on the Community.
We identified a similar issue on your agent version:4.5.x, so could you try below steps to use 4.4.x agent version instead?
- Please back up current agent directory
- Try 4.4.x agent version in new agent directory and restart JVM node process with new agent path.
If you cannot use 4.4.x agent version for some reason, please try to add below arguments in JVM option:
-Dappdynamics.agent.log4j2.disabled=true -Dlog4j.ignoreTCL=true
Let me know if this helped you.
Many thanks,
Naoto
@Naoto.Yamamoto wrote:
Hi Odair,
Thanks for posting the question on the Community.
We identified a similar issue on your agent version:4.5.x, so could you try below steps to use 4.4.x agent version instead?
- Please back up current agent directory
- Try 4.4.x agent version in new agent directory and restart JVM node process with new agent path.
If you cannot use 4.4.x agent version for some reason, please try to add below arguments in JVM option:
-Dappdynamics.agent.log4j2.disabled=true -Dlog4j.ignoreTCL=true
Let me know if this helped you.
Many thanks,
Naoto
@Naoto.Yamamoto wrote:
Hi Odair,
Thanks for posting the question on the Community.
We identified a similar issue on your agent version:4.5.x, so could you try below steps to use 4.4.x agent version instead?
- Please back up current agent directory
- Try 4.4.x agent version in new agent directory and restart JVM node process with new agent path.
If you cannot use 4.4.x agent version for some reason, please try to add below arguments in JVM option:
-Dappdynamics.agent.log4j2.disabled=true -Dlog4j.ignoreTCL=true
Let me know if this helped you.
Many thanks,
Naoto
I can't change the agent version :/
I tried to add the parameters but without success.
This is my application start command.
/usr/bin/java -javaagent:/opt/appdynamics/appdynamics-serveragent/javaagent.jar -Dappdynamics.agent.applionName=myApi -Dappdynamics.agent.tierName=myApi -Dappdynamics.agent.log4j2.disabled=true -Dlog4j.configurationFile=/opt/apl/myPaste/conf/log4j2.xml -Dapp.version=0.0.1-181 -Dlog4j.ignoreTCL=true -Dconfig.properties=/opt/apl/myPaste/conf/application.properties -jar /opt/apl/myPaste/bin/myApi.jar
The error remains the same.
01-15-2019 04:30 PM
Hi Odair,
It seems you are monitoring standalone Java application, so you can safely and easily test 4.4.x version. Download link for 4.4.3 version is here.
If you have restriction to use 4.5.x version, then I am sorry to say that this is unresolved bug for 4.5.x agent now. I will keep the progress information updated here in that case.
Let me know if this helped you.
Many thanks,
Naoto
Thanks,
Naoto Yamamoto
05-28-2019 07:47 AM
We also experience this bug.
Version 4.4.3 doesn't fix this issue. When can we expect a solution for this bug?
Thank you! Your submission has been received!
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form