AppD Archive

viewer says no agent connected in Linux

CommunityUser
Splunk Employee
Splunk Employee

Hi,

I'm new to AppDynamics. I've installed AppDynamics lite and followed the below forum to configure javaagent on my Linux machine.

http://litedocs.appdynamics.com/display/ADLite/JBoss

Our application is running on Jboss and i've added javaagent.jar into run.sh.

export JAVA_OPTS="$JAVA_OPTS -javaagent:/home/AppDynamicsLite/AppDynamicsLite/AppServerAgentLite/javaagent.jar"

and restarted lite and my app server . It's still saying no agent connected.

Thanks,

YOgesh

0 Karma

Arun_Dasetty
Super Champion

Hi Yogesh,

We see such issues in the following cases:

- if you have started liteagent/jboss first and later you started liteviewer we might see such issue, we request you to start liteviwer and then start jboss(with liteagent)

- can you do browser refresh and see if that makes any difference in liteviewer ui

- physical machine on which you installed liteagent is running on machine1 and liteviwer is running on machine2 and machine1 could not ping to machine2, if this is the case, please make sure you could ping successfully machine2 from machine1 in shell prompt and then restart jboss server with liteagent in addition to -javaagent arg with following -D jvm args added -Dappdynamics.viewer.host=liteviwerhostip -Dappdynamics.viewer.port=liteviewerport

- also make sure there is no firewal rules added that blocks liteagent to connect to liteviwer port running on other machine

Let us know if that information helps.

Thanks,

Arun

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Hi Arun, 


Thanks for replying. I've installed liteviewer on the same host where my application is installed.

I did add the hostip also in run.sh of jboss and restarted app server. I did start my app server after starting liteviewer.

There are no firewall enabled.

Browser refresh also not helping me in that case.

Thanks,

YOgesh

0 Karma

Arun_Dasetty
Super Champion
Can you send lite agent logs and screenshot depicting the issue to assist
you further
0 Karma

CommunityUser
Splunk Employee
Splunk Employee

[main] 10 Dec 2013 07:45:03,598 INFO [main] AgentHandlerServlet - *****************************************************************
[main] 10 Dec 2013 07:45:03,609 INFO [main] AgentHandlerServlet - Starting ....AppDynamics Lite Viewer 2.1.1 GA Build Date 2012-08-05 21:13:55
[main] 10 Dec 2013 07:45:04,173 INFO [main] o - Read user registration. Registration complete: [true]
[main] 10 Dec 2013 07:45:04,319 INFO [main] LiteAlertManager - Initialized Data Directory [/home/AppDynamicsLite/AppDynamicsLite]
[main] 10 Dec 2013 07:45:04,329 INFO [main] LiteAlertManager - Creating alert: Default ART Alert
[main] 10 Dec 2013 07:45:04,330 INFO [main] LiteAlertManager - Creating alert: Default Errors/min. Alert
[main] 10 Dec 2013 07:45:04,330 INFO [main] LiteAlertManager - Alerts already exist or were created in the past; defaults will not be created.
[main] 10 Dec 2013 07:45:04,331 INFO [main] DirectoryResolver - Deleting directory [/home/AppDynamicsLite/AppDynamicsLite/data]

pwd
/home/AppDynamicsLite/AppDynamicsLite/AppServerAgentLite/logs

ls

retrun nothing

0 Karma

Arun_Dasetty
Super Champion

Hi Yogesh,

Unfortunately the provided information does not help. Can you please send the following to assist you faster:
- jboss startup script file in which you configured -javaagent entry (ex: run.sh, domain.sh etc)
- jboss startup command you used to start jboss server (ex: cmd&gt; <JBOSS_DIR>/bin/run.bat )
- console output while starting jboss server with liteagent (ex: send the output.log when you start as follows:
cmd&gt; <JBOSS_DIR>/bin/run.bat  >> output.log
- we understood that you have changed the LiteViewer directory name to AppDynamicsLite, can you confirm the jboss server version details?

Please keep us posted the requested information, we suspect either liteagent directory permisison issues, or wrong path, or wrong location of -javagent entry in jboss startup script here.


Thanks,
Arun

0 Karma

CommunityUser
Splunk Employee
Splunk Employee
Hi Arun, We have jboss 5.1 version running for my application. I've attached the run.sh file of my application. We do start the jboss using service jboss start option so i'm attaching the service file(jboss) and the conf file(jboss.conf) as well. home]# ps -ef |grep org.jboss.Main jboss 21991 21965 96 00:29 ? 00:02:07 /usr/java/jdk1.6.0_45/bin/java -Dprogram.name=run.sh -server -Xms3809M -Xmx3809M -XX:+DisableExplicitGC -XX:+UseConcMarkSweepGC -XX:NewSize=1269M -XX:SurvivorRatio=16 -Djava.awt.headless=true -Djava.io.tmpdir=/opt/smarts-ncm/jboss/server/vc-server/tmp -Djava.library.path=/opt/smarts-ncm/lib:/opt/smarts-ncm/lib/cst64:/opt/smarts-ncm/lib::/usr/lib:/usr/local/ssl/lib:/opt/csw/lib:/opt/csw/gcc4/lib/sparcv9:/opt/csw/bdb44/lib:/opt/smarts-ncm/db/controldb/lib:/usr/local/lib:/opt/smarts-ncm/lib/bmc:/opt/csw/lib/sparcv9:/usr/lib/sparcv9:/lib/sparcv9:/opt/csw/lib/sparcv9 -XX:HeapDumpPath=/opt/smarts-ncm/dump -XX:+HeapDumpOnOutOfMemoryError -XX:MaxPermSize=512m -Djava.net.preferIPv4Stack=true -javaagent:/home/AppDynamicsLite/AppDynamicsLite/AppServerAgentLite/javaagent.jar -Djava.endorsed.dirs=/opt/smarts-ncm/jboss/lib/endorsed -classpath /opt/smarts-ncm/jboss/bin/run.jar:/usr/java/jdk1.6.0_45/lib/tools.jar org.jboss.Main -c vc-server -b 0.0.0.0 root 22886 31512 0 00:31 pts/3 00:00:00 grep org.jboss.Main
0 Karma

