Java (Java Agent, Installation, JVM, and Controller Installation)

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I use appdynamics on aws elastic beanstalk?

SOLVED
sma
Builder

How can I use appdynamics on aws elastic beanstalk?

I can't get a solution to the problem that I get forever "Waiting for Connection..." message in the web panel.

Please help me.

 

Here now my configuration:

 

File: .ebextensions/appdynamics.config
commands: 
  01-load-appdynamics-java-agent: 
    command: "sudo curl ... that load the agent zip archive from an distribution server"
  02-unzip-appdynamics-java-agent: 
    command: "sudo unzip -o /var/ad.zip -d /var/appdynamics"
  03-Give-permissions-to-appdyn: 
    command: "sudo chmod -R a+rwx /var/appdynamics"
File: Procfile
web: java -javaagent:/var/appdynamics/ver4.4.3.22593/javaagent.jar -Dappdynamics.force.default.ssl.certificate.validation=false -Dappdynamics.agent.applicationName=SMABEWAPI -Dappdynamics.agent.tierName=SMABEWAPIFRONTED -Dappdynamics.agent.nodeName=SVRONE -Dappdynamics.controller.hostName=test.mydomain.com -jar sma-1.4.0.jar

Thank you for your help.

 

Sincerely,

Sven

How can I use appdynamics on aws elastic beanstalk?
6 REPLIES 6
Employee

Re: How can I use appdynamics on aws elastic beanstalk?

I suspect your issue is with the curl command.  This is a working EB config that adds the agent to tomcat

 

files:
    "/tmp/appagent.zip":
        mode: "000444"
        owner: ec2-user
        group: ec2-user
        source: https://packages.appdynamics.com/java/4.4.0.3/AppServerAgent-4.4.0.3.zip
 
# command are executed in alphabetical order
commands:
    01reset:
        command: "rm -rf /opt/AppDynamics/appagent"
        ignoreErrors: true
    02makedir:
        command: "mkdir -p /opt/AppDynamics/appagent"
    03unzip:
        command: "unzip /tmp/appagent.zip"
        cwd: /opt/AppDynamics/appagent
    04perms:
        command: "chown -R tomcat:tomcat appagent"
        cwd: /opt/AppDynamics
    05cleanup:
        command: "rm /tmp/appagent.zip"
 
option_settings:
    - option_name: appdynamics.controller.hostName
      value: <CONTROLLER_HOST>
    - option_name: appdynamics.controller.port
      value: <CONTROLLER_PORT>
    - option_name: appdynamics.controller.ssl.enabled
      value: <true/false>
    - option_name: appdynamics.agent.accountName
      value: <ACCOUNT_NAME>
    - option_name: appdynamics.agent.accountAccessKey
      value: <ACCESS_KEY>
    - option_name: appdynamics.agent.applicationName
      value: <APPLICATION_NAME>
    - option_name: appdynamics.agent.tierName
      value: <TIER_NAME>
    - option_name: appdynamics.agent.nodeName
      value: <NODE_NAME>
    - namespace: aws:elasticbeanstalk:container:tomcat:jvmoptions
      option_name: JVM Options
      value: -javaagent:/opt/AppDynamics/appagent/javaagent.jar

I hope this helps.

 

Warm regards,

Peter



Found something helpful? Click the Accept as Solution button to help others find answers faster.
Liked something? Click the Thumbs Up button.
sma
Builder

Re: How can I use appdynamics on aws elastic beanstalk?

Thank you Peter for your very quick answer.

 

When I execute your script then I get following error:

Command failed on instance. Return code: 1 Output: command 04perms in - FILES-TO-DEPLOY/.ebextensions/appdyn.config failed. For more detail, check /var/log/eb-activity.log using console or EB CLI.

 

What I make false?

 

Hope you have an idea what goes wrong.

 

Greetings,

Sven

Employee

Re: How can I use appdynamics on aws elastic beanstalk?

Can you share the contents of the /var/log/eb-activity.log file?

 

Thanks,

Peter



Found something helpful? Click the Accept as Solution button to help others find answers faster.
Liked something? Click the Thumbs Up button.
sma
Builder

Re: How can I use appdynamics on aws elastic beanstalk?

Thank you Peter for your very quick answer.

 

When I execute your script then I get following error:

Command failed on instance. Return code: 1 Output: command 04perms in - FILES-TO-DEPLOY/.ebextensions/appdyn.config failed. For more detail, check /var/log/eb-activity.log using console or EB CLI.

 

What I make false?

 

Hope you have an idea what goes wrong.

 

Greetings,

Sven
Highlighted
sma
Builder

Re: How can I use appdynamics on aws elastic beanstalk?

Peter,

 

my log have I attached to this message. Thank for your help.

 

Greetings,

Sven

sma
Builder

Re: How can I use appdynamics on aws elastic beanstalk?

I have a solution that works.

 

Here my solution:

 

File: Procfile
web: java -javaagent:/opt/AppDynamics/appagent/javaagent.jar -Dappdynamics.controller.hostName=myhostname -Dappdynamics.controller.port=443 -Dappdynamics.controller.ssl.enabled=true -Dappdynamics.agent.accountName=myaccountname -Dappdynamics.agent.accountAccessKey=myaccesskey -Dappdynamics.agent.applicationName=myappname -Dappdynamics.agent.tierName=my-FRONTED -Dappdynamics.agent.nodeName=mynode -jar sma-1.4.0.jar
File: .ebextensions/appdyn.config
commands: 
  01reset:
    command: "rm -rf /opt/AppDynamics/appagent"
    ignoreErrors: true
  02makedir:
    command: "mkdir -p /opt/AppDynamics/appagent"
  03makedir-tmp:
    command: "mkdir -p /tmp"
  04-load-appdynamics-java-agent: 
    command: "sudo curl -k https://myserver.com/pathtomyzipfile.zip > /tmp/appagent.zip"
  05-unzip-appdynamics-java-agent: 
    command: "sudo unzip -o /tmp/appagent.zip -d /opt/AppDynamics/appagent"
  06-Give-permissions-to-appdyn: 
    command: "sudo chmod -R a+rwx /opt/AppDynamics/appagent"
  07cleanup:
    command: "rm /tmp/appagent.zip"  

I hope that helps for another user the struggle with that.

 

Greetings,

Sven