AppD Archive

Trouble configuring AppDynamics

CommunityUser
Splunk Employee
Splunk Employee

I am using a custom startup script for my tomcat7 instance and I though I had configured the properties right.  Here's what it looks like

case "$1" in
  start)
    #
    # Start Tomcat
    #
    echo $"Starting Tomcat..."
    cd $CATALINA_HOME && \
    $DAEMON_HOME/jsvc \
        -user $TOMCAT_USER \
    -home $JAVA_HOME \
    -Dcatalina.home=$CATALINA_HOME \
    -Dcatalina.base=$CATALINA_BASE \
    -Djava.io.tmpdir=$TMP_DIR \
    -javaagent:/tmp/AppDynamics/Agent/javaagent.jar \
    -wait 10 \
    -pidfile $PID_FILE \
    -outfile $CATALINA_HOME/logs/catalina.out \
    -errfile '&1' \
    $CATALINA_OPTS \
    -cp $CLASSPATH \
    org.apache.catalina.startup.Bootstrap
    #
    # To get a verbose JVM
    #-verbose \
    # To get a debug of jsvc.
    #-debug \
    exit $?
  ;;

When I start the script up, logging continues as expected but throws the following error

[main] 29 Jul 2013 14:28:57,526 ERROR JavaAgent - Could Not Start Java Agent
com.singularity.ee.agent.appagent.kernel.spi.c: Could not initialize configuration
        at com.singularity.ee.agent.appagent.kernel.b.h(b.java:96)
        at com.singularity.ee.agent.appagent.kernel.JavaAgent.initialize(JavaAgent.java:116)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at com.singularity.ee.agent.appagent.AgentEntryPoint.premain(AgentEntryPoint.java:153)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:382)
        at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:397)
Caused by: com.singularity.ee.agent.configuration.a: Could not resolve agent-controller basic configuration
        at com.singularity.ee.agent.appagent.kernel.config.xml.e.b(e.java:150)
        at com.singularity.ee.agent.appagent.kernel.config.xml.e.<init>(e.java:103)
        at com.singularity.ee.agent.appagent.kernel.config.b.a(b.java:20)
        at com.singularity.ee.agent.appagent.kernel.b.h(b.java:91)

Any help would be appreciated

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

I am configuring in JBOSS 6.3 EAP and getting below error

17:23:18,799 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-6) MSC000001: Failed to start service jboss.deployment.unit."TAFJJEE_EAR.ear".jboss.security.jacc.ejb: org.jboss.msc.service.StartException in service jboss.deployment.unit."TAFJJEE_EAR.ear".jboss.security.jacc.ejb: Failed to start service
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1936) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_76]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_76]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_76]
Caused by: java.lang.NoClassDefFoundError: com/singularity/ee/agent/appagent/entrypoint/bciengine/FastMethodInterceptorDelegatorBoot
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java)
at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:121) [rt.jar:1.7.0_76]
at org.jboss.security.util.xml.DOMUtils.parse(DOMUtils.java:111)
at org.jboss.security.util.state.xml.StateMachineParser.parse(StateMachineParser.java:86)
at org.jboss.security.jacc.JBossPolicyConfigurationFactory.<init>(JBossPolicyConfigurationFactory.java:60)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [rt.jar:1.7.0_76]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) [rt.jar:1.7.0_76]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [rt.jar:1.7.0_76]
at java.lang.reflect.Constructor.newInstance(Constructor.java:526) [rt.jar:1.7.0_76]
at java.lang.Class.newInstance(Class.java:379) [rt.jar:1.7.0_76]
at javax.security.jacc.PolicyConfigurationFactory.getPolicyConfigurationFactory(PolicyConfigurationFactory.java:93)
at org.jboss.as.security.service.JaccService.start(JaccService.java:81)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1980) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1913) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1]
... 3 more

0 Karma

Arun_Dasetty
Super Champion

Hi ,

Thanks for writing to appsphere community forum. We see such issues when controller-host and controller-port details are not provided under <Agent_dir>/conf/controller-info.xml file, Can you please confirm whether you are using AD Pro agent to connect to controller or you are using Lite agent , the reason we asked this details as in appdynamics lite agent AppServerAgentLite/conf there won;t be controller-info.xml as the lite agent connect on to lite viewer at default viewer port 8990 and localhost, please let us know if any disconnect in our understanding.

If you are using AD Pro appserver agent, can you edit controller-info.xml under /tmp/AppDynamics/Agent/conf/conf/ directory and provide the corresponding details for the following elements ,in <Agent_dir>/conf/controller-info.xml file (say: /tmp/AppDynamics/Agent/conf/)  and let us know how it goes after saving changes in controller-info.xml and restarting tomcat server:

<controller-host>, <controller-port>. <application-name>, <tier-name>,<node-name> xml elements
refer docs: http://docs.appdynamics.com/display/PRO13S/Install+the+App+Agent+for+Java
http://docs.appdynamics.com/display/PRO13S/Apache+Tomcat+Startup+Settings

Please let us know how it goes.

Thanks,

Arun

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

I am currently using AppDynamics Lite

Thanks

0 Karma

Arun_Dasetty
Super Champion

Hi ,

Thanks for posting back, We see such issues if default agent controller hos resolver is not working  in lite agnet.
Can you please adding the following -D jvm properties in addition to -javaagent in your tomcat startup script:
-Dappdynamics.viewer.host=<host-ip-of-liteViewer running>
-Dappdynamics.viewer.port=<port-number-of Liteviewer UI>

Ex:
-Dappdynamics.viewer.host=localhost
-Dappdynamics.viewer.port=8990

