Can not start Sonarcube java.lang.UnsatisfiedLinkError:

Getting the following error when trying to install / start Sonarcube on digitalocean droplet.
→ Wrapper Started as Daemon
Launching a JVM…
WrapperManager class initialized by thread: main Using classloader: jdk.internal.loader.ClassLoaders$AppClassLoader@8bcc55f
Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.

Wrapper Manager: JVM #1
Running a 64-bit JVM.
Wrapper Manager: Registering shutdown hook
Wrapper Manager: Using wrapper
Load native library. One or more attempts may fail if platform specific libraries do not exist.
Loading native library failed: libwrapper-linux-x86-64.so Cause: java.lang.UnsatisfiedLinkError: no wrapper-linux-x86-64 in java.library.path: [./lib]
Loaded native library: libwrapper.so
Calling native initialization method.
Inside native WrapperManager initialization method
Java Version : 11.0.11+9-LTS OpenJDK 64-Bit Server VM
Java VM Vendor : Red Hat, Inc.

Control event monitor thread started.
Startup runner thread started.
WrapperManager.start(org.tanukisoftware.wrapper.WrapperSimpleApp@4b85612c, args) called by thread: main
Communications runner thread started.
Open socket to wrapper…Wrapper-Connection
Failed attempt to bind using local port 31000
Failed attempt to bind using local port 31001
Failed attempt to bind using local port 31002
Failed attempt to bind using local port 31003
Failed attempt to bind using local port 31004
Failed attempt to bind using local port 31005
Failed attempt to bind using local port 31006
Opened Socket from 31007 to 32000
Send a packet KEY : CPMvwzOZpP_8SpU1
handleSocket(Socket[addr=/127.0.0.1,port=32000,localport=31007])
Received a packet LOW_LOG_LEVEL : 1
Wrapper Manager: LowLogLevel from Wrapper is 1
Received a packet PING_TIMEOUT : 0
PingTimeout from Wrapper is 0
Received a packet PROPERTIES : (Property Values)
Received a packet START : start
calling WrapperListener.start()
Waiting for WrapperListener.start runner thread to complete.
WrapperListener.start runner thread started.
WrapperSimpleApp: start(args) Will wait up to 2 seconds for the main method to complete.
WrapperSimpleApp: invoking main method
2021.07.13 12:12:37 INFO app[o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube/temp
2021.07.13 12:12:37 INFO app[o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:32963]
2021.07.13 12:12:37 INFO app[o.s.a.ProcessLauncherImpl] Launch process[[key=‘es’, ipcIndex=1, logFilenamePrefix=es]] from [/opt/sonarqube/elasticsearch]: /opt/sonarqube/elasticsearch/bin/elasticsearch
Send a packet START_PENDING : 5000
2021.07.13 12:12:37 INFO app[o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
warning: no-jdk distributions that do not bundle a JDK are deprecated and will be removed in a future release
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
Send a packet START_PENDING : 5000
WrapperSimpleApp: start(args) end. Main Completed=false, exitCode=null
WrapperListener.start runner thread stopped.
returned from WrapperListener.start()
Send a packet STARTED :
2021.07.13 12:12:39 WARN app[o.s.a.p.AbstractManagedProcess] Process exited with exit value [es]: 137
2021.07.13 12:12:39 INFO app[o.s.a.SchedulerImpl] Process[es] is stopped
2021.07.13 12:12:39 INFO app[o.s.a.SchedulerImpl] SonarQube is stopped
Wrapper Manager: ShutdownHook started
WrapperManager.stop(0) called by thread: Wrapper-Shutdown-Hook
Send a packet STOP : 0
Received a packet STOP :
Startup runner thread stopped.
Thread, Wrapper-Shutdown-Hook, handling the shutdown process.
calling listener.stop()
WrapperSimpleApp: stop(0)
returned from listener.stop() → 0
shutdownJVM(0) Thread:Wrapper-Shutdown-Hook
Send a packet STOPPED : 0
2021.07.13 12:12:40 ERROR app[o.s.a.p.EsManagedProcess] Failed to check status
java.lang.RuntimeException: thread waiting for the response was interrupted
at org.elasticsearch.client.RestClient.extractAndWrapCause(RestClient.java:849)
at org.elasticsearch.client.RestClient.performRequest(RestClient.java:283)
at org.elasticsearch.client.RestClient.performRequest(RestClient.java:270)
at org.elasticsearch.client.RestHighLevelClient.internalPerformRequest(RestHighLevelClient.java:1654)
at org.elasticsearch.client.RestHighLevelClient.performRequest(RestHighLevelClient.java:1624)
at org.elasticsearch.client.RestHighLevelClient.performRequestAndParseEntity(RestHighLevelClient.java:1594)
at org.elasticsearch.client.ClusterClient.health(ClusterClient.java:119)
at org.sonar.application.es.EsConnectorImpl.getClusterHealthStatus(EsConnectorImpl.java:64)
at org.sonar.application.process.EsManagedProcess.checkStatus(EsManagedProcess.java:89)
at org.sonar.application.process.EsManagedProcess.checkOperational(EsManagedProcess.java:74)
at org.sonar.application.process.EsManagedProcess.isOperational(EsManagedProcess.java:59)
at org.sonar.application.process.ManagedProcessHandler.refreshState(ManagedProcessHandler.java:220)
at org.sonar.application.process.ManagedProcessHandler$EventWatcher.run(ManagedProcessHandler.java:285)
Caused by: java.lang.InterruptedException: null
at java.base/java.lang.Object.wait(Native Method)
at java.base/java.lang.Object.wait(Object.java:328)
at org.apache.http.concurrent.BasicFuture.get(BasicFuture.java:82)
at org.apache.http.impl.nio.client.FutureWrapper.get(FutureWrapper.java:70)
at org.elasticsearch.client.RestClient.performRequest(RestClient.java:279)
… 11 common frames omitted
Closing socket.
Wrapper Manager: ShutdownHook complete
Server daemon shut down
← Wrapper Stopped
tried researching for this error online and could not figure out what is wrong, apprecaite any help on this.

Thank you!!!

Hello @mohanramqps and welcome to the community :wave:

this sounds like a ES startup error. can you check the log files in $SONARQUBE_HOME/logs if there is anything interesting in there? i assume that the system does not fulfill the host requirements for ES.

here is what I have
[root@centos]# sysctl vm.max_map_count
vm.max_map_count = 524288
[root@centos]# sysctl fs.file-max
fs.file-max = 131072
[root@centos]# ulimit -n
1024
[root@centos]# ulimit -u
2961

[root@centos]# cat /etc/security/limits.d/99-sonarqube.conf
sonarqube - nofile 131072
sonarqube - nproc 8192

looks good. and is it working now or did you find anything interesting in the log files?

no still not working and I do not see any in the logs it is just repeating the same message that I gave above to start with. just this section keep repeating
→ Wrapper Started as Daemon
Launching a JVM…
WrapperManager class initialized by thread: main Using classloader: jdk.internal.loader.ClassLoaders$AppClassLoader@8bcc55f
Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.

Wrapper Manager: JVM #1
Running a 64-bit JVM.
Wrapper Manager: Registering shutdown hook
Wrapper Manager: Using wrapper
Load native library. One or more attempts may fail if platform specific libraries do not exist.
Loading native library failed: libwrapper-linux-x86-64.so Cause: java.lang.UnsatisfiedLinkError: no wrapper-linux-x86-64 in java.library.path: [./lib]
Loaded native library: libwrapper.so
Calling native initialization method.
Inside native WrapperManager initialization method
Java Version : 11.0.11+9-LTS OpenJDK 64-Bit Server VM
Java VM Vendor : Red Hat, Inc.

Control event monitor thread started.
Startup runner thread started.
WrapperManager.start(org.tanukisoftware.wrapper.WrapperSimpleApp@4b85612c, args) called by thread: main
Communications runner thread started.
Open socket to wrapper…Wrapper-Connection
Failed attempt to bind using local port 31000
Failed attempt to bind using local port 31001
Failed attempt to bind using local port 31002
Failed attempt to bind using local port 31003
Failed attempt to bind using local port 31004
Failed attempt to bind using local port 31005
Failed attempt to bind using local port 31006
Failed attempt to bind using local port 31007
Failed attempt to bind using local port 31008
Opened Socket from 31009 to 32000
Send a packet KEY : aRLTd0T_RGjOq5YJ
handleSocket(Socket[addr=/127.0.0.1,port=32000,localport=31009])
Received a packet LOW_LOG_LEVEL : 1
Wrapper Manager: LowLogLevel from Wrapper is 1
Received a packet PING_TIMEOUT : 0
PingTimeout from Wrapper is 0
Received a packet PROPERTIES : (Property Values)
Received a packet START : start
calling WrapperListener.start()
Waiting for WrapperListener.start runner thread to complete.
WrapperListener.start runner thread started.
WrapperSimpleApp: start(args) Will wait up to 2 seconds for the main method to complete.
WrapperSimpleApp: invoking main method
Send a packet START_PENDING : 5000
2021.07.13 17:14:57 INFO app[o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube/temp
2021.07.13 17:14:57 INFO app[o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:37311]
2021.07.13 17:14:58 INFO app[o.s.a.ProcessLauncherImpl] Launch process[[key=‘es’, ipcIndex=1, logFilenamePrefix=es]] from [/opt/sonarqube/elasticsearch]: /opt/sonarqube/elasticsearch/bin/elasticsearch
2021.07.13 17:14:58 INFO app[o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
Send a packet START_PENDING : 5000
WrapperSimpleApp: start(args) end. Main Completed=false, exitCode=null
WrapperListener.start runner thread stopped.
returned from WrapperListener.start()
Send a packet STARTED :
Startup runner thread stopped.
warning: no-jdk distributions that do not bundle a JDK are deprecated and will be removed in a future release
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
Received a packet PING : ping
Send a packet PING : ok
2021.07.13 17:15:00 WARN app[o.s.a.p.AbstractManagedProcess] Process exited with exit value [es]: 137
2021.07.13 17:15:00 INFO app[o.s.a.SchedulerImpl] Process[es] is stopped
2021.07.13 17:15:00 INFO app[o.s.a.SchedulerImpl] SonarQube is stopped
Wrapper Manager: ShutdownHook started
WrapperManager.stop(0) called by thread: Wrapper-Shutdown-Hook
Send a packet STOP : 0
Received a packet STOP :
Thread, Wrapper-Shutdown-Hook, handling the shutdown process.
calling listener.stop()
WrapperSimpleApp: stop(0)
returned from listener.stop() → 0
shutdownJVM(0) Thread:Wrapper-Shutdown-Hook
Send a packet STOPPED : 0
2021.07.13 17:15:02 ERROR app[o.s.a.p.EsManagedProcess] Failed to check status
java.lang.RuntimeException: thread waiting for the response was interrupted
at org.elasticsearch.client.RestClient.extractAndWrapCause(RestClient.java:849)
at org.elasticsearch.client.RestClient.performRequest(RestClient.java:283)
at org.elasticsearch.client.RestClient.performRequest(RestClient.java:270)
at org.elasticsearch.client.RestHighLevelClient.internalPerformRequest(RestHighLevelClient.java:1654)
at org.elasticsearch.client.RestHighLevelClient.performRequest(RestHighLevelClient.java:1624)
at org.elasticsearch.client.RestHighLevelClient.performRequestAndParseEntity(RestHighLevelClient.java:1594)
at org.elasticsearch.client.ClusterClient.health(ClusterClient.java:119)
at org.sonar.application.es.EsConnectorImpl.getClusterHealthStatus(EsConnectorImpl.java:64)
at org.sonar.application.process.EsManagedProcess.checkStatus(EsManagedProcess.java:89)
at org.sonar.application.process.EsManagedProcess.checkOperational(EsManagedProcess.java:74)
at org.sonar.application.process.EsManagedProcess.isOperational(EsManagedProcess.java:59)
at org.sonar.application.process.ManagedProcessHandler.refreshState(ManagedProcessHandler.java:220)
at org.sonar.application.process.ManagedProcessHandler$EventWatcher.run(ManagedProcessHandler.java:285)
Caused by: java.lang.InterruptedException: null
at java.base/java.lang.Object.wait(Native Method)
at java.base/java.lang.Object.wait(Object.java:328)
at org.apache.http.concurrent.BasicFuture.get(BasicFuture.java:82)
at org.apache.http.impl.nio.client.FutureWrapper.get(FutureWrapper.java:70)
at org.elasticsearch.client.RestClient.performRequest(RestClient.java:279)
… 11 common frames omitted
Closing socket.
Wrapper Manager: ShutdownHook complete
Server daemon shut down
← Wrapper Stopped

these are the log files of the wrapper. i was referring to the log files of sonarqube which are in $SONARQUBE_HOME/logs

though I have enabled the logs still I do not see the logs being generated for sonarqube server

so the logs folder is empty? this can not be as there should at least be a sonar.log file

here all that I see in the logs
[root@centos01 logs]# ls -lrt
total 45356
-rwxr-xr-x. 1 sonar sonar 88 Jul 2 08:31 README.txt
-rwxr-xr-x. 1 sonar sonar 23557461 Jul 14 23:59 sonar.20210714.log
-rw-r–r–. 1 sonar sonar 22628902 Jul 15 14:37 sonar.20210715.log

also in the sonar.properties I have the following

Level of logs of each process can be controlled individually with their respective properties.

When specified, they overwrite the level defined at global level.

Supported values are INFO, DEBUG and TRACE

sonar.log.level.app=INFO
sonar.log.level.web=INFO
sonar.log.level.ce=INFO
sonar.log.level.es=INFO

Path to log files. Can be absolute or relative to installation directory.

Default is /logs

sonar.path.logs=logs

Okay this is looking really wired. there should be more in there. can you post the command that you use to invoke the start script? also please validate that the sonar user is the owner of all files and folders in the sonarqube installation directory