No data appears (Java)

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 New Relic APM UI within two to three minutes. If no data appears after a few minutes:

  1. Restart your web server.
  2. Use New Relic Diagnostics to try to automatically identify the issue.
  3. To verify the newrelic.jar file has been installed correctly and that the -javaagent flag has been passed correctly into the JVM:

    • Mac or *nix: With the web server running, go to the Mac or *nix terminal and input:

      ps -ef | grep java
    • Windows: With the web server running, go to the Windows Console and input:

      wmic process where "name='java.exe'" get ProcessID, Commandline /format:list

    The output from these commands will generate a list of running Java processes on the server, and may contain more than just the process(es) running the java agent. If you are able to identify your process(es) and see the -javaagent flag has been successfully picked up by them, this tells you that the issue is in the agent starting up with the application, or possibly an issue with the agent communicating with New Relic's servers. If you identify the process(es) that should be monitored and do not see the -javaaagent flag picked up, check your startup scripts and other resources that may have prevented this Java option from being successfully passed to your JVMs.

  4. Verify that your newrelic.jar and newrelic.yml files are in the same directory. If you have specified a non-default location for the config file using the newrelic.config.file system property, ensure that the config file does exist in that location and is correctly formatted.

  5. Generate finest level logs, and check the logs for errors. In the event no log file can be found, see No log file (Java).
  6. Check the application server logs for errors related to the new relic java agent. You can see the troubleshooting pages Error Bootstrap New Relic Java Agent and Errors Java App Server for examples of observable errors in application server logs that prevent the java agent data from reporting.
  7. 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.

  8. 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 the web.xml display-name setting.

For more help

Recommendations for learning more: