Problem
After generating traffic for your app and waiting a few minutes for data to appear in the New Relic UI, your Java app isn't reporting data.
Solution
After sending a request to your web application, data should appear in the APM UI within two to three minutes. If no data appears after a few minutes:
Restart your web server.
Use New Relic Diagnostics to try to automatically identify the issue.
Verify the
newrelic.jar
file has been installed correctly and that the-javaagent
argument has been passed correctly into the JVM:Start your web server if it isn't already running.
In your terminal or console, run the appropriate command:
Linux or macOS:
ps -ef | grep javaWindows:
wmic process where "name='java.exe'" get ProcessID, Commandline /format:listFind the process for the service you're trying to monitor and see if the
-javaagent
argument is present:- If you see a
-javaagent
argument: The issue is either in agent startup, or the agent is unable to communicate through your firewall to our collector's IP range. - If you don't see a
-javaagent
argument: The argument wasn't passsed to your JVM. Check your startup scripts or other resources to ensure there's nothing preventing it from being passed. For more info about how to pass the argument for your environment, see Include the Java agent with a JVM argument.
- If you see a
If neither solution works, keep reading.
Verify that your
newrelic.jar
andnewrelic.yml
files are in the same directory. If you have specified a non-default location for the config file using thenewrelic.config.file
system property, ensure that the config file does exist in that location and is correctly formatted.Generate
finest
level logs, and check the logs for errors. In the event no log file can be found, see No log file (Java).Check the application server logs for errors related to the New Relic Java agent. You can see the troubleshooting pages Error bootstrapping Java agent and Errors starting Java app server for examples of observable errors in application server logs that prevent the java agent data from reporting.
Verify that your app is reporting to the expected name: In your New Relic log files, search for
"reporting to"
, then select the link in the message. For example:{"message":"Reporting to: https://rpm.newrelic.com/accounts/000/applications/000000"}If you are reporting to multiple application names, look for multiple lines with this message.
If the message link does not go to the expected application, ensure that your app name settings are the same in both
newrelic.yml
and in theweb.xml
display-name
setting.