AppD Archive

Jboss 7 monitoring domain mode

CommunityUser
Splunk Employee
Splunk Employee

I'm trying to run appdynamics agent in JBoss 7.2 domain mode, but I'm getting this error every time:

[Server:group01server01] 15:20:00,160 INFO [org.jboss.jaxr] (MSC service thread 1-4) JBAS014000: Started JAXR subsystem, binding JAXR connection factory into JNDI as: java:jboss/jaxr/ConnectionFactory
[Server:group01server01] 15:20:01,621 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC00001: Failed to start service jboss.txn.ArjunaRecoveryManager: org.jboss.msc.service.StartException in service jboss.txn.ArjunaRecoveryManager: Failed to start service
[Server:group01server01] at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1767) [jboss-msc-1.0.4.GA.jar:1.0.4.GA]
[Server:group01server01] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_45]
[Server:group01server01] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_45]
[Server:group01server01] at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_45]
[Server:group01server01] Caused by: java.lang.NoClassDefFoundError: com/singularity/ee/agent/appagent/entrypoint/bciengine/FastMethodInterceptorDelegator
[Server:group01server01] at com.arjuna.ats.internal.arjuna.recovery.ExpiredEntryMonitor.<init>(ExpiredEntryMonitor.java:135)
[Server:group01server01] at com.arjuna.ats.internal.arjuna.recovery.ExpiredEntryMonitor.startUp(ExpiredEntryMonitor.java:99)
[Server:group01server01] at com.arjuna.ats.internal.arjuna.recovery.RecoveryManagerImple.<init>(RecoveryManagerImple.java:108)
[Server:group01server01] at com.arjuna.ats.arjuna.recovery.RecoveryManager.<init>(RecoveryManager.java:458)
[Server:group01server01] at com.arjuna.ats.arjuna.recovery.RecoveryManager.manager(RecoveryManager.java:128)
[Server:group01server01] at com.arjuna.ats.arjuna.recovery.RecoveryManager.manager(RecoveryManager.java:109)
[Server:group01server01] at com.arjuna.ats.jbossatx.jta.RecoveryManagerService.create(RecoveryManagerService.java:54)
[Server:group01server01] at org.jboss.as.txn.service.ArjunaRecoveryManagerService.start(ArjunaRecoveryManagerService.java:113)
[Server:group01server01] at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.4.GA.jar:1.0.4.GA]
[Server:group01server01] at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.4.GA.jar:1.0.4.GA]
[Server:group01server01] ... 3 more
[Server:group01server01]
[Server:group01server01] 15:20:01,643 INFO [org.jboss.as.remoting] (MSC service thread 1-1) JBAS017100: Listening on 127.0.0.1:4447

I've also tried to add singularity-log4j.jar to server few ways:

1. adding JBOSS_MODULES_SYSTEM_PKGS argument as javaopts to concrete server in domain.xml

2. adding com.singularity as global module in domain.xml 

<subsystem xmlns="urn:jboss:domain:ee:1.1">  
  <global-modules>
  <module name="com.singularity" slot="main" />
   </global-modules>
</subsystem>

and creating jboss module with that jar

3. putting jar to ext and endorsed dir in jre

and nothing works.

Anyway, there is nothing special about my jboss version so i should be able to. 

Can you help me this it?

0 Karma
1 Solution

Arun_Dasetty
Super Champion

Hi Alex,

Apologies for delay in response, Can you please try the following steps and let us know how it goes after making suggested changes and restarting jboss domain seerver/jvm with agent configured :

============================================================

In Domain.xml:

1. Locate and edit domain.xml, usually located under $JBOSS_HOME/domain/configuration/.
2. Add the following system property, <property name="jboss.modules.system.pkgs" value="com.singularity"/> in the <system-properties> element.
<system-properties>
        <!-- IPv4 is not required, but setting this helps avoid unintended use of IPv6 -->
        <property name="java.net.preferIPv4Stack" value="true"/>
        <property name="jboss.modules.system.pkgs" value="com.singularity"/>
</system-properties>

This property tells the JBoss modules to allow the com.singularity classes in the AppDynamics Agent to be found from any class loader. This is essential to allow the Agent to run.

3. Under the server group name where you want to enable your AppDynamics agents, add the JVM options using the appropriate values for your AppD agent location, JBoss application name and tier name.
<server-group name="main-server-group" profile="full">
    <jvm name="default">
         <heap size="1303m" max-size="1303m"/>
         <permgen max-size="256m"/>
         <jvm-options>
            <option value="-javaagent:<agent_install_dir>/javaagent.jar"/>
            <option value="-Dappdynamics.agent.applicationName=JBOSS-EAP-APP"/>
            <option value="-Dappdynamics.agent.tierName=JBOSS-EAP-TIER"/>
         </jvm-options>
    </jvm>
    <socket-binding-group ref="full-sockets"/>
 </server-group>

