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