(11) Zabbix_java_gateway cannot start

Source: Internet
Author: User

(11) Zabbix_java_gateway cannot start

Background:

1 , Zabbix Server Setup completed

2 , JDK already source code installed

Ideas:

1 , all reference documents on the Internet

first, the basic phenomenon

1 , Symptoms: Start the service reported the following error

Approximate meaning: Exception in thread "main"

Java.lang.UnsupportedClassVersionError : Com/zabbix/gateway/javagateway: Unsupported version of Major.minor 52.0

Second, the reasonnot the same version

1 , see if the JVM and JDK versions are consistent

(1) View JVM (Java command) and JDK (Javac command) version consistent, Linux version execution

#java – version and Javac – version command to see if the version is consistent

[Email protected] zabbix_java]# java-version

Java Version "1.7.0_51"

OpenJDK Runtime Environment (rhel-2.4.5.5.el7-x86_64 u51-b31)

OpenJDK 64-bit Server VM (build 24.51-b03, Mixed mode)

[Email protected] zabbix_java]# javac-version

Javac 1.8.0_151

Third, Operation: Find the JDK path and do a soft link

1 , using the which command to determine the path of their Java and Javac commands

[email protected] zabbix_java]# which Java

/usr/bin/java

[email protected] zabbix_java]# which Javac

/usr/java/1.8.0_151/bin/javac

By viewing the file properties, Java is a symbolic link, which by default is

/etc/alternatives/java .

So just think that the linked file is the system default, change the link path should be able to solve the problem of the version is not the same, change the custom installed JDK path in Java, above which Javac found the path:

/usr/java/1.8.0_151/bin/

2 , re-make the link

Make a backup of the source file link before making the link:

# Mv/usr/bin/java/usr/bin/java.bak

Then do the link

# ln-s/usr/java/1.8.0_151/bin/java/usr/bin/java

Third, view version information

1 , Java-version

2 , Javac – version

3 , confirm that the version was successfully changed.

Note: According to the online literature, some users are javac the path needs to be re-made soft links, can be changed according to their own circumstances. I am here because different users need to use different JDK, if you want all users to use the same version, you can use the sudo update-alternatives command to set.

Four, restartZabbix_java_gatewayService

1 , restart service

2 , view ports

3 , confirm that Zabbix_java_gateway started successfully.


(11) Zabbix_java_gateway cannot start

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.