0

I tried to install sonarqube on Windows Server 2016. No problem during the installation and I even got access to the web interface. Everything is working just fine. But, I had to restart my server. Now Sonarqube refuses to start again. Here the sonar.log :

--> Wrapper Started as Console
Launching a JVM...
Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
  Copyright 1999-2006 Tanuki Software, Inc.  All Rights Reserved.

2018.05.25 15:51:26 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory C:\sonarqube\sonarqube-6.7.3\temp
2018.05.25 15:51:26 INFO  app[][o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001
2018.05.25 15:51:26 INFO  app[][o.s.a.p.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [C:\sonarqube\sonarqube-6.7.3\elasticsearch]: C:\Program Files\Java\jdk1.8.0_171\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 -Xms2048m -Xmx2048m -XX:+HeapDumpOnOutOfMemoryError -Delasticsearch -Des.path.home=C:\sonarqube\sonarqube-6.7.3\elasticsearch -cp lib/* org.elasticsearch.bootstrap.Elasticsearch -Epath.conf=C:\sonarqube\sonarqube-6.7.3\temp\conf\es
2018.05.25 15:51:26 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
2018.05.25 15:51:27 INFO  app[][o.e.p.PluginsService] no modules loaded
2018.05.25 15:51:27 INFO  app[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]

2018.05.25 15:51:31 DEBUG app[][i.netty.util.NetUtil] Failed to get SOMAXCONN from sysctl and file \proc\sys\net\core\somaxconn. Default: 200

2018.05.25 15:51:34 DEBUG app[][o.e.c.t.TransportClientNodesService] failed to connect to node [{#transport#-1}{rUfN9MfRR1yx1epNtNzu6A}{127.0.0.1}{127.0.0.1:9001}], ignoring...

2018.05.25 15:51:34 DEBUG app[][o.s.a.p.EsProcessMonitor] Connected to Elasticsearch node: [127.0.0.1:9001]
2018.05.25 15:51:36 DEBUG app[][o.e.c.t.TransportClientNodesService] failed to connect to node [{#transport#-1}{rUfN9MfRR1yx1epNtNzu6A}{127.0.0.1}{127.0.0.1:9001}], ignoring...

2018.05.25 15:51:41 DEBUG app[][o.e.t.n.Netty4Transport] connected to node [{sonarqube}{CFUKuUDmTQ2UsgzJtMo9sA}{-uBZwbFUTHyRUFcE7jQ78w}{127.0.0.1}{127.0.0.1:9001}{rack_id=sonarqube}]
2018.05.25 15:51:48 INFO  app[][o.s.a.SchedulerImpl] Process[es] is up
2018.05.25 15:51:48 INFO  app[][o.s.a.p.ProcessLauncherImpl] Launch process[[key='web', ipcIndex=2, logFilenamePrefix=web]] from [C:\sonarqube\sonarqube-6.7.3]: C:\Program Files\Java\jdk1.8.0_171\jre\bin\java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=C:\sonarqube\sonarqube-6.7.3\temp -Xmx2048m -Xms2048m -XX:+HeapDumpOnOutOfMemoryError -cp ./lib/common/*;./lib/server/*;C:\sonarqube\sonarqube-6.7.3\lib\jdbc\mssql\mssql-jdbc-6.2.2.jre8.jar org.sonar.server.app.WebServer C:\sonarqube\sonarqube-6.7.3\temp\sq-process5165540938815359073properties
2018.05.25 15:52:10 DEBUG app[][o.s.a.p.AbstractProcessMonitor] Process exited with exit value [web]: 0
2018.05.25 15:52:10 INFO  app[][o.s.a.SchedulerImpl] Process [web] is stopped
2018.05.25 15:52:10 INFO  app[][o.s.a.SchedulerImpl] Process [es] is stopped
2018.05.25 15:52:10 INFO  app[][o.s.a.SchedulerImpl] SonarQube is stopped
<-- Wrapper Stopped

the web.log :

2018.05.25 15:51:48 INFO  web[][o.s.p.ProcessEntryPoint] Starting web
2018.05.25 15:51:49 INFO  web[][o.a.t.u.n.NioSelectorPool] Using a shared selector for servlet write/read
2018.05.25 15:51:51 INFO  web[][o.e.p.PluginsService] no modules loaded
2018.05.25 15:51:51 INFO  web[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.index.reindex.ReindexPlugin]
2018.05.25 15:51:51 INFO  web[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.join.ParentJoinPlugin]
2018.05.25 15:51:51 INFO  web[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.percolator.PercolatorPlugin]
2018.05.25 15:51:51 INFO  web[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
2018.05.25 15:51:52 DEBUG web[][i.n.c.MultithreadEventLoopGroup] -Dio.netty.eventLoopThreads: 2
2018.05.25 15:51:52 DEBUG web[][i.n.u.i.PlatformDependent] Platform: Windows
2018.05.25 15:51:52 DEBUG web[][i.n.u.i.PlatformDependent0] -Dio.netty.noUnsafe: false
2018.05.25 15:51:52 DEBUG web[][i.n.u.i.PlatformDependent0] Java version: 8
2018.05.25 15:51:52 DEBUG web[][i.n.u.i.PlatformDependent0] sun.misc.Unsafe.theUnsafe: available
2018.05.25 15:51:52 DEBUG web[][i.n.u.i.PlatformDependent0] sun.misc.Unsafe.copyMemory: available
2018.05.25 15:51:52 DEBUG web[][i.n.u.i.PlatformDependent0] java.nio.Buffer.address: available
2018.05.25 15:51:52 DEBUG web[][i.n.u.i.PlatformDependent0] direct buffer constructor: available
2018.05.25 15:51:52 DEBUG web[][i.n.u.i.PlatformDependent0] java.nio.Bits.unaligned: available, true
2018.05.25 15:51:52 DEBUG web[][i.n.u.i.PlatformDependent0] jdk.internal.misc.Unsafe.allocateUninitializedArray(int): unavailable prior to Java9
2018.05.25 15:51:52 DEBUG web[][i.n.u.i.PlatformDependent0] java.nio.DirectByteBuffer.<init>(long, int): available
2018.05.25 15:51:52 DEBUG web[][i.n.u.i.PlatformDependent] sun.misc.Unsafe: available
2018.05.25 15:51:52 DEBUG web[][i.n.u.i.PlatformDependent] -Dio.netty.tmpdir: C:\sonarqube\sonarqube-6.7.3\temp (java.io.tmpdir)
2018.05.25 15:51:52 DEBUG web[][i.n.u.i.PlatformDependent] -Dio.netty.bitMode: 64 (sun.arch.data.model)
2018.05.25 15:51:52 DEBUG web[][i.n.u.i.PlatformDependent] -Dio.netty.noPreferDirect: false
2018.05.25 15:51:52 DEBUG web[][i.n.u.i.PlatformDependent] -Dio.netty.maxDirectMemory: 2075918336 bytes
2018.05.25 15:51:52 DEBUG web[][i.n.u.i.PlatformDependent] -Dio.netty.uninitializedArrayAllocationThreshold: -1
2018.05.25 15:51:52 DEBUG web[][i.n.u.i.CleanerJava6] java.nio.ByteBuffer.cleaner(): available
2018.05.25 15:51:52 DEBUG web[][i.n.c.n.NioEventLoop] -Dio.netty.noKeySetOptimization: false
2018.05.25 15:51:52 DEBUG web[][i.n.c.n.NioEventLoop] -Dio.netty.selectorAutoRebuildThreshold: 512
2018.05.25 15:51:52 DEBUG web[][i.n.u.i.PlatformDependent] org.jctools-core.MpscChunkedArrayQueue: available
2018.05.25 15:51:52 DEBUG web[][i.n.c.DefaultChannelId] -Dio.netty.processId: 5492 (auto-detected)
2018.05.25 15:51:52 DEBUG web[][i.netty.util.NetUtil] -Djava.net.preferIPv4Stack: false
2018.05.25 15:51:52 DEBUG web[][i.netty.util.NetUtil] -Djava.net.preferIPv6Addresses: false
2018.05.25 15:51:52 DEBUG web[][i.netty.util.NetUtil] Loopback interface: lo (Software Loopback Interface 1, 127.0.0.1)
2018.05.25 15:51:52 DEBUG web[][i.netty.util.NetUtil] Failed to get SOMAXCONN from sysctl and file \proc\sys\net\core\somaxconn. Default: 200
2018.05.25 15:51:52 DEBUG web[][i.n.c.DefaultChannelId] -Dio.netty.machineId: 00:15:5d:ff:fe:01:ab:03 (auto-detected)
2018.05.25 15:51:52 DEBUG web[][i.n.u.ResourceLeakDetector] -Dio.netty.leakDetection.level: simple
2018.05.25 15:51:52 DEBUG web[][i.n.u.ResourceLeakDetector] -Dio.netty.leakDetection.maxRecords: 4
2018.05.25 15:51:52 DEBUG web[][i.n.b.PooledByteBufAllocator] -Dio.netty.allocator.numHeapArenas: 2
2018.05.25 15:51:52 DEBUG web[][i.n.b.PooledByteBufAllocator] -Dio.netty.allocator.numDirectArenas: 2
2018.05.25 15:51:52 DEBUG web[][i.n.b.PooledByteBufAllocator] -Dio.netty.allocator.pageSize: 8192
2018.05.25 15:51:52 DEBUG web[][i.n.b.PooledByteBufAllocator] -Dio.netty.allocator.maxOrder: 11
2018.05.25 15:51:52 DEBUG web[][i.n.b.PooledByteBufAllocator] -Dio.netty.allocator.chunkSize: 16777216
2018.05.25 15:51:52 DEBUG web[][i.n.b.PooledByteBufAllocator] -Dio.netty.allocator.tinyCacheSize: 512
2018.05.25 15:51:52 DEBUG web[][i.n.b.PooledByteBufAllocator] -Dio.netty.allocator.smallCacheSize: 256
2018.05.25 15:51:52 DEBUG web[][i.n.b.PooledByteBufAllocator] -Dio.netty.allocator.normalCacheSize: 64
2018.05.25 15:51:52 DEBUG web[][i.n.b.PooledByteBufAllocator] -Dio.netty.allocator.maxCachedBufferCapacity: 32768
2018.05.25 15:51:52 DEBUG web[][i.n.b.PooledByteBufAllocator] -Dio.netty.allocator.cacheTrimInterval: 8192
2018.05.25 15:51:52 DEBUG web[][i.n.b.PooledByteBufAllocator] -Dio.netty.allocator.useCacheForAllThreads: true
2018.05.25 15:51:52 DEBUG web[][i.n.b.ByteBufUtil] -Dio.netty.allocator.type: pooled
2018.05.25 15:51:52 DEBUG web[][i.n.b.ByteBufUtil] -Dio.netty.threadLocalDirectBufferSize: 65536
2018.05.25 15:51:52 DEBUG web[][i.n.b.ByteBufUtil] -Dio.netty.maxThreadLocalCharBufferSize: 16384
2018.05.25 15:51:52 DEBUG web[][i.n.b.AbstractByteBuf] -Dio.netty.buffer.bytebuf.checkAccessible: true
2018.05.25 15:51:52 DEBUG web[][i.n.u.ResourceLeakDetectorFactory] Loaded default ResourceLeakDetector: io.netty.util.ResourceLeakDetector@497e6350
2018.05.25 15:51:52 DEBUG web[][i.n.util.Recycler] -Dio.netty.recycler.maxCapacityPerThread: 32768
2018.05.25 15:51:52 DEBUG web[][i.n.util.Recycler] -Dio.netty.recycler.maxSharedCapacityFactor: 2
2018.05.25 15:51:52 DEBUG web[][i.n.util.Recycler] -Dio.netty.recycler.linkCapacity: 16
2018.05.25 15:51:52 DEBUG web[][i.n.util.Recycler] -Dio.netty.recycler.ratio: 8
2018.05.25 15:51:53 INFO  web[][o.s.s.e.EsClientProvider] Connected to local Elasticsearch: [127.0.0.1:9001]
2018.05.25 15:51:53 INFO  web[][o.s.s.p.LogServerVersion] SonarQube Server / 6.7.3.38370 / baa823c2ae6ed4dd406b2ef12bc5ac6201e466f9
2018.05.25 15:51:53 INFO  web[][o.sonar.db.Database] Create JDBC data source for jdbc:sqlserver://localhost;databaseName=sonar
2018.05.25 15:52:09 ERROR web[][o.s.s.p.Platform] Web server startup failed

I've tried to change a lots of settings in .conf of sonar and wrapper without any success. Can anyone help ? I can provide more info if needed.

Thanks a lot!

a.reymann
  • 1
  • 1
  • There are other logs in that directory. Do they hold any errors? Also, IIRC Windows Java is bad about leaving files locked. You might double check that for at least your log files. – G. Ann - SonarSource Team May 25 '18 at 14:13
  • 1
    in es.log I see this 2 error : - java.lang.IllegalStateException: failed to obtain node locks - Failed to get SOMAXCONN from sysctl and file \proc\sys\net\core\somaxconn. Default: 200 – a.reymann May 25 '18 at 14:50
  • This may help: https://stackoverflow.com/questions/28932178/elasticsearch-failed-to-obtain-node-lock-is-the-following-location-writable – G. Ann - SonarSource Team May 26 '18 at 16:51

0 Answers0