Your New Relic Java agent is not generating log files.
Ensure your New Relic Java agent is configured to generate newrelic_agent.log files by checking the following:
- Log file directory
New Relic's Java agent stores log files in the logs directory. The Java agent creates this directory in the same location used for the newrelic.jar in the
-javaagentswitch. If you can't find newrelic_agent.log, ensure the JVM process has permissions to write to the logs directory. If permissions are not the issue, check that you did not customize the location of the logs directory.
Tip: To specify a different directory and name, use the
log_file_namesettings. For more information, see Java agent configuration: Config file.
- Config file
Recommendation: To check that you have a valid newrelic.yml configuration file, use the YAML validator. This tool verifies that your YAML is valid. It also gives you an interpreted version uncluttered by comments.
If your YAML is not valid, use a tool such as Sublime Text. This will help you make changes to your newrelic.yml with the correct whitespace.
- Boot log
You can start up your app server so that it prints to the console. Here are some examples of where this is stored:
- JBoss: log/boot.log
- Glassfish: domain-dir/logs/server.log
- Tomcat: catalina.out (as specified in catalina.sh or catalina.bat
- WebLogic: server_name.log
- WebObjects: /var/log/webobjects.log
When booting your JVM, the generated logs should show that the newrelic.jar file opens and the agent interprets the newrelic.yml configuration file. Failures to find either file or open them correctly will show here.
Successfully loading the agent will look something like this:
Aug 29, 2013 15:02:49 -0700 NewRelic 1 INFO: Agent is using Logback Aug 29, 2013 15:02:49 -0700 NewRelic 1 INFO: Loading configuration file "/path-on-your-host/newrelic/.newrelic.yml"
Occasionally Java agent starts but can't write logs because the agent does not have permissions to create the log directory and log files. Permissions management varies greatly by environment, so work with your system administrator to verify that this is not an issue.
For more help
Additional documentation resources include:
- Generating logs for troubleshooting (collecting log file data and verifying your Java app's name and location to help identify and resolve the problem).