Search code examples
mavenspring-bootnewrelicjavaagents

New Relic not loading configuration file Spring Boot App


I have a Spring Boot application that I'm trying to monitor with New Relic APM. On my homologation server running Ubuntu I start the application using the command:

nohup mvn -Drun.jvmArguments=-javaagent:/home/newrelic.jar -Djava.net.preferIPv4Stack=true & tail -f nohup.out

The application starts successfully and the New Relic agent is started along, I have the output

[INFO] Attaching agents: []
INFO: New Relic Agent: Loading configuration file "/home/./newrelic.yml"
Nov 10, 2017 14:03:47 +0000 [3882 1] com.newrelic 
INFO: New Relic Agent: Writing to log file: /home/logs/newrelic_agent.log

And the data is sent to my New Relic console.

But when I tried the same command on my production server I only receive the output:

[INFO] Attaching agents: []

The application starts but I do not see the application on my New Relic console. It seems like the agent isn't loading the configuration file. newrelic.yml is on the same file that newrelic.jar. Both are the same application with the difference that on the homologation server, that gets monitored, the MySQL database is on the same machine and on the production server the database is on another machine.

What could be happening?


Solution

  • Are you using some other javaagent?

    we have found out that the Dynatrace One agent has some issues with new relic. preventing it from starting. in order to the new relic to work we needed to uninstall the Dynatrace agent.