Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Issues after Elasticsearch 1.3.2 upgrade

After upgrade to ES 1.3.2 I'm facing the following issues:

1) On startup got error:

[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 attempt to upgrade 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 is: java version "1.7.0_45" OpenJDK Runtime Environment (amzn-2.4.3.2.32.amzn1-x86_64 u45-b15) OpenJDK 64-Bit Server VM (build 24.45-b08, mixed mode)

Same issue faced with ES versions 1.3.1 and 1.3.0 Surprisingly ES v1.3.2 works fine on java version "1.7.0_25"

like image 235
piyushGoyal Avatar asked Aug 27 '14 04:08

piyushGoyal


1 Answers

The issue is resolved. The issue comes when compilation happens with a different java version and at runtime a different version of java is found. When we looked at the Java -version, it was pointing at 1.7 where as java_home was pointing to 1.6. We also checked command "java which" which was pointing to 1.7. When we checked the script of elastic search, it gives precedence to "JAVA_HOME" and then looks for "java which". Installed JDK 1.7(earlier only JRE 1.7) was installed, uninstalled 1.6 using command

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

and the issue is resolved..!! :)

like image 190
piyushGoyal Avatar answered Oct 22 '22 09:10

piyushGoyal