Pivotal Knowledge Base

Follow

App crashes when using java build pack 3.5 and binding AppDynmaics agent

Environment

Product Version
Pivotal Cloud Foundry  
Elastic Runtime  1.6.15 and above
Java Build Pack 3.5

Symptom

When pushing an app using java build pack which binds the AppDynamics Agent service app fails to start, and recent app log reports a crash with the following error:

2016-03-17T08:14:16.46-0700 [APP/0]      ERR -e:1: syntax error, unexpected tIDENTIFIER, expecting $end
2016-03-17T08:14:16.46-0700 [APP/0]      ERR require ''json'' ; a = JSON.parse(ENV[''VCA...
2016-03-17T08:14:16.46-0700 [APP/0]      ERR

Cause 

In Java build pack 3.5, there is a syntax error in file config/app_dynamics_agent.yml for the default_node_name variable. There are double ticks surrounding the require and env variables. 

default_node_name: ! '$(ruby -e "require ''json'' ; a = JSON.parse(ENV[''VCAP_APPLICATION'']); puts \"#{a[''application_name'']}:#{a[''instance_index'']}\"")' 

Resolution

This is fixed in java build pack 3.6 as per this commit where the double ticks are replaced with single ticks

default_node_name: $(ruby -e "require 'json' ; a = JSON.parse(ENV['VCAP_APPLICATION']); puts \"#{a['application_name']}:#{a['instance_index']}\"")

Updating the manifest to use java build pack version 3.6 will resolve this issue

 

INTERNAL NOTES:

related ticket = https://discuss.zendesk.com/agent/tickets/23462

Comments

Powered by Zendesk