Elasticsearch Requirements Documentation (CentOS 5.11)

An upgrade from v5.6.7 to 6.7.5 on CentOS 5.11 results in a failure of Elasticsearch to be able to register console handlers, etc, due to JNA not being available.

As CentOS 5.11 is an old OS that is no longer maintained, I believe that this is NOT a bug with SonarQube (or Elasticsearch). However, a tweak to Requirements documentation would have saved me a lot of work!

Here is what is seen in es.log:

2018.09.03 16:50:08 WARN  es[][o.e.b.Natives] unable to load JNA native support library, native methods will be disabled.
java.lang.UnsatisfiedLinkError: /tmp/jna-3506402/jna3164103521406226752.tmp: /lib64/libc.so.6: version `GLIBC_2.7' not found (required by /tmp/jna-3506402/jna3164103521406226752.tmp)
at java.lang.ClassLoader$NativeLibrary.load(Native Method) ~[?:1.8.0_172]
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941) ~[?:1.8.0_172]
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1824) ~[?:1.8.0_172]
at java.lang.Runtime.load0(Runtime.java:809) ~[?:1.8.0_172]
at java.lang.System.load(System.java:1086) ~[?:1.8.0_172]
at com.sun.jna.Native.loadNativeDispatchLibraryFromClasspath(Native.java:947) ~[jna-4.4.0-1.jar:4.4.0 (b0)]
at com.sun.jna.Native.loadNativeDispatchLibrary(Native.java:922) ~[jna-4.4.0-1.jar:4.4.0 (b0)]
at com.sun.jna.Native.<clinit>(Native.java:190) ~[jna-4.4.0-1.jar:4.4.0 (b0)]
at java.lang.Class.forName0(Native Method) ~[?:1.8.0_172]
at java.lang.Class.forName(Class.java:264) ~[?:1.8.0_172]
at org.elasticsearch.bootstrap.Natives.<clinit>(Natives.java:45) [elasticsearch-5.6.3.jar:5.6.3]
...
2018.09.03 16:50:08 WARN  es[][o.e.b.Natives] cannot check if running as root because JNA is not available
2018.09.03 16:50:08 WARN  es[][o.e.b.Natives] cannot register console handler because JNA is not available
2018.09.03 16:50:08 WARN  es[][o.e.b.Natives] cannot getrlimit RLIMIT_NPROC because JNA is not available
2018.09.03 16:50:08 WARN  es[][o.e.b.Natives] cannot getrlimit RLIMIT_AS beacuse JNA is not available
2018.09.03 16:50:08 WARN  es[][o.e.b.Natives] cannot getrlimit RLIMIT_FSIZE because JNA is not available
2018.09.03 16:50:09 INFO  es[][o.e.n.Node] initializing ...

Observations about the Requirements page:

  • Links to Elasticsearch documentation – but this is ElasticSearch v5.5 documentation, whereas SonarQube uses ES v5.6.3
  • Does not mention the ElasticSearch dependency on glibc 2.7. For what it’s worth, I could not find anything in the Elasticsearch documentation either (which is why it would help to include it in SonarQube documentation).

Hi,

Thanks for the pointer. After checking, I see that CentOS 5 appears to have gone EOL 31 March 2017, so I’m not going to add anything specific about it. However I have updated the link to the ES docs.

Ann

Thanks for updating the docs… although I do now see that there is one additional Elasticsearch documentation link on the page (right down at the bottom) that can be tweaked from “5.5” to “5.6”. The tweak would be useful as the “5.6” variant on the Elasticsearch site links directly to Breaking changes in 5.6 which contains a couple of interesting tidbits,

CentOS 5.x is indeed EOL (per my “old OS that is no longer maintained”). As it happens. the only reason I was attempting to upgrade to SQ v6.7.5 at all was as a stepping stone to getting SQ off the old CentOS VM and onto a shiny new VM! No problem… I’ll just have to migrate the existing v5.6.7 and then upgrade once on the new VM.

However, the exercise so far did cost me several hours of wasted effort… and that’s why I thought it might help to mention CentOS 5 (glibc) somewhere so that someone else might be able to avoid the problem that I had.

Thanks for the pointer. I’ve updated that last ES docs link.

Hopefully, this thread will serve as the guide for anyone else still dealing with CentOS 5 and glibc.

Ann