Arun_Dasetty
Super Champion

Hi Yogesh,

Can you add the following line :

export JAVA_OPTS="$JAVA_OPTS -javaagent:/home/AppDynamicsLite/AppDynamicsLite/AppServerAgentLite/javaagent.jar"

before the line in run.sh

# Setup the java endorsed dirs

and stop the jboss and start using

shell> cd <jboss_dir>/bin

shell> ./run.sh start > output.log

send the output.log or the console output when you started run.sh command in shell prompt, if the issue still persists

Thanks,

Arun

0 Karma

CommunityUser
Splunk Employee
Splunk Employee
Hi Arun, When i executed via run.sh, i can see the agent getting connected but no transaction happening. But when i'm starting my service using service jboss start, nothing happening and i think it's showing the old agent. Thanks, Yogesh
0 Karma

Arun_Dasetty
Super Champion

Hi Yogesh,

Glad to hear that finally agent connected fine, From error1.png it is clear that agent regisered fine and Business transaction registerd fine as well as you noticed, Can you please confirm whether you generate load on some servlets, struts or spring or EJB transactions , please be sure that entry and auto discovery checkboxed for the corresponding request types are enabled under Configure -> transaction detection screen in liteviwer while you are making load on browser on jboss server for servlet/struts/ejb transactions.

When you say that old agent is showing up when you start jboss as service, please be sure that

once liteviwer instance can only monitor one liteagent/jvm instance.

Can you generate load on FolderServiceBean.cleanUp method and check whether load discovreed in liteviwer UI after screen refresh.

Thanks,

Arun

0 Karma

CommunityUser
Splunk Employee
Splunk Employee
No it didnot work for me. It's not showing any transaction. Thanks, Yogesh
0 Karma

Arun_Dasetty
Super Champion

Hi Yogesh,

We see disconnect here, we could clearly see Business transaction registered in attached screenshot.

Also please be sure that one liteviwer instance can only monitor one jvm (one jboss instance) if you start multiple jboss instances then the first instance started will only send data and you might feel that jvm is registered in liteviwer but load on second instance is not discovered, hope that clarifies the product behavior.

Please send the latest screenshots and agent logs if there is any disconnect.

Thanks,

Arun

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Hi Arun,

I'm running one isntances of jboss only. What i was telling is, we don't restart jboss using run.sh manually. We do have service called jboss which does the restart of jboss so that i can close the session and services will be running in background.One more thing, if i start service manually, our app doesnot come up.

So i had to start service using jboss not via run.sh manually and when i start service using jboss, i don't see any transaction happening with liteviewer and jvm.

Also is there any way i can run the adliteviewer in background otherwise i need to keep the session open to see the transaction happening on ui.

Thanks,

Yogesh

0 Karma

Arun_Dasetty
Super Champion

Hi Yogesh,

 

We understood that you had made sure that jboss instance is not running before you restart jboss as service, if this is the case, please let us know whether you see no agents connected before starting jboss service and you no agents connected message gone after starting jboss service but no load BT got discovered if this is the case, please send the agent lite logs collected when jboss service started with liteagent, we would like to see whether entry interceptors applied or not. in logs, also make sure load is applied on jboss and the corresponding entry point is enabled under configure -> transaction detction

 

regarding other query, currently we do not support starting liteviwer as service , however you create script/batch file with command and add the batch/script file in /etc/init.d or /etc/init.d/rc.local Or you can use http://upstart.ubuntu.com/ utility:

#!/bin/sh

java -jar <liteviwer_dir>/adlite-viwer.jar

 

Thanks,

Arun

0 Karma

CommunityUser
Splunk Employee
Splunk Employee
any help is much appreciated.. Thanks, Yogesh
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 ...