If you still see the issue please send the the following logs to debug further, also let us know if you are using latest version lite agent available at http://info.appdynamics.com/AppDynamicsLiteJavaNetOLD.html :
- zipped version of conf folder under <AppServerAgentLite_install_dir>\conf
- zipped verion of logs under <AppServerAgentLite_install_dir>\logs also the logs under

LiteViewer install directory

Thanks,

Arun

0 Karma

Rahul_Kulkarni
New Member

Hi

I am using Pro Trail... I have configured Agent by not providing account name and kay becuase I am using Single Node. And as per recommendation, we dont need to provide the Account name and Key in Single Node case. But when I try to start my agent it gives following exception

[Thread-0] 08 Oct 2015 12:06:17,434 ERROR JavaAgent - Could Not Start Java Agent, Disabling !!!!!
com.singularity.ee.agent.appagent.kernel.spi.c: Could not initialize configuration
at com.singularity.ee.agent.appagent.kernel.l.start(l.java:96)
at com.singularity.ee.agent.appagent.kernel.JavaAgent.initialize(JavaAgent.java:348)
at com.singularity.ee.agent.appagent.kernel.JavaAgent.initialize(JavaAgent.java:208)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at com.singularity.ee.agent.appagent.AgentEntryPoint$1.run(AgentEntryPoint.java:244)
Caused by: com.singularity.ee.agent.configuration.a: Could not resolve agent-controller basic configuration
at com.singularity.ee.agent.appagent.kernel.config.xml.d.d(d.java:194)
at com.singularity.ee.agent.appagent.kernel.config.xml.d.<init>(d.java:148)
at com.singularity.ee.agent.appagent.kernel.config.m.a(m.java:24)
at com.singularity.ee.agent.appagent.kernel.l.start(l.java:91)

0 Karma

Arun_Dasetty
Super Champion

Hi Rahul,

Adding to Rana comments, Can you please make sure you provide values for below xml elements <agent_dir>/conf/controller-info.xml file and restart jvm that shoudl resolve the error "Could not resolve agent-controller basic configuration" for sure:

<controller-host>yourcontroller-hostname</contorller-host>

<controller-port>8090</contorller-port> <!--(default port) -->

<application-name>testapp</application-name>

<tier-name>tier1</tier-name>

<node-name>nodetest1</node-name>

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Hi Rahul,

appgent 4.1.x onwards you need to pass account access key. Please try adding that.

If you still see some issue, please share your <appagent-home>/version/controller-info.xml and startup args 

Thanks, 

Rana

0 Karma

Rahul_Kulkarni
New Member

Hi,

I am trying to configure AppDynamics for JBoss AS 7 and IBM WebSphere. I am following all the steps which are mentioned in the  https://docs.appdynamics.com/display/PRO41/JBoss+and+Wildfly+Startup+Settings.

Howerver, when I am restarting JBoss it starts successfully without any error, but agent dose not start. Please help.

And the same case with IBM WebSphere, I am following the steps given in this https://docs.appdynamics.com/display/PRO41/IBM+WebSphere+and+InfoSphere+Startup+Settings URL when I put following line in JVM argument box it started throwing exceptions. But I have given all permissions to the agent directory and followed all steps.

-Dorg.osgi.framework.bootdelegation=META-INF.services,com.singularity.*,com.ibm.*

Thanks

0 Karma

Arun_Dasetty
Super Champion

Hi Rahul,

Can you send the screenshots of -javaagent config entry we added in both servers and also attached the console logs with agnt startup errors in addition to agent logs to this post for our initial review?

0 Karma

Rahul_Kulkarni
New Member

Hi,

I have resolved the issue with JBOSS. But the steps mentioned in 4.1 documentation are not helping correctly for configuring AD agent on JBOSS AS 7 (Linix/Windows). 3.7 documentation helped me to configure successfully. But again I had to try other options.

Still struggling with WebSphere

0 Karma

Arun_Dasetty
Super Champion

Hi Rahul,

Can you send the agent logs folder archive for ibm agent node for any app server console with agent as part of server startup to debug further?

0 Karma

Rahul_Kulkarni
New Member

Hi,

According to the configuration guide (4.1), it has mentioned that SELECT_CATALOG_ROLE permission is required. But due to some securities policies, this access cant be provided. Is there any alternative solution for this permission?

Please help.

Thanks,

0 Karma

Arun_Dasetty
Super Champion

Hi Rahul,

Check if the list of tables shared by our DB agent Dev team below helps here, by granting table/view that we use:

Must-have Select privileges for Monitoring

1. V$statname 2. V$instance 3. V$parameter 4. V$active_instances 5. V$sqltext 6. V$session 7. V$sesstat 8. V$sqlstats 9. V$session_wait 10. V$sysstat 11. dba_data_files

Optional Select privileges used via the GUI 1. dba_tab_columns 2. dba_tables 3. dba_ind_columns 4. dba_indexes 5. dba_synonyms 6. dba_sequences 7. dba_users 8. dba_tables 9. dba_segments 10. dba_views 11. V$sql_plan

0 Karma

Rahul_Kulkarni
New Member

Thanks!

I will check with my DBA team if MUST-HAVE previleges are fine to provide for monitoring.

Thanks

0 Karma
Get Updates on the Splunk Community!

See just what you’ve been missing | Observability tracks at Splunk University

Looking to sharpen your observability skills so you can better understand how to collect and analyze data from ...

Weezer at .conf25? Say it ain’t so!

Hello Splunkers, The countdown to .conf25 is on-and we've just turned up the volume! We're thrilled to ...

How SC4S Makes Suricata Logs Ingestion Simple

Network security monitoring has become increasingly critical for organizations of all sizes. Splunk has ...