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

Zabbix Java Gateway 4.0 beta 1 broken Java dependency on Ubuntu 18.04.1

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Fixed
    • Icon: Trivial Trivial
    • 4.2 (plan)
    • 4.0.0beta1
    • Java gateway (J)
    • None
    • Sprint 42, Sprint 43, Sprint 44, Sprint 45
    • 2

      Steps to reproduce:

      • install Ubuntu 18.04.1 with Zabbix 4.0 repo
      • install zabbix-java-gateway
      • run zabbix_java_gateway -V/--version
      • this version of Java will be installed by default as dependency:
        root@owbr:~# head -n 2 /etc/os-release 
        NAME="Ubuntu"
        VERSION="18.04.1 LTS (Bionic Beaver)"
        
        root@owbr:~# java -version
        openjdk version "1.8.0_181"
        OpenJDK Runtime Environment (build 1.8.0_181-8u181-b13-0ubuntu0.18.04.1-b13)
        OpenJDK 64-Bit Server VM (build 25.181-b13, mixed mode)
        
        root@owbr:~# apt show zabbix-java-gateway|grep Depend
        Depends: java6-runtime-headless | java7-runtime-headless | java8-runtime-headless, adduser, lsb-base
        
        root@owbr:~# apt install java8-runtime-headless
        Package java8-runtime-headless is a virtual package provided by:
          openjdk-8-jre-headless 8u181-b13-0ubuntu0.18.04.1
          openjdk-11-jre-headless 10.0.2+13-1ubuntu0.18.04.1
          default-jre-headless 2:1.10-63ubuntu1~02
        You should explicitly select one to install.
        

      Result:

      root@owbr:~# zabbix_java_gateway --version
      Error: A JNI error has occurred, please check your installation and try again
      Exception in thread "main" java.lang.UnsupportedClassVersionError: com/zabbix/gateway/JavaGateway has been compiled by a more recent version of the Java Runtime (class file version 54.0), this version of the Java Runtime only recognizes class file versions up to 52.0
      

      Expected:

      • openjdk-11-jre-headless
        zabbix   21813  0.9  5.1 2517288 52124 ?       Sl   21:14   0:00 java -server -Dlogback.configurationFile=/etc/zabbix/zabbix_java_gateway_logback.xml -classpath lib:lib/android-json-4.3_r3.1.jar:lib/logback-classic-0.9.27.jar:lib/logback-core-0.9.27.jar:lib/slf4j-api-1.6.1.jar:bin/zabbix-java-gateway-4.0.0beta1.jar -Dzabbix.pidFile=/var/run/zabbix/zabbix_java_gateway.pid -Dsun.rmi.transport.tcp.responseTimeout=3000 com.zabbix.gateway.JavaGateway
        

            dimir dimir
            edgar.akhmetshin Edgar Akhmetshin
            Team C
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: