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.jarfile has been installed correctly and that the-javaagentargument 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:
bash$ps -ef | grep javaWindows:
bash$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
-javaagentargument is present:- If you see a
-javaagentargument: 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
-javaagentargument: 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.jarandnewrelic.ymlfiles are in the same directory. If you have specified a non-default location for the config file using thenewrelic.config.filesystem property, ensure that the config file does exist in that location and is correctly formatted.Generate
finestlevel 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.ymland in theweb.xmldisplay-namesetting.