In Host.xml:

Add the -Dappdynamics.agent.nodeName jvm option in the host.xml file (usually located under $JBOSS_HOME/domain/configuration/). This option tells the AppDynamics agent the node name to be used to connect t the AppDynamics Controller. Use the appropriate values for your node names.

For example:
<servers>
    <server name="server-one" group="main-server-group">
            <!-- Remote JPDA debugging for a specific server
            <option value="-agentlib:jdwp=transport=dt_socket,address=8787,server=y,suspend=n"/>
            -->
            <jvm name="default">
              <jvm-options>
                <option value="-agentlib:jdwp=transport=dt_socket,address=8787,server=y,suspend=n"/>
                <option value="-Dappdynamics.agent.nodeName=JBOSS-EAP-NODE-1"/>
              </jvm-options>
            </jvm>
     </server>
     <server name="server-two" group="main-server-group" auto-start="true">
            <!-- server-two avoids port conflicts by incrementing the ports in
                 the default socket-group declared in the server-group -->
            <socket-bindings port-offset="150"/>
            <jvm name="default">
              <jvm-options>
                <option value="-Dappdynamics.agent.nodeName=JBOSS-EAP-NODE-2"/>
              </jvm-options>
            </jvm>
      </server>
      <server name="server-three" group="other-server-group" auto-start="false">
            <!-- server-three avoids port conflicts by incrementing the ports in
                 the default socket-group declared in the server-group -->
            <socket-bindings port-offset="250"/>
      </server>
</servers>

===========================================================

Thanks,

Arun

View solution in original post

Arun_Dasetty
Super Champion

Hi Alex,

Apologies for delay in response, Can you please try the following steps and let us know how it goes after making suggested changes and restarting jboss domain seerver/jvm with agent configured :

============================================================

In Domain.xml:

1. Locate and edit domain.xml, usually located under $JBOSS_HOME/domain/configuration/.
2. Add the following system property, <property name="jboss.modules.system.pkgs" value="com.singularity"/> in the <system-properties> element.
<system-properties>
        <!-- IPv4 is not required, but setting this helps avoid unintended use of IPv6 -->
        <property name="java.net.preferIPv4Stack" value="true"/>
        <property name="jboss.modules.system.pkgs" value="com.singularity"/>
</system-properties>

This property tells the JBoss modules to allow the com.singularity classes in the AppDynamics Agent to be found from any class loader. This is essential to allow the Agent to run.

3. Under the server group name where you want to enable your AppDynamics agents, add the JVM options using the appropriate values for your AppD agent location, JBoss application name and tier name.
<server-group name="main-server-group" profile="full">
    <jvm name="default">
         <heap size="1303m" max-size="1303m"/>
         <permgen max-size="256m"/>
         <jvm-options>
            <option value="-javaagent:<agent_install_dir>/javaagent.jar"/>
            <option value="-Dappdynamics.agent.applicationName=JBOSS-EAP-APP"/>
            <option value="-Dappdynamics.agent.tierName=JBOSS-EAP-TIER"/>
         </jvm-options>
    </jvm>
    <socket-binding-group ref="full-sockets"/>
 </server-group>

In Host.xml:

Add the -Dappdynamics.agent.nodeName jvm option in the host.xml file (usually located under $JBOSS_HOME/domain/configuration/). This option tells the AppDynamics agent the node name to be used to connect t the AppDynamics Controller. Use the appropriate values for your node names.

For example:
<servers>
    <server name="server-one" group="main-server-group">
            <!-- Remote JPDA debugging for a specific server
            <option value="-agentlib:jdwp=transport=dt_socket,address=8787,server=y,suspend=n"/>
            -->
            <jvm name="default">
              <jvm-options>
                <option value="-agentlib:jdwp=transport=dt_socket,address=8787,server=y,suspend=n"/>
                <option value="-Dappdynamics.agent.nodeName=JBOSS-EAP-NODE-1"/>
              </jvm-options>
            </jvm>
     </server>
     <server name="server-two" group="main-server-group" auto-start="true">
            <!-- server-two avoids port conflicts by incrementing the ports in
                 the default socket-group declared in the server-group -->
            <socket-bindings port-offset="150"/>
            <jvm name="default">
              <jvm-options>
                <option value="-Dappdynamics.agent.nodeName=JBOSS-EAP-NODE-2"/>
              </jvm-options>
            </jvm>
      </server>
      <server name="server-three" group="other-server-group" auto-start="false">
            <!-- server-three avoids port conflicts by incrementing the ports in
                 the default socket-group declared in the server-group -->
            <socket-bindings port-offset="250"/>
      </server>
</servers>

===========================================================

Thanks,

Arun

CommunityUser
Splunk Employee
Splunk Employee

Hi Akumar,

Thank you, now it's working!

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 ...