Problems after updating Elasticsearch 1.3.2

After upgrading to ES 1.3.2, I encountered the following problems:

1) When starting, an error appeared:

[2014-08-26 11:10:20,285][ERROR][bootstrap ] {1.3.2}: Initialization Failed ... 1) NoSuchMethodError[org.elasticsearch.discovery.zen.ZenDiscovery.(Lorg/elasticsearch/common/settings/Settings;Lorg/elasticsearch/cluster/ClusterName;Lorg/elasticsearch/threadpool/ThreadPool;Lorg/elasticsearch/transport/TransportService;Lorg/elasticsearch/cluster/ClusterService;Lorg/elasticsearch/node/settings/NodeSettingsService;Lorg/elasticsearch/cluster/node/DiscoveryNodeService;Lorg/elasticsearch/discovery/zen/ping/ZenPingService;Lorg/elasticsearch/Version;)V]2) IllegalStateException[This is a proxy used to support circular references involving constructors. The object we're proxying is not constructed yet. Please wait until after injection has completed to use this object.] 

2) when I try to update the cloud-aws plugin to version 2.3.0 (compatible with ES 1.3), I get:

 `Exception in thread "main" java.lang.UnsupportedClassVersionError: org/elasticsearch/plugins/PluginManager : Unsupported major.minor version 51.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:643) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:277) at java.net.URLClassLoader.access$000(URLClassLoader.java:73) at java.net.URLClassLoader$1.run(URLClassLoader.java:212) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:205) at java.lang.ClassLoader.loadClass(ClassLoader.java:323) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294) at java.lang.ClassLoader.loadClass(ClassLoader.java:268) Could not find the main class: org.elasticsearch.plugins.PluginManager. Program will exit.` 

Java version: java version "1.7.0_45" OpenJDK working environment (amzn-2.4.3.2.32.amzn1-x86_64 u45-b15) 64-bit server version of OpenJDK (build 24.45-b08, mixed mode)

The same problem is associated with versions ES 1.3.1 and 1.3.0. It is surprising that ES v1.3.2 works fine in the java version "1.7.0_25"

+5
source share
1 answer

The problem is resolved. The problem occurs when compilation occurs with a different version of java, and a different version of java is detected at runtime. When we looked at the Java version, it pointed to 1.7, where java_home pointed to 1.6. We also checked the "java which" command, which pointed to 1.7. When we checked the elastic search script, it gives the advantage of "JAVA_HOME" and then searches for "java which". Installed JDK 1.7 (previously only JRE 1.7), 1.6 was removed using the command

  • yum install java-1.7.0-openjdk
  • yum remove install openjdk-6-jre
  • yum remove java-1.6.0-openjdk

and the problem is solved. !! :)

+6
source

Source: https://habr.com/ru/post/1201203/


All Articles