SonarQube Wrapper stopped -> Failure -> Mac OS Big Sur - macos

SonarQube Wrapper stopped
(base) Kalidosss-MacBook-Pro:~ admin$ sh /Applications/SonarQube/bin/macosx-universal-64/sonar.sh console
Running SonarQube...
wrapper | --> Wrapper Started as Console
wrapper | Launching a JVM...
jvm 1 | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
jvm 1 | Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
jvm 1 |
jvm 1 |
jvm 1 | WrapperSimpleApp: Encountered an error running main: java.lang.IllegalStateException: SonarQube requires Java 11 to run
jvm 1 | java.lang.IllegalStateException: SonarQube requires Java 11 to run
jvm 1 | at com.google.common.base.Preconditions.checkState(Preconditions.java:508)
jvm 1 | at org.sonar.application.App.checkJavaVersion(App.java:93)
jvm 1 | at org.sonar.application.App.start(App.java:56)
jvm 1 | at org.sonar.application.App.main(App.java:97)
jvm 1 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
jvm 1 | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
jvm 1 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
jvm 1 | at java.lang.reflect.Method.invoke(Method.java:498)
jvm 1 | at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:240)
jvm 1 | at java.lang.Thread.run(Thread.java:748)
wrapper | <-- Wrapper Stopped

Related

Error running SonarQube console with brew on Mac

I am trying to run /usr/local/opt/sonarqube/bin/sonar console but getting following error:
wrapper | Launching a JVM...
jvm 1 | WrapperManager: Initializing...
jvm 1 | WrapperManager: ERROR - The version of the Wrapper which launched this JVM is "3.5.48"
jvm 1 | WrapperManager: while the version of the Wrapper jar file currently in use
jvm 1 | WrapperManager: is "3.5.49".
jvm 1 | WrapperManager:
jvm 1 | WrapperManager: ERROR - The version of the Wrapper which launched this JVM is
jvm 1 | WrapperManager: "3.5.48" while the version of the native library
jvm 1 | WrapperManager: is "3.5.49".
jvm 1 | WrapperManager:
wrapper | <-- Wrapper Stopped
Faced the same issue and it is now resolved by reinstalling sonarqube.
brew reinstall -s sonarqube

Configure Nexus 2 for https

