Issues after Elasticsearch 1.3.2 upgrade - amazon-web-services

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"

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..!! :)

Related

Django deployment error deango.core.exceptions.ImproperlyConfigured

Hey i have an django application which is working fine locally but its not working when it is hosted on a web showing below error
django.core.exceptions.ImproperlyConfigured: Error loading pyodbc module: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /home/site/wwwroot/antenv/lib/python3.7/site-packages/pyodbc.cpython-37m-x86_64-linux-gnu.so)
Did i miss anything at the time of hosting?
Assuming you got this issue during deployment via DevOps pipeline, you could specify an exact version of python in the UsePythonVersion (including minor version) task.
Supported python versions, you could check the software of the agent image:
https://learn.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops&tabs=yaml#software
Also, you could try the solution in the following case, by adding deadsnakes repo, installing 3.7 and symlink python to python3.7:
https://github.com/actions/virtual-environments/issues/2634#issuecomment-775808754

Jar Dependencies and jar clashes using AWS SDK 1.11.105

We are facing some problem regarding jar dependencies and jar clashes while working with AWS java SDK 1.10.105.
We are seeing that in the AWS SDK httpClient 4.5.2 version is used, while we are using 4.5.0 version in our project. It is also coming for httpcore 4.4.4 jar also. What will be the solution? We are not even sure that whether we are facing this error for the jar clashes, we think AWS SDK is independent of all external jars. Please help.
The error we are facing:
java.lang.ClassNotFoundException: org.apache.http.impl.client.HttpClients
After using same jar version of AWS SDK, now we are facing this error.We are using jodaTime 2.8.1(Same of SDK)
java.lang.NoClassDefFoundError: Could not initialize class com.amazonaws.auth.internal.AWS4SignerUtils
java.lang.NoSuchMethodError: org.joda.time.format.DateTimeFormatter.withZoneUTC()Lorg/joda/time/format/DateTimeFormatter;
Please check the dependencies:
-
com.fasterxml.jackson
jackson-modified
2.5.4
-
org.apache.commons
commons-csv
1.1
-
commons-logging
commons-logging
1.1.1
-
com.googlecode.json-simple
json-simple
1.1.1
-
log4j
log4j
1.2.16
compile
-
com.fasterxml.jackson.core
jackson-databind
2.6.6
-
com.fasterxml.jackson.core
jackson-databind
2.6.6

Jetty Version 9 throws java.lang.NoClassDefFoundError for Embedded Server

I decided to upgrade Jetty in order to add support for HTTPS connections. The build was done successfully by Maven and the code runs on Java 7 JRE.
After an upgrade from Jetty 8 (8.1.8.v20121106) to Jetty Version 9 (9.2.14.v20151106) using an embedded server code, I get the following error at the begin of the Jetty server startup.
Any hint what is causing the error at the classloader?
sh ./testit.sh
Exception in thread "main" java.lang.NoClassDefFoundError: org.eclipse.jetty.server.HttpConfiguration$Customizer
at java.lang.J9VMInternals.verifyImpl(Native Method)
at java.lang.J9VMInternals.verify(J9VMInternals.java:94)
at java.lang.J9VMInternals.prepare(J9VMInternals.java:514)
at java.lang.Class.getMethod(Class.java:1113)
at sun.launcher.LauncherHelper.getMainMethod(LauncherHelper.java:507)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:499)
Caused by: java.lang.ClassNotFoundException: org.eclipse.jetty.server.HttpConfiguration$Customizer
at java.net.URLClassLoader.findClass(URLClassLoader.java:600)
at java.lang.ClassLoader.loadClassHelper(ClassLoader.java:777)
at java.lang.ClassLoader.loadClass(ClassLoader.java:750)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:326)
at java.lang.ClassLoader.loadClass(ClassLoader.java:731)
... 6 more
I've isolated the error cause. The Maven build tool added the Jetty distribution version number to the target libraries, which did not match my Java static classpath configuration. After correcting the classpath setting in the startup script, the program code started the embedded Jetty 9 server and worked just fine for my project.
#Joakim Erdfelt this is my Java version
java -version
java version "1.7.0"
Java(TM) SE Runtime Environment (build pxa6470sr9fp10-20150708_01(SR9 FP10))
IBM J9 VM (build 2.6, JRE 1.7.0 Linux amd64-64 Compressed References 20150701_255667 (JIT enabled, AOT enabled)
J9VM - R26_Java726_SR9_20150701_0050_B255667
JIT - tr.r11_20150626_95120.01
GC - R26_Java726_SR9_20150701_0050_B255667_CMPRSS
J9CL - 20150701_255667)
JCL - 20150628_01 based on Oracle jdk7u85-b15

Jetty 6 from Debain packages with Oracle Java

i try to install jetty from the Debian (wheezy) packages. But instead of default Openjdk i installed Oracle Java.
Download tar.gz. and build a deb package
(https://wiki.debian.org/Java/Sun or http://www.webstimme.de/2013/02/05/linux-java-unter-debian-wheezy-installieren-anleitung/)
$java -v
java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)
Afterwards i istalled jetty with apt-get, but it also installes the packages
openjdk-6-jre-headless openjdk-6-jre-lib
so Java is then
java -version
java version "1.6.0_27"
OpenJDK Runtime Environment (IcedTea6 1.12.6) (6b27-1.12.6-1~deb7u1)
OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)
I will give it a second try with installing the Oracle Java version 1.6.
Any Experiences with installing the jetty package repo and use an Oracle Java, will this ever works?
Edit:
It's possible with Oracle Java 6 (1.6) but not with Oracle Java 7 (1.7)
I tried to run it with Oracle Java because of potential better performance for Solr. I somebody has knowledge about the difference in perfomance with Open JDK and Oracle Java it would be nice to post it here :) Thanks
Edit:
I was wrong. It runs also with Oracle JDK 7.
Just download and extract it e.g. to /opt/Oracle_Java and put the path in the /etc/default/jetty as JAVA_HOME
JAVA_HOME="/opt/Oracle_Java"
Which jre is used by default is controlled by alternatives system. Use the command update-java-alternatives -l to list which JREs are installed and then use update-java-alternatives -sto choose which JRE to use.
I have two JDKs on my machine:
# update-java-alternatives -l
j2sdk1.6-oracle 315 /usr/lib/jvm/j2sdk1.6-oracle
jdk-7-oracle-x64 317 /usr/lib/jvm/jdk-7-oracle-x64
To use jdk-7 as my default JDK I would run update-java-alternatives -s jdk-7-oracle-x64
It is possible to run Jetty 6 from Debian or Ubuntu package repository with Oracle Java 6 and Oracle Java 7.

lein-ring plugin throws exception

I am trying to use lein-ring plugin. After having installed the plugin any attempt to issue a a lein ring command yields a
java.lang.ClassNotFoundException: javax.xml.stream.XMLInputFactory
I am using leiningen 1.7.1 and java version 1.5.
The XML streaming API wasn't included in the standard JRE until Java 6. You've got a few options:
Upgrade to Java 6+
Download the JSR173 API here
Add [javax.xml/jsr173 "1.0"] to your Leiningen dependencies