Ad Widget

Collapse

JMX trace witout info

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hernan
    Member
    • Sep 2016
    • 67

    #1

    JMX trace witout info

    Hello Guys, I have the following problem:

    I have a JXM agent without connection. Here you have the environment:

    ************************************
    1) Zabbix Server ------- Zabbix Proxy/ Zabbix-JAVA-Gateway ---- Zabbix Agent
    ************************************

    2) I checked on the Zabbix info the correct procedure to start a trace debug on the Java Gateway:
    .
    ************************************
    Debugging Java gateway


    Zabbix Java gateway log file is:

    /var/log/zabbix/zabbix_java_gateway.log
    If you like to increase the logging, edit the file:

    /etc/zabbix/zabbix_java_gateway_logback.xml
    and change level="info" to "debug" or even "trace" (for deep troubleshooting):

    <configuration scan="true" scanPeriod="15 seconds"> [...] <root level="info"> <appender-ref ref="FILE" /> </root> </configuration>
    *************************************
    .
    3) I added the following lines on the my xml file:
    .
    *********************
    <root level="TRACE">
    <appender-ref ref="FILE" />
    </root>
    *********************
    .
    4) After that I restarted the Java-gateway and never received any info from the zabbix agent without any error:
    .
    ************************
    2020-08-14 09:55:18.659 [Thread-0] INFO com.zabbix.gateway.JavaGateway - Zabbix Java Gateway 4.4.10 (revision 4db30afc70) has stopped
    2020-08-14 10:10:23.456 [main] INFO com.zabbix.gateway.JavaGateway - Zabbix Java Gateway 4.4.10 (revision 4db30afc70) has started
    2020-08-14 10:10:23.460 [main] DEBUG c.z.gateway.ConfigurationManager - starting to parse configuration parameters
    2020-08-14 10:10:23.461 [main] DEBUG c.z.gateway.ConfigurationManager - found pidFile configuration parameter with value'/var/run/zabbix/zabbix_java.pid'
    2020-08-14 10:10:23.461 [main] DEBUG c.z.gateway.ConfigurationManager - received pidFile configuration parameter, daemonizing
    2020-08-14 10:10:23.461 [main] DEBUG c.z.gateway.ConfigurationManager - found listenPort configuration parameter with value '10052'
    2020-08-14 10:10:23.461 [main] DEBUG c.z.gateway.ConfigurationManager - found startPollers configuration parameter withvalue '5'
    2020-08-14 10:10:23.461 [main] DEBUG c.z.gateway.ConfigurationManager - finished parsing configuration parameters
    2020-08-14 10:10:23.463 [main] INFO com.zabbix.gateway.JavaGateway - listening on 0.0.0.0/0.0.0.0:10052
    2020-08-14 10:10:23.465 [main] DEBUG com.zabbix.gateway.JavaGateway - created a thread pool of 5 pollers
    ************************
    .
    Can you help me with this issue?

    Thanks in advance.

    Regards.


  • hernan
    Member
    • Sep 2016
    • 67

    #2
    Originally posted by hernan
    Hello Guys, I have the following problem:

    I have a JXM agent without connection. Here you have the environment:

    ************************************
    1) Zabbix Server ------- Zabbix Proxy/ Zabbix-JAVA-Gateway ---- Zabbix Agent
    ************************************

    2) I checked on the Zabbix info the correct procedure to start a trace debug on the Java Gateway:
    .
    ************************************
    Debugging Java gateway


    Zabbix Java gateway log file is:

    /var/log/zabbix/zabbix_java_gateway.log
    If you like to increase the logging, edit the file:

    /etc/zabbix/zabbix_java_gateway_logback.xml
    and change level="info" to "debug" or even "trace" (for deep troubleshooting):

    <configuration scan="true" scanPeriod="15 seconds"> [...] <root level="info"> <appender-ref ref="FILE" /> </root> </configuration>
    *************************************
    .
    3) I added the following lines on the my xml file:
    .
    *********************
    <root level="TRACE">
    <appender-ref ref="FILE" />
    </root>
    *********************
    .
    4) After that I restarted the Java-gateway and never received any info from the zabbix agent without any error:
    .
    ************************
    2020-08-14 09:55:18.659 [Thread-0] INFO com.zabbix.gateway.JavaGateway - Zabbix Java Gateway 4.4.10 (revision 4db30afc70) has stopped
    2020-08-14 10:10:23.456 [main] INFO com.zabbix.gateway.JavaGateway - Zabbix Java Gateway 4.4.10 (revision 4db30afc70) has started
    2020-08-14 10:10:23.460 [main] DEBUG c.z.gateway.ConfigurationManager - starting to parse configuration parameters
    2020-08-14 10:10:23.461 [main] DEBUG c.z.gateway.ConfigurationManager - found pidFile configuration parameter with value'/var/run/zabbix/zabbix_java.pid'
    2020-08-14 10:10:23.461 [main] DEBUG c.z.gateway.ConfigurationManager - received pidFile configuration parameter, daemonizing
    2020-08-14 10:10:23.461 [main] DEBUG c.z.gateway.ConfigurationManager - found listenPort configuration parameter with value '10052'
    2020-08-14 10:10:23.461 [main] DEBUG c.z.gateway.ConfigurationManager - found startPollers configuration parameter withvalue '5'
    2020-08-14 10:10:23.461 [main] DEBUG c.z.gateway.ConfigurationManager - finished parsing configuration parameters
    2020-08-14 10:10:23.463 [main] INFO com.zabbix.gateway.JavaGateway - listening on 0.0.0.0/0.0.0.0:10052
    2020-08-14 10:10:23.465 [main] DEBUG com.zabbix.gateway.JavaGateway - created a thread pool of 5 pollers
    ************************
    .
    Can you help me with this issue?

    Thanks in advance.

    Regards.

    Hi Guys,

    1) I found the following procedure to run a manually request:
    .
    **************************************
    Join the friendly and open Zabbix community on our forums and social media platforms.


    **************************************

    2) After that I ran the command and I received the following error message:
    .
    **************************************
    [zavatec@zbxproxy01 zabbix]$ ./zabbix_get_jmx localhost 10052 192.168.2.5 12345 'jmx["java.lang:type=Threading",ThreadCount]'
    {"response":"failed","error":"No value for jmx_endpoint"}
    **************************************
    .
    3) The I checked the log file and I found the following error message:
    .
    **************************************
    2020-08-14 11:13:52.389 [pool-1-thread-1] DEBUG c.z.gateway.BinaryProtocolSpeaker - received the following data in reque
    st: {"request": "java gateway jmx","conn": "192.168.2.5","port": 12345,"keys": ["jmx["java.lang:type=Threading",Thread
    Count]"]}
    2020-08-14 11:13:52.394 [pool-1-thread-1] WARN com.zabbix.gateway.SocketProcessor - error processing request: No value
    for jmx_endpoint
    2020-08-14 11:13:52.399 [pool-1-thread-1] DEBUG com.zabbix.gateway.SocketProcessor - error caused by
    com.zabbix.gateway.ZabbixException: org.json.JSONException: No value for jmx_endpoint
    at com.zabbix.gateway.JMXItemChecker.<init>(JMXItemCh ecker.java:69) ~[zabbix-java-gateway-4.4.10.jar:na]
    at com.zabbix.gateway.SocketProcessor.run(SocketProce ssor.java:65) ~[zabbix-java-gateway-4.4.10.jar:na]
    at java.util.concurrent.ThreadPoolExecutor.runWorker( ThreadPoolExecutor.java:1149) [na:1.8.0_252]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:624) [na:1.8.0_252]
    at java.lang.Thread.run(Thread.java:748) [na:1.8.0_252]
    Caused by: org.json.JSONException: No value for jmx_endpoint
    at org.json.JSONObject.get(JSONObject.java:354) ~[android-json-4.3_r3.1.jar:na]
    at org.json.JSONObject.getString(JSONObject.java:514) ~[android-json-4.3_r3.1.jar:na]
    at com.zabbix.gateway.JMXItemChecker.<init>(JMXItemCh ecker.java:65) ~[zabbix-java-gateway-4.4.10.jar:na]
    ... 4 common frames omitted
    2020-08-14 11:13:52.400 [pool-1-thread-1] DEBUG c.z.gateway.BinaryProtocolSpeaker - sending the following data in respon
    se: {"response":"failed","error":"No value for jmx_endpoint"}
    2020-08-14 11:13:52.401 [pool-1-thread-1] DEBUG com.zabbix.gateway.SocketProcessor - finished processing incoming connec
    tion
    ****************************************
    .
    4) The telnet ip / port is working propertly:
    [zavatec@zbxproxy01 zabbix]$ telnet 192.168.2.5 12345
    Trying 192.168.2.5...
    Connected to 192.168.2.5.
    Escape character is '^]'.

    5) I have ping access to the JXM Server machine:
    .
    *****************************************
    [zavatec@zbxproxy01 zabbix]$ ping 192.168.2.5
    PING 192.168.2.5 (192.168.2.5) 56(84) bytes of data.
    64 bytes from 192.168.2.5: icmp_seq=1 ttl=63 time=0.272 ms
    64 bytes from 192.168.2.5: icmp_seq=2 ttl=63 time=0.350 ms
    64 bytes from 192.168.2.5: icmp_seq=3 ttl=63 time=0.344 ms
    64 bytes from 192.168.2.5: icmp_seq=4 ttl=63 time=0.370 ms
    *****************************************
    .
    Can you help me with this issue?

    Thanks in advance.

    Regards.



    Last edited by hernan; 19-08-2020, 12:29.

    Comment

    • hernan
      Member
      • Sep 2016
      • 67

      #3
      Hello, can you help me with this issue?

      Thanks in avance.

      Regards.

      Comment

      Working...