We have installed and successfully working instance of Nexus Manager 2 with configured proxy to http://repo1.maven.org/maven2/ but starting from 15/01/2020 Central Maven repo denied access via HTTP protocol. We reconfigured nexus proxy repo to use https://repo1.maven.org/maven2/ but now we get error fetching dependency from repo:
jvm 1 | 2020-02-03 14:58:14 WARN [pool-1-thread-1] - com.sonatype.nexus.plugins.healthcheck.task.HealthCheckTask - Scheduled task (Health Check: central) failed :: Health Check Management for Repository central (started 2020-02-03T14:58:13+02:00, runtime 0:00:00.438)
jvm 1 | javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated
jvm 1 | at sun.security.ssl.SSLSessionImpl.getPeerCertificates(SSLSessionImpl.java:421) ~[na:1.7.0_80]
jvm 1 | at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:128) ~[httpclient-4.2.2.jar:4.2.2]
jvm 1 | at org.apache.http.conn.ssl.SSLSocketFactory.createLayeredSocket(SSLSocketFactory.java:628) ~[httpclient-4.2.2.jar:4.2.2]
jvm 1 | at org.apache.http.impl.conn.DefaultClientConnectionOperator.updateSecureConnection(DefaultClientConnectionOperator.java:232) ~[httpclient-4.2.2.jar:4.2.2]
jvm 1 | at org.apache.http.impl.conn.AbstractPoolEntry.layerProtocol(AbstractPoolEntry.java:279) ~[httpclient-4.2.2.jar:4.2.2]
jvm 1 | at org.apache.http.impl.conn.AbstractPooledConnAdapter.layerProtocol(AbstractPooledConnAdapter.java:146) ~[httpclient-4.2.2.jar:4.2.2]
jvm 1 | at org.apache.http.impl.client.DefaultRequestDirector.establishRoute(DefaultRequestDirector.java:837) ~[httpclient-4.2.2.jar:4.2.2]
jvm 1 | at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:644) ~[httpclient-4.2.2.jar:4.2.2]
jvm 1 | at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:479) ~[httpclient-4.2.2.jar:4.2.2]
jvm 1 | at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906) ~[httpclient-4.2.2.jar:4.2.2]
jvm 1 | at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:805) ~[httpclient-4.2.2.jar:4.2.2]
jvm 1 | at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:784) ~[httpclient-4.2.2.jar:4.2.2]
jvm 1 | at com.sonatype.nexus.plugins.healthcheck.service.impl.InsightServiceImpl.doGet(InsightServiceImpl.java:321) ~[na:na]
jvm 1 | at com.sonatype.nexus.plugins.healthcheck.service.impl.InsightServiceImpl.getNextRunDeltas(InsightServiceImpl.java:118) ~[na:na]
jvm 1 | at com.sonatype.nexus.plugins.healthcheck.task.HealthCheckTask.doDeltaCheck(HealthCheckTask.java:411) ~[na:na]
jvm 1 | at com.sonatype.nexus.plugins.healthcheck.task.HealthCheckTask.doRunSafe(HealthCheckTask.java:177) ~[na:na]
jvm 1 | at com.sonatype.nexus.plugins.healthcheck.task.HealthCheckTask.doRun(HealthCheckTask.java:132) ~[na:na]
jvm 1 | at org.sonatype.nexus.scheduling.AbstractNexusTask.call(AbstractNexusTask.java:166) ~[nexus-app-2.3.1-01.jar:2.3.1-01]
jvm 1 | at org.sonatype.scheduling.DefaultScheduledTask.call(DefaultScheduledTask.java:459) [sisu-task-scheduler-1.7.jar:na]
jvm 1 | at java.util.concurrent.FutureTask.run(FutureTask.java:262) [na:1.7.0_80]
jvm 1 | at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178) [na:1.7.0_80]
jvm 1 | at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292) [na:1.7.0_80]
jvm 1 | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_80]
jvm 1 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_80]
jvm 1 | at java.lang.Thread.run(Thread.java:745) [na:1.7.0_80]
jvm 1 | 2020-02-03 14:58:48 INFO [.jenkins-ci.org] - org.sonatype.nexus.proxy.registry.DefaultRepositoryRegistry-repo.jenkins-ci.org - Next attempt to auto-unblock the "repo.jenkins-ci.org" (id=repo.jenkins-ci.org) repository by checking its remote peer health will occur in 1 minute 20 seconds.
What could be a reason of this?
While not always needed https://issues.sonatype.org/browse/NEXUS-5524 leads me to believe you may need to trust the certificate in the https version of repo1.maven.org. See https://help.sonatype.com/display/NXRM2/Managing+Outbound+SSL+Certificates for more details. If that doesn't help, you might check if you have a firewall or something of that nature blocking this new URL (e.g. can you go to it in a web browser or make downloads from it not through NXRM).
As an aside, based around your reply to one of the comments if you are using Java 7, it's likely you're on an older version (https://help.sonatype.com/display/NXRM2/System+Requirements#SystemRequirements-Java) and upgrading may help. Sonatype recommends strongly using the latest version to avoid debugging problems with older versions that may be solved, and at minimum running a version less than a year old. In the above link, you'll note all the versions less than a year old won't boot using Java 7.

How to set sonar.path.data to different drive

I am trying to start SonarQube 7.5 and (per the online documentation) I tried to change the ElasticSearch storage path to a dedicated volume (Z:\data) by editing sonar.properties with the following lines:
# Paths to persistent data files (embedded database and search index) and temporary files.
# Can be absolute or relative to installation directory.
# Defaults are respectively <installation home>/data and <installation home>/temp
sonar.path.data=Z:\data
sonar.path.temp=Z:\temp
I'm getting the following error when I try to start.
PS C:\> &"C:\sonarqube-7.5\bin\windows-x86-64\StartSonar.bat"
wrapper | --> Wrapper Started as Console
wrapper | Launching a JVM...
jvm 1 | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
jvm 1 | Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
jvm 1 |
jvm 1 |
jvm 1 | WrapperSimpleApp: Encountered an error running main: java.io.IOException: Unable to create directory C:\sonarqube-7.5\Z:data
jvm 1 | java.io.IOException: Unable to create directory C:\sonarqube-7.5\Z:data
jvm 1 | at org.apache.commons.io.FileUtils.forceMkdir(FileUtils.java:2491)
jvm 1 | at org.sonar.application.AppFileSystem.createDirectory(AppFileSystem.java:80)
jvm 1 | at org.sonar.application.AppFileSystem.reset(AppFileSystem.java:59)
jvm 1 | at org.sonar.application.App.start(App.java:55)
jvm 1 | at org.sonar.application.App.main(App.java:78)
jvm 1 | at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
jvm 1 | at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
jvm 1 | at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
jvm 1 | at java.base/java.lang.reflect.Method.invoke(Method.java:566)
jvm 1 | at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:240)
jvm 1 | at java.base/java.lang.Thread.run(Thread.java:834)
wrapper | <-- Wrapper Stopped
Press any key to continue . . .
What is the correct way to change the sonar.path.data (and sonar.path.temp) to a dedicated volume?
EDIT:
Thanks to Simon Schrottner I am now getting an entirely different error.
--> Wrapper Started as Service
Launching a JVM...
Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
WrapperSimpleApp: Encountered an error running main: java.io.IOException:
Unable to create directory Z:\data
java.io.IOException: Unable to create directory Z:\data
at org.apache.commons.io.FileUtils.forceMkdir(FileUtils.java:2491)
at org.sonar.application.AppFileSystem.createDirectory(AppFileSystem.java:80)
at org.sonar.application.AppFileSystem.reset(AppFileSystem.java:59)
at org.sonar.application.App.start(App.java:55)
at org.sonar.application.App.main(App.java:78)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:240)
at java.base/java.lang.Thread.run(Thread.java:834)
<-- Wrapper Stopped
The rest, I think, is a permissions issue with Azure and beyond the scope of my original questions. Simon, if you'd post your suggestion as an Answer I can mark it as correct.
Per the comments, you should use a forward slash instead of back slash.
The value of your property should be:
sonar.path.data=Z:/data
It looks like you are using the wrong path delimiter.
As already mentioned in the comments - i highly suggest to use /(forward slash) instead of \(backward slash)
although windows is using normally a backward slash, this might not work with sonarqube. Java itself provides an own static field to determine/use the right separator File.separator

