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

cancel
Showing results for 
Search instead for 
Did you mean: 

Not able to install the Java Agent for Cassandra cluster setup on Linux machines

SOLVED
Highlighted

Not able to install the Java Agent for Cassandra cluster setup on Linux machines

Ihave followed all the steps mentioned in the following file :

https://docs.appdynamics.com/display/PRO43/Apache+Cassandra+Startup+Settings

 

But, after this, when I try to start my Cassandra node, it does not come up. I cannot see any error in the logs as well. Following is my cassandra.in.sh file. Please help :

 

JVM_OPTS=-javaagent:/etc/appdynamics/java/appagent/AppServerAgent-4/javaagent.jar

# The directory where Cassandra's configs live (required)

CASSANDRA_CONF=/etc/cassandra

 

CASSANDRA_HOME=/usr/share/cassandra

 

# the default location for commitlogs, sstables, and saved caches

# if not set in cassandra.yaml

cassandra_storagedir=/var/lib/cassandra

 

# The java classpath (required)

if [ -n "$CLASSPATH" ]; then

    CLASSPATH=$CLASSPATH:$CASSANDRA_CONF

else

    CLASSPATH=$CASSANDRA_CONF

fi

 

for jar in /usr/share/cassandra/lib/*.jar; do

    CLASSPATH=$CLASSPATH:$jar

done

 

for jar in /usr/share/cassandra/*.jar; do

    CLASSPATH=$CLASSPATH:$jar

done

 

CLASSPATH="$CLASSPATH:$EXTRA_CLASSPATH"

 

 

# set JVM javaagent opts to avoid warnings/errors

if [ "$JVM_VENDOR" != "OpenJDK" -o "$JVM_VERSION" \> "1.6.0" ] \

      || [ "$JVM_VERSION" = "1.6.0" -a "$JVM_PATCH_VERSION" -ge 23 ]

then

    JAVA_AGENT="$JAVA_AGENT -javaagent:$CASSANDRA_HOME/lib/jamm-0.3.0.jar"

Not able to install the Java Agent for Cassandra cluster setup on Linux machines
6 REPLIES 6
Highlighted
AppDynamics Team

Re: Not able to install the Java Agent for Cassandra cluster setup on Linux machines

Hi Mayank,

 

Could you please give the path of javaagent.jar which is under/etc/appdynamics/java/appagent/AppServerAgent-4/ver4.*.*.*  and check if it works. If issue still persists please enclose the complete agent log to debug it further.

 

For Example: JVM_OPTS=-javaagent:/etc/appdynamics/java/appagent/AppServerAgent-4/ver4.*.*.*/javaagent.jar

 

Thanks,

Atyuha



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

Re: Not able to install the Java Agent for Cassandra cluster setup on Linux machines

Hi Atyuha,

 

I tried using the following jar now as mentioned by you in the earlier reply :

 

JVM_OPTS="$JVM_OPTS -javaagent:/etc/appdynamics/java/appagent/AppServerAgent-4/ver4.3.3.4/javaagent.jar"

 

Still, it does not work. The problem is, that after making this change, the cassandra node itself is not starting. I checked for logs in the following directly, but there are no logs being generated :

/etc/appdynamics/java/appagent/AppServerAgent-4/ver4.3.3.4/logs

 

Also, I checked Cassandra logs, but cannot see anything. I think it is failing somewhere right in the start itself.

Could it be a permission issue or something ?

Following are the permission of javagaent.jar file :

 

-rw-r--r-- 1 root root  128526 Jun 29 05:14 javaagent.jar

 

Please help.

Highlighted
AppDynamics Team

Re: Not able to install the Java Agent for Cassandra cluster setup on Linux machines

Hi Mayank,

 

Could you please revert back the  change and check whether you can see logs. If yes,please share the  agent log and server log to debug the issue.

 

 

Thanks,

Atyuha



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

Re: Not able to install the Java Agent for Cassandra cluster setup on Linux machines

Hi Atyuha,

 

I tried the above suggestion as well. It did not work too.

 

I thought it might be a permissions issue, so I gave 777 to all the files in AppServerAgent-4 folder. Post this, Cassandra node is coming up fine with the AppD javaagent properly showing in the process list as well.

 

I think, it would be better if we can shed some light on the file permissions required for AppD to run in the documentation itself.

 

Thank you for the help.

 

Regards,

Mayank

Highlighted
AppDynamics Team

Re: Not able to install the Java Agent for Cassandra cluster setup on Linux machines

Hi Mayank,

 

Glad to hear that it is working now.

Please refer to the below doc for future reference

https://docs.appdynamics.com/display/PRO43/Roles+and+Permissions

 

Thanks,

Atyuha

 



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

Re: Not able to install the Java Agent for Cassandra cluster setup on Linux machines

For every node in your cluster, follow these instructions:

  • Make a directory on each machine for the OpsCenter agent (e.g. mkdir opscenteragent)
  • The setup script for OpsCenter created a file called agent.tar.gz on your first machine. Copy that file (e.g. scp) to all the machines in your cluster and put it into the new directory you just created.
  • Unzip the agent.tar.gz file
  • Next, you need to set the agent to point to the main OpsCenter machine (the one you just installed the primary OpsCenter service on) and also monitor the current machine you are on. This is done by executing the setup script in the bin subdirectory of the agent directory and passing it first the machine IP or name of where the OpsCenter main service is running followed by the local machine’s address or name: ./setup main-opscenter-machine-name-or-ip local-machine-name-or-ip
  • Start up the agent by executing the opscenter-agent script.

If You need More Information visit this Source! http://www.kpipartners.com/dse-vs-cassandra-open-source | Cassandra Tutorial