Issue with Tomcat and ycrash
I want to setup a ycrash monitoring on a server that has multiple Java standalone applications, and also it has a Tomcat server.
I have been playing with different options, but none of those is helping to capture the metrics from tomcat.
If I do a ps -ef | grep tomcat, this is what I get:
tomcat 5612 1 26 01:31 ? 05:08:35 /usr/java/bin/java -Djava.util.logging.config.file=/usr/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true -Dorg.apache.catalina.connector.CoyoteAdapter.ALLOW_BACKSLASH=true
-XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps
-Dignore.endorsed.dirs= -classpath {bootstrap_jar_localtion}:{tomcat_julijar_location} -Dcatalina.base={tomcat_home} -Dcatalina.home={tomcat_home} -Djava.io.tmpdir={tomcat_home}/temp org.apache.catalina.startup.Bootstrap start
yc-agent.yaml file:
version: '1'
options:
k:
s:
j: /usr/java/
port:
address:
m3Frequency: 3m
hd: true
gcPath: /usr/tomcat/logs
processTokens:
- /usr/java/bin/java
I have tried:
Run the yc command:
yc -p tomcat -c yc-agent.yaml
yc -p 5612 -c yc-agent.yaml
If I run any of those, I got a message saying:
./yc -c yc-agent.yaml -a tomcat
Wed Oct 4 15:05:45 EDT 2023 INF yc agent version: yc_agent_2.16.1
Wed Oct 4 15:05:45 EDT 2023 INF yc script starting...
Wed Oct 4 15:05:46 EDT 2023 INF startup attendance task
Is completed: true
Resp:
status code 200
true
--------------------------------
Wed Oct 4 15:05:46 EDT 2023 INF WARNING: nothing can be done
Or
Ignored errors: osVersion err: fork/exec /usr/bin/{randomFolder}/uname: exec format error, previous err: <nil>
Running:
nohup yc -m3 -c yc-agent.yaml > /tmp/yc_agent.log 2>&1
Returns a message:
process failed, fork/exec /usr/bin/{randomFolder}/ps: exec format error
Something that I could be missing?
Edit your Comment