Unable to install sonarqube 7.1 on windows

I am facing an issue while trying to install SonarQube.
Here is the log:
E:\sonarqube-7.1 (1)\sonarqube-7.1\bin\windows-x86-64>startsonar.bat
wrapper | --> Wrapper Started as Console
wrapper | Launching a JVM...
jvm 1 | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
jvm 1 | Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
jvm 1 |
jvm 1 | 2018.05.21 13:20:36 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory E:\sonarqube-7.1 (1)\sonarqube-7.1\temp
jvm 1 | 2018.05.21 13:20:36 INFO app[][o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001
jvm 1 | 2018.05.21 13:20:36 INFO app[][o.s.a.p.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [E:\sonarqube-7.1 (1)\sonarqube-7.1\elasticsearch]: C:\Program Files (x86)\Java\jdk1.8.0_20\jre\bin\java -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+AlwaysPreTouch -server -Xss1m -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djna.nosys=true -Djdk.io.permissionsUseCanonicalPath=true -Dio.netty.noUnsafe=true -Dio.netty.noKeySetOptimization=true -Dio.netty.recycler.maxCapacityPerThread=0 -Dlog4j.shutdownHookEnabled=false -Dlog4j2.disable.jmx=true -Dlog4j.skipJansi=true -Xms512m -Xmx512m -XX:+HeapDumpOnOutOfMemoryError -Delasticsearch -Des.path.home=E:\sonarqube-7.1 (1)\sonarqube-7.1\elasticsearch -cp lib/* org.elasticsearch.bootstrap.Elasticsearch -Epath.conf=E:\sonarqube-7.1 (1)\sonarqube-7.1\temp\conf\es
jvm 1 | 2018.05.21 13:20:36 INFO app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
jvm 1 | Error: Could not create the Java Virtual Machine.
jvm 1 | Error: A fatal exception has occurred. Program will exit.
jvm 1 | Must use the serial GC in the DCEVM
jvm 1 | 2018.05.21 13:20:36 WARN app[][o.s.a.p.AbstractProcessMonitor] Process exited with exit value [es]: 1
jvm 1 | 2018.05.21 13:20:36 INFO app[][o.s.a.SchedulerImpl] Process [es] is stopped
jvm 1 | 2018.05.21 13:20:36 INFO app[][o.s.a.SchedulerImpl] SonarQube is stopped
jvm 1 | FATAL StatusLogger Interrupted before Log4j Providers could be loaded.
jvm 1 | java.lang.InterruptedException
jvm 1 | at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireInterruptibly(AbstractQueuedSynchronizer.java:1220)
jvm 1 | at java.util.concurrent.locks.ReentrantLock.lockInterruptibly(ReentrantLock.java:335)
jvm 1 | at org.apache.logging.log4j.util.ProviderUtil.lazyInit(ProviderUtil.java:121)
jvm 1 | at org.apache.logging.log4j.util.ProviderUtil.hasProviders(ProviderUtil.java:108)
jvm 1 | at org.apache.logging.log4j.LogManager.<clinit>(LogManager.java:89)
jvm 1 | at org.elasticsearch.common.logging.ESLoggerFactory.getLogger(ESLoggerFactory.java:54)
jvm 1 | at org.elasticsearch.common.logging.Loggers.getLogger(Loggers.java:105)
jvm 1 | at org.elasticsearch.common.logging.Loggers.getLogger(Loggers.java:72)
jvm 1 | at org.elasticsearch.common.component.AbstractComponent.<init>(AbstractComponent.java:37)
jvm 1 | at org.elasticsearch.plugins.PluginsService.<init>(PluginsService.java:97)
jvm 1 | at org.elasticsearch.client.transport.TransportClient.newPluginService(TransportClient.java:101)
jvm 1 | at org.elasticsearch.client.transport.TransportClient.buildTemplate(TransportClient.java:126)
jvm 1 | at org.elasticsearch.client.transport.TransportClient.<init>(TransportClient.java:254)
jvm 1 | at org.sonar.application.process.EsProcessMonitor$MinimalTransportClient.<init>(EsProcessMonitor.java:109)
jvm 1 | at org.sonar.application.process.EsProcessMonitor.buildTransportClient(EsProcessMonitor.java:175)
jvm 1 | at org.sonar.application.process.EsProcessMonitor.getTransportClient(EsProcessMonitor.java:160)
jvm 1 | at org.sonar.application.process.EsProcessMonitor.checkStatus(EsProcessMonitor.java:134)
jvm 1 | at org.sonar.application.process.EsProcessMonitor.checkOperational(EsProcessMonitor.java:93)
jvm 1 | at org.sonar.application.process.EsProcessMonitor.isOperational(EsProcessMonitor.java:78)
jvm 1 | at org.sonar.application.process.SQProcess.refreshState(SQProcess.java:161)
jvm 1 | at org.sonar.application.process.SQProcess$EventWatcher.run(SQProcess.java:220)
jvm 1 | ERROR StatusLogger Log4j2 could not find a logging implementation. Please add log4j-core to the classpath. Using SimpleLogger to log to the console...
wrapper | <-- Wrapper Stopped
I faced similar issue. I had JDK 1.8 installed, reverting it to JDK 11 fixed the issue.

Sonarqube 5.1.2 native package on RHEL6 won't start without root

I have recently installed the native RPM package of Sonarqube 5.1.2 on my RHEL 6.6 server.
I'm using 64 bit OpenJDK 1.8.0_51 and MySQL as DB.
Sonarqube starts up perfectly with root using the sonar.sh script in /bin within the installation folder (which is /opt/sonar in my case) but it doesn't work with the startup script created by the package in /etc/init.d.
Here is the log export:
Running SonarQube...
wrapper | --> Wrapper Started as Console
wrapper | Using tick timer.
wrapperp | server listening on port 32000.
wrapper | Command[0] : /etc/alternatives/java_sdk/bin/java
wrapper | Command[1] : -Djava.awt.headless=true
wrapper | Command[2] : -Xms3m
wrapper | Command[3] : -Xmx32m
wrapper | Command[4] : -Djava.library.path=./lib
wrapper | Command[5] : -classpath
wrapper | Command[6] : ../../lib/jsw/wrapper-3.2.3.jar:../../lib/sonar-application-5.1.2.jar
wrapper | Command[7] : -Dwrapper.key=sdELP0aWwf4S5hdM
wrapper | Command[8] : -Dwrapper.port=32000
wrapper | Command[9] : -Dwrapper.jvm.port.min=31000
wrapper | Command[10] : -Dwrapper.jvm.port.max=31999
wrapper | Command[11] : -Dwrapper.debug=TRUE
wrapper | Command[12] : -Dwrapper.pid=23176
wrapper | Command[13] : -Dwrapper.version=3.2.3
wrapper | Command[14] : -Dwrapper.native_library=wrapper
wrapper | Command[15] : -Dwrapper.cpu.timeout=10
wrapper | Command[16] : -Dwrapper.jvmid=1
wrapper | Command[17] : org.tanukisoftware.wrapper.WrapperSimpleApp
wrapper | Command[18] : org.sonar.application.App
wrapper | Launching a JVM...
jvm 1 | WrapperManager class initialized by thread: main Using classloader: sun.misc.Launcher$AppClassLoader#4e25154f
jvm 1 | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
jvm 1 | Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
jvm 1 |
jvm 1 | Wrapper Manager: JVM #1
jvm 1 | Running a 64-bit JVM.
jvm 1 | Wrapper Manager: Registering shutdown hook
jvm 1 | Wrapper Manager: Using wrapper
jvm 1 | Load native library. One or more attempts may fail if platform specific libraries do not exist.
jvm 1 | Loading native library failed: libwrapper-linux-x86-64.so Cause: java.lang.UnsatisfiedLinkError: no wrapper-linux-x86-64 in java.library.path
jvm 1 | Loaded native library: libwrapper.so
jvm 1 | Calling native initialization method.
jvm 1 | Inside native WrapperManager initialization method
jvm 1 | Java Version : 1.8.0_51-b16 OpenJDK 64-Bit Server VM
jvm 1 | Java VM Vendor : Oracle Corporation
jvm 1 |
jvm 1 | Startup runner thread started.
jvm 1 | Control event monitor thread started.
jvm 1 | WrapperManager.start(org.tanukisoftware.wrapper.WrapperSimpleApp#4a574795, args[]) called by thread: main
jvm 1 | Communications runner thread started.
jvm 1 | Open socket to wrapper...Wrapper-Connection
jvm 1 | Failed attempt to bind using local port 31000
jvm 1 | Opened Socket from 31001 to 32000
jvm 1 | Send a packet KEY : sdELP0aWwf4S5hdM
jvm 1 | handleSocket(Socket[addr=/127.0.0.1,port=32000,localport=31001])
wrapperp | accepted a socket from 127.0.0.1 on port 31001
wrapperp | read a packet KEY : sdELP0aWwf4S5hdM
wrapper | Got key from JVM: sdELP0aWwf4S5hdM
wrapperp | send a packet LOW_LOG_LEVEL : 1
wrapperp | send a packet PING_TIMEOUT : 0
wrapperp | send a packet PROPERTIES : (Property Values)
wrapper | Start Application.
wrapperp | send a packet START : start
jvm 1 | Received a packet LOW_LOG_LEVEL : 1
jvm 1 | Wrapper Manager: LowLogLevel from Wrapper is 1
jvm 1 | Received a packet PING_TIMEOUT : 0
jvm 1 | PingTimeout from Wrapper is 0
jvm 1 | Received a packet PROPERTIES : (Property Values)
jvm 1 | Received a packet START : start
jvm 1 | calling WrapperListener.start()
jvm 1 | Waiting for WrapperListener.start runner thread to complete.
jvm 1 | WrapperListener.start runner thread started.
jvm 1 | WrapperSimpleApp: start(args) Will wait up to 2 seconds for the main method to complete.
jvm 1 | WrapperSimpleApp: invoking main method
jvm 1 | Wrapper Manager: ShutdownHook started
jvm 1 | WrapperManager.stop(0) called by thread: Wrapper-Shutdown-Hook
jvm 1 | Send a packet STOP : 0
jvm 1 | Startup runner thread stopped.
wrapperp | read a packet STOP : 0
wrapper | JVM requested a shutdown. (0)
wrapper | wrapperStopProcess(0) called.
wrapper | Sending stop signal to JVM
wrapperp | send a packet STOP : NULL
jvm 1 | Send a packet START_PENDING : 5000
wrapperp | read a packet START_PENDING : 5000
wrapper | JVM signalled a start pending with waitHint of 5000 millis.
jvm 1 | Thread, Wrapper-Shutdown-Hook, handling the shutdown process.
jvm 1 | shutdownJVM(0) Thread:Wrapper-Shutdown-Hook
jvm 1 | Send a packet STOPPED : 0
wrapperp | read a packet STOPPED : 0
wrapper | JVM signalled that it was stopped.
jvm 1 | Closing socket.
wrapperp | socket read no code (closed?).
wrapperp | server listening on port 32001.
jvm 1 | Wrapper Manager: ShutdownHook complete
wrapper | JVM exited normally.
wrapper | Signal trapped. Details:
wrapper | signal number=17 (SIGCHLD), source="unknown"
wrapper | Received SIGCHLD, checking JVM process status.
wrapper | JVM process exited with a code of 0, leaving the wrapper exit code set to 0.
wrapper | <-- Wrapper Stopped
I know it must be something with the permissions for the "sonar" user which was also created by the install package and I already made sure that the /opt/sonar folder is owned by the sonar user but still, these logs can't tell me what is missing.
I also compared the above log with the one when I start the script with the root user and I was able to point out at least some differences.
With root, after invoking the main method, the actual java process starts properly:
.
.
jvm 1 | WrapperSimpleApp: invoking main method
jvm 1 | INFO app[o.s.p.m.JavaProcessLauncher] Launch process[search]: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.51-1.b16.el6_7.x86_64/jre/bin/java -Djava.awt.headless=true -Xmx1G -Xms256m -Xss256k -Djava.net.preferIPv4Stack=true -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+HeapDumpOnOutOfMemoryError -Djava.io.tmpdir=/opt/sonar/temp -cp ./lib/common/*:./lib/search/* org.sonar.search.SearchServer /tmp/sq-process3395120832375267732properties
With the sonar user, its not started and the JVM (or wrapper) simply initiates a shutdown:
.
.
jvm 1 | WrapperSimpleApp: invoking main method
jvm 1 | Wrapper Manager: ShutdownHook started
jvm 1 | WrapperManager.stop(0) called by thread: Wrapper-Shutdown-Hook
Unfortunately I have no idea what might be missing from the sonar user because according to the RPM package description, the startup script should work without root privileges.
Can anyone help me or point me to the right direction? I really don't want to run Sonarqube as root if it's not necessary.
Thank you for the help in advance!
Did you initialy start sonar using root account (via sonar.sh) ?
If so, did you chown -r /opt/sonar directory to sonar user ?

Resources