Closed abhishekops closed 4 years ago
Installation of Java 5.10.0 agent fails with the above trace.
But, I've made this to work with the following configuration, installation is successful. cookbook 'newrelic', '= 2.28.1', Java agent "version": "4.0.1" cookbook 'newrelic', '= 2.40.1', Java agent "version": "4.0.1"
But, the agent is not reporting any data to Newrelic. NR agent logs show the following error. warning: invalid connect response for app='Infrastructure'.
I also tried installing java agent version 3.32.0, which is our current setup in production, but it fails. I'm not sure if there is a dependency. I randomly picked up Java agent version "version": "4.0.1" and it worked.
I've solved the issue finally. I was supposed to add a flag to disable running the java agent, as I'm going through the injecting NR java agent route.
For anyone who is having the same problem. node['newrelic']['java_agent']['execute_agent_action'] - default is true(need to set to false)
newrelic::default recipe run was successful. Issues seen during the run of newrelic::java_agent recipe
cookbook 'newrelic', '= 2.40.3' (Tried with 2.35.0, 2.25.0 and versions before infra agent was included, error seems to be consistent across versions.) chef_version=13.12.14 JAVA is installed and path is set. (AdoptOpenJDK 11)
Below is the attributes that are being passed.
TRACE follows:
[execute] Error parsing arguments New Relic Agent Version 5.10.0 usage: java -jar newrelic.jar -h Prints help -v Prints the agent version -version Prints the agent version
[2020-03-05T07:52:10+00:00] INFO: Running queued delayed notifications before re-raising exception
[2020-03-05T07:52:10+00:00] INFO: Running queued delayed notifications before re-raising exception
Running handlers: [2020-03-05T07:52:10+00:00] ERROR: Running exception handlers Running handlers complete [2020-03-05T07:52:10+00:00] ERROR: Exception handlers complete Chef Client failed. 151 resources updated in 02 minutes 56 seconds [2020-03-05T07:52:10+00:00] FATAL: Stacktrace dumped to /tmp/packer-chef-client/local-mode-cache/cache/chef-stacktrace.out [2020-03-05T07:52:10+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report [2020-03-05T07:52:10+00:00] ERROR: newrelic_agent_java[Install] (newrelic::java_agent line 8) had an error: Mixlib::ShellOut::ShellCommandFailed: execute[newrelic_install_newrelic.jar] (/tmp/packer-chef-client/local-mode-cache/cache/cookbooks/newrelic/providers/agent_java.rb line 108) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1' ---- Begin output of sudo java -jar newrelic.jar -s /opt/newrelic install ---- STDOUT: New Relic Agent Version 5.10.0 usage: java -jar newrelic.jar -h Prints help -v Prints the agent version -version Prints the agent version
Commands: instrument [OPTIONS] Validates a custom instrumentation xml configuration file. deployment [OPTIONS] [description] Records a deployment STDERR: Error parsing arguments ---- End output of sudo java -jar newrelic.jar -s /opt/newrelic install ---- Ran sudo java -jar newrelic.jar -s /opt/newrelic install returned 1 [2020-03-05T07:52:10+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
Please help.