Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-26005

JMX - Cannot open received JSON

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Won't fix
    • Icon: Trivial Trivial
    • None
    • 7.0.8
    • None
    • None

      Im trying to implement JMX-Monitoring with zabbix7.6
      Im using java 11.
      zabbix_java_gateway.conf

      ### Option: zabbix.listenIP
      # IP address to listen on.
      #
      # Mandatory: no
      # Default:
      LISTEN_IP="0.0.0.0"
      
      ### Option: zabbix.listenPort
      # Port to listen on.
      #
      # Mandatory: no
      # Range: 1024-32767
      # Default:
      LISTEN_PORT=10052
      
      ### Option: zabbix.pidFile
      # Name of PID file.
      # If omitted, Zabbix Java Gateway is started as a console application.
      #
      # Mandatory: no
      # Default:
      # PID_FILE=
      
      PID_FILE="/var/run/zabbix/zabbix_java_gateway.pid"
      
      ### Option: zabbix.startPollers
      # Number of worker threads to start.
      #
      # Mandatory: no
      # Range: 1-1000
      # Default:
      START_POLLERS=5
      
      ### Option: zabbix.timeout
      # How long to wait for network operations.
      #
      JAVA_OPTIONS="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9999 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.registry.ssl=false -Dcom.sun.management.jmxremote.local.only=false"
      
      
      [root@zabbix2 lib.baknew]# *tail -f /var/log/zabbix/zabbix_java_gateway.log*
      2025-02-05 10:14:10.454 [pool-2-thread-18] DEBUG c.z.gateway.BinaryProtocolSpeaker - received the following data in request: \{"request":"java gateway jmx","username":"test","password":"test","jmx_end p oint":"service:jmx:remoting-jmx://192.168.1.5:9999","keys":["jmx["java.lang:type=Memory",HeapMemoryUsage.max]"]}
      2025-02-05 10:14:10.454 [pool-2-thread-18] DEBUG com.zabbix.gateway.SocketProcessor - RMI SSL hint cache cleanup is scheduled on 1738832110290, now is: 1738746850454
      2025-02-05 10:14:10.454 [pool-2-thread-18] DEBUG com.zabbix.gateway.SocketProcessor - dispatched request to class com.zabbix.gateway.JMXItemChecker
      2025-02-05 10:14:10.454 [pool-2-thread-18] DEBUG c.z.g.ZabbixJMXConnectorFactory - connecting to JMX agent at 'service:jmx:remoting-jmx://192.168.1.5:9999'
      2025-02-05 10:14:10.454 [pool-3-thread-19] TRACE c.z.g.ZabbixJMXConnectorFactory - making a call to JMXConnectorFactory.connect('service:jmx:remoting-jmx://192.168.1.5:9999')
      2025-02-05 10:14:10.468 [pool-3-thread-19] TRACE c.z.g.ZabbixJMXConnectorFactory - call to JMXConnectorFactory.connect('service:jmx:remoting-jmx://192.168.1.5:9999') successful
      2025-02-05 10:14:10.468 [pool-2-thread-18] TRACE c.z.g.ZabbixJMXConnectorFactory - connector acquired
      2025-02-05 10:14:10.468 [pool-2-thread-18] DEBUG com.zabbix.gateway.JMXItemChecker - using RMI SSL for : false
      2025-02-05 10:14:10.468 [pool-2-thread-18] DEBUG com.zabbix.gateway.ItemChecker - getting value for item 'jmx["java.lang:type=Memory",HeapMemoryUsage.max]'
      2025-02-05 10:14:10.468 [pool-2-thread-18] DEBUG com.zabbix.gateway.JMXItemChecker - obtaining [java.lang:type=Memory] [HeapMemoryUsage] [max]
      2025-02-05 10:15:10.529 [pool-2-thread-19] DEBUG com.zabbix.gateway.SocketProcessor - starting to process incoming connection
      2025-02-05 10:15:10.530 [pool-2-thread-19] DEBUG c.z.gateway.BinaryProtocolSpeaker - reading Zabbix protocol header
      2025-02-05 10:15:10.530 [pool-2-thread-19] DEBUG c.z.gateway.BinaryProtocolSpeaker - reading 8 bytes of data length
      2025-02-05 10:15:10.530 [pool-2-thread-19] DEBUG c.z.gateway.BinaryProtocolSpeaker - reading 187 bytes of request data
      
      
      

      zabbix_server.conf

      # Mandatory: no
      # Default:
      JavaGateway=0.0.0.0
      
      ### Option: JavaGatewayPort
      # Port that Zabbix Java gateway listens on.
      #
      # Mandatory: no
      # Range: 1024-32767
      # Default:
      JavaGatewayPort=10052
      
      ### Option: StartJavaPollers
      # Number of pre-forked instances of Java pollers.
      # Mandatory: no
      # Range: 0-1000
      # Default:
      StartJavaPollers=5
      
      
      
      

      zabbix front:
      key jmx["java.lang:type=Runtime",VmName]

      JMX endpoint service:jmx:remoting-jmx://{HOST.CONN}:{HOST.PORT}

      :

        1. zabbix3.jpg
          zabbix3.jpg
          122 kB
        2. zabbix2.jpg
          zabbix2.jpg
          86 kB

            zabbix.dev Zabbix Development Team
            babii@nexus-nederlands.nl Baliya
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: