Impossible to run Sonarqube: ERROR web[][o.s.s.a.EmbeddedTomcat] Fail to start web server

(David) #1

Hello all,

I tried to search what’s the problem when I run on Windows the batch StartSonar.bat
I’m stuck some hours, I read lot of things, but I cannot find a solution

I have this error when I start the batch StartSonar.bat:

ERROR web[][o.s.s.a.EmbeddedTomcat] Fail to start web server

Complete Log:
> 2019.05.07 11:47:45 INFO  web[][o.s.p.ProcessEntryPoint] Starting web
> 2019.05.07 11:47:45 ERROR web[][o.s.s.a.EmbeddedTomcat] Fail to start web server
> org.apache.catalina.LifecycleException: Failed to initialize component [StandardServer[-1]]
> 	at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:112)
> 	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:140)
> 	at org.apache.catalina.startup.Tomcat.start(Tomcat.java:427)
> 	at org.sonar.server.app.EmbeddedTomcat.start(EmbeddedTomcat.java:61)
> 	at org.sonar.server.app.WebServer.start(WebServer.java:51)
> 	at org.sonar.process.ProcessEntryPoint.launch(ProcessEntryPoint.java:113)
> 	at org.sonar.process.ProcessEntryPoint.launch(ProcessEntryPoint.java:100)
> 	at org.sonar.server.app.WebServer.main(WebServer.java:91)
> Caused by: javax.xml.parsers.FactoryConfigurationError: Provider for class javax.xml.parsers.SAXParserFactory cannot be created
> 	at javax.xml.parsers.FactoryFinder.findServiceProvider(Unknown Source)
> 	at javax.xml.parsers.FactoryFinder.find(Unknown Source)
> 	at javax.xml.parsers.SAXParserFactory.newInstance(Unknown Source)
> 	at org.apache.tomcat.util.digester.Digester.getFactory(Digester.java:476)
> 	at org.apache.tomcat.util.digester.Digester.getParser(Digester.java:667)
> 	at org.apache.tomcat.util.digester.Digester.getXMLReader(Digester.java:859)
> 	at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1537)
> 	at org.apache.tomcat.util.modeler.modules.MbeansDescriptorsDigesterSource.execute(MbeansDescriptorsDigesterSource.java:169)
> 	at org.apache.tomcat.util.modeler.modules.MbeansDescriptorsDigesterSource.loadDescriptors(MbeansDescriptorsDigesterSource.java:148)
> 	at org.apache.tomcat.util.modeler.Registry.load(Registry.java:587)
> 	at org.apache.tomcat.util.modeler.Registry.loadDescriptors(Registry.java:666)
> 	at org.apache.tomcat.util.modeler.Registry.findDescriptor(Registry.java:700)
> 	at org.apache.tomcat.util.modeler.Registry.findManagedBean(Registry.java:476)
> 	at org.apache.tomcat.util.modeler.Registry.registerComponent(Registry.java:619)
> 	at org.apache.catalina.util.LifecycleMBeanBase.register(LifecycleMBeanBase.java:161)
> 	at org.apache.catalina.util.LifecycleMBeanBase.initInternal(LifecycleMBeanBase.java:61)
> 	at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:829)
> 	at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:107)
> 	... 7 common frames omitted
> Caused by: java.lang.RuntimeException: Provider for class javax.xml.parsers.SAXParserFactory cannot be created
> 	... 25 common frames omitted
> Caused by: java.util.ServiceConfigurationError: javax.xml.parsers.SAXParserFactory: Provider org.apache.xerces.jaxp.SAXParserFactoryImpl not found
> 	at java.util.ServiceLoader.fail(Unknown Source)
> 	at java.util.ServiceLoader.access$300(Unknown Source)
> 	at java.util.ServiceLoader$LazyIterator.nextService(Unknown Source)
> 	at java.util.ServiceLoader$LazyIterator.next(Unknown Source)
> 	at java.util.ServiceLoader$1.next(Unknown Source)
> 	at javax.xml.parsers.FactoryFinder$1.run(Unknown Source)
> 	at java.security.AccessController.doPrivileged(Native Method)
> 	... 25 common frames omitted
> 2019.05.07 11:47:45 WARN  web[][o.s.p.ProcessEntryPoint] Fail to start web
> java.lang.RuntimeException: org.apache.catalina.LifecycleException: Failed to initialize component [StandardServer[-1]]
> 	at com.google.common.base.Throwables.propagate(Throwables.java:160)
> 	at org.sonar.server.app.EmbeddedTomcat.start(EmbeddedTomcat.java:65)
> 	at org.sonar.server.app.WebServer.start(WebServer.java:51)
> 	at org.sonar.process.ProcessEntryPoint.launch(ProcessEntryPoint.java:113)
> 	at org.sonar.process.ProcessEntryPoint.launch(ProcessEntryPoint.java:100)
> 	at org.sonar.server.app.WebServer.main(WebServer.java:91)
> Caused by: org.apache.catalina.LifecycleException: Failed to initialize component [StandardServer[-1]]
> 	at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:112)
> 	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:140)
> 	at org.apache.catalina.startup.Tomcat.start(Tomcat.java:427)
> 	at org.sonar.server.app.EmbeddedTomcat.start(EmbeddedTomcat.java:61)
> 	... 4 common frames omitted
> Caused by: javax.xml.parsers.FactoryConfigurationError: Provider for class javax.xml.parsers.SAXParserFactory cannot be created
> 	at javax.xml.parsers.FactoryFinder.findServiceProvider(Unknown Source)
> 	at javax.xml.parsers.FactoryFinder.find(Unknown Source)
> 	at javax.xml.parsers.SAXParserFactory.newInstance(Unknown Source)
> 	at org.apache.tomcat.util.digester.Digester.getFactory(Digester.java:476)
> 	at org.apache.tomcat.util.digester.Digester.getParser(Digester.java:667)
> 	at org.apache.tomcat.util.digester.Digester.getXMLReader(Digester.java:859)
> 	at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1537)
> 	at org.apache.tomcat.util.modeler.modules.MbeansDescriptorsDigesterSource.execute(MbeansDescriptorsDigesterSource.java:169)
> 	at org.apache.tomcat.util.modeler.modules.MbeansDescriptorsDigesterSource.loadDescriptors(MbeansDescriptorsDigesterSource.java:148)
> 	at org.apache.tomcat.util.modeler.Registry.load(Registry.java:587)
> 	at org.apache.tomcat.util.modeler.Registry.loadDescriptors(Registry.java:666)
> 	at org.apache.tomcat.util.modeler.Registry.findDescriptor(Registry.java:700)
> 	at org.apache.tomcat.util.modeler.Registry.findManagedBean(Registry.java:476)
> 	at org.apache.tomcat.util.modeler.Registry.registerComponent(Registry.java:619)
> 	at org.apache.catalina.util.LifecycleMBeanBase.register(LifecycleMBeanBase.java:161)
> 	at org.apache.catalina.util.LifecycleMBeanBase.initInternal(LifecycleMBeanBase.java:61)
> 	at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:829)
> 	at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:107)
> 	... 7 common frames omitted
> Caused by: java.lang.RuntimeException: Provider for class javax.xml.parsers.SAXParserFactory cannot be created
> 	... 25 common frames omitted
> Caused by: java.util.ServiceConfigurationError: javax.xml.parsers.SAXParserFactory: Provider org.apache.xerces.jaxp.SAXParserFactoryImpl not found
> 	at java.util.ServiceLoader.fail(Unknown Source)
> 	at java.util.ServiceLoader.access$300(Unknown Source)
> 	at java.util.ServiceLoader$LazyIterator.nextService(Unknown Source)
> 	at java.util.ServiceLoader$LazyIterator.next(Unknown Source)
> 	at java.util.ServiceLoader$1.next(Unknown Source)
> 	at javax.xml.parsers.FactoryFinder$1.run(Unknown Source)
> 	at java.security.AccessController.doPrivileged(Native Method)
> 	... 25 common frames omitted

I have a headache
Thanks for your help

David

(David) #2

I put TRACE log, I see: org.elasticsearch.transport.ConnectTransportException: [[::1]:9001] connect_exception

I’m on windows, I don’t know how correct this, I change port of sonarqube, I change port of elasticsearch, I try a lot of things and I don’t have any solution.
Thanks for your help

2019.05.08 11:55:47 TRACE es[][o.e.d.z.UnicastZenPing] resolved host [127.0.0.1] to [127.0.0.1:9001]
2019.05.08 11:55:47 TRACE es[][o.e.d.z.UnicastZenPing] resolved host [[::1]] to [[::1]:9001]
2019.05.08 11:55:47 TRACE es[][o.e.d.z.UnicastZenPing] [1] opening connection to [{[::1]:9001}{v1lpt4YgQKat0EioyEikLQ}{0:0:0:0:0:0:0:1}{[::1]:9001}]
2019.05.08 11:55:47 TRACE es[][o.e.d.z.UnicastZenPing] [1] sending to {sonarqube}{XEc5Ud_MTCK2ulGyZWMjHg}{ZpGuajEGQJGacECdk-EN4w}{127.0.0.1}{127.0.0.1:9001}{rack_id=sonarqube}
2019.05.08 11:55:47 TRACE es[][o.e.t.T.tracer] [1][internal:discovery/zen/unicast] sent to [{sonarqube}{XEc5Ud_MTCK2ulGyZWMjHg}{ZpGuajEGQJGacECdk-EN4w}{127.0.0.1}{127.0.0.1:9001}{rack_id=sonarqube}] (timeout: [3.7s])
2019.05.08 11:55:47 TRACE es[][o.e.t.T.tracer] [1][internal:discovery/zen/unicast] received request
2019.05.08 11:55:47 TRACE es[][o.e.t.TaskManager] register 1 [direct] [internal:discovery/zen/unicast] []
2019.05.08 11:55:47 TRACE es[][o.e.t.TaskManager] unregister task for id: 1
2019.05.08 11:55:47 TRACE es[][o.e.t.T.tracer] [1][internal:discovery/zen/unicast] sent response
2019.05.08 11:55:47 TRACE es[][o.e.t.T.tracer] [1][internal:discovery/zen/unicast] received response from [{sonarqube}{XEc5Ud_MTCK2ulGyZWMjHg}{ZpGuajEGQJGacECdk-EN4w}{127.0.0.1}{127.0.0.1:9001}{rack_id=sonarqube}]
2019.05.08 11:55:47 TRACE es[][o.e.d.z.UnicastZenPing] [1] received response from {sonarqube}{XEc5Ud_MTCK2ulGyZWMjHg}{ZpGuajEGQJGacECdk-EN4w}{127.0.0.1}{127.0.0.1:9001}{rack_id=sonarqube}: [ping_response{node [{sonarqube}{XEc5Ud_MTCK2ulGyZWMjHg}{ZpGuajEGQJGacECdk-EN4w}{127.0.0.1}{127.0.0.1:9001}{rack_id=sonarqube}], id[1], master [null],cluster_state_version [-1], cluster_name[sonarqube]}, ping_response{node [{sonarqube}{XEc5Ud_MTCK2ulGyZWMjHg}{ZpGuajEGQJGacECdk-EN4w}{127.0.0.1}{127.0.0.1:9001}{rack_id=sonarqube}], id[2], master [null],cluster_state_version [-1], cluster_name[sonarqube]}]
2019.05.08 11:55:47 TRACE es[][o.e.t.TcpTransport] Tcp transport client channel opened: Netty4TcpChannel{localAddress=null, remoteAddress=null}
2019.05.08 11:55:47 TRACE es[][o.e.t.n.ESLoggingHandler] [id: 0x3331626b] REGISTERED
2019.05.08 11:55:47 TRACE es[][o.e.t.n.ESLoggingHandler] [id: 0x3331626b] CONNECT: /0:0:0:0:0:0:0:1:9001
2019.05.08 11:55:48 TRACE es[][o.e.d.z.UnicastZenPing] [1] sending to {sonarqube}{XEc5Ud_MTCK2ulGyZWMjHg}{ZpGuajEGQJGacECdk-EN4w}{127.0.0.1}{127.0.0.1:9001}{rack_id=sonarqube}
2019.05.08 11:55:48 TRACE es[][o.e.t.T.tracer] [2][internal:discovery/zen/unicast] sent to [{sonarqube}{XEc5Ud_MTCK2ulGyZWMjHg}{ZpGuajEGQJGacECdk-EN4w}{127.0.0.1}{127.0.0.1:9001}{rack_id=sonarqube}] (timeout: [3.7s])
2019.05.08 11:55:48 TRACE es[][o.e.t.T.tracer] [2][internal:discovery/zen/unicast] received request
2019.05.08 11:55:48 TRACE es[][o.e.t.TaskManager] register 2 [direct] [internal:discovery/zen/unicast] []
2019.05.08 11:55:48 TRACE es[][o.e.t.TaskManager] unregister task for id: 2
2019.05.08 11:55:48 TRACE es[][o.e.t.T.tracer] [2][internal:discovery/zen/unicast] sent response
2019.05.08 11:55:48 TRACE es[][o.e.t.T.tracer] [2][internal:discovery/zen/unicast] received response from [{sonarqube}{XEc5Ud_MTCK2ulGyZWMjHg}{ZpGuajEGQJGacECdk-EN4w}{127.0.0.1}{127.0.0.1:9001}{rack_id=sonarqube}]
2019.05.08 11:55:48 TRACE es[][o.e.d.z.UnicastZenPing] [1] received response from {sonarqube}{XEc5Ud_MTCK2ulGyZWMjHg}{ZpGuajEGQJGacECdk-EN4w}{127.0.0.1}{127.0.0.1:9001}{rack_id=sonarqube}: [ping_response{node [{sonarqube}{XEc5Ud_MTCK2ulGyZWMjHg}{ZpGuajEGQJGacECdk-EN4w}{127.0.0.1}{127.0.0.1:9001}{rack_id=sonarqube}], id[1], master [null],cluster_state_version [-1], cluster_name[sonarqube]}, ping_response{node [{sonarqube}{XEc5Ud_MTCK2ulGyZWMjHg}{ZpGuajEGQJGacECdk-EN4w}{127.0.0.1}{127.0.0.1:9001}{rack_id=sonarqube}], id[3], master [null],cluster_state_version [-1], cluster_name[sonarqube]}, ping_response{node [{sonarqube}{XEc5Ud_MTCK2ulGyZWMjHg}{ZpGuajEGQJGacECdk-EN4w}{127.0.0.1}{127.0.0.1:9001}{rack_id=sonarqube}], id[4], master [null],cluster_state_version [-1], cluster_name[sonarqube]}]
2019.05.08 11:55:48 TRACE es[][o.e.t.n.ESLoggingHandler] [id: 0x3331626b] CLOSE
2019.05.08 11:55:48 TRACE es[][o.e.t.n.ESLoggingHandler] [id: 0x3331626b] CLOSE
2019.05.08 11:55:48 TRACE es[][o.e.t.n.ESLoggingHandler] [id: 0x3331626b] UNREGISTERED
2019.05.08 11:55:48 TRACE es[][o.e.d.z.UnicastZenPing] [1] opening connection to [{[::1]:9001}{OWBVrq0pTDCLM_qxHouv3g}{0:0:0:0:0:0:0:1}{[::1]:9001}]
2019.05.08 11:55:48 TRACE es[][o.e.t.TcpTransport] Tcp transport client channel opened: Netty4TcpChannel{localAddress=null, remoteAddress=null}
2019.05.08 11:55:48 TRACE es[][o.e.t.n.ESLoggingHandler] [id: 0x45e27e0a] REGISTERED
2019.05.08 11:55:48 TRACE es[][o.e.t.n.ESLoggingHandler] [id: 0x45e27e0a] CONNECT: /0:0:0:0:0:0:0:1:9001
2019.05.08 11:55:48 TRACE es[][o.e.d.z.UnicastZenPing] [1] failed to ping {[::1]:9001}{v1lpt4YgQKat0EioyEikLQ}{0:0:0:0:0:0:0:1}{[::1]:9001}
org.elasticsearch.transport.ConnectTransportException: [][[::1]:9001] connect_exception
	at org.elasticsearch.transport.TcpTransport$ChannelsConnectedListener.onFailure(TcpTransport.java:1570) ~[elasticsearch-6.6.2.jar:6.6.2]
	at org.elasticsearch.action.ActionListener.lambda$toBiConsumer$2(ActionListener.java:99) ~[elasticsearch-6.6.2.jar:6.6.2]
	at org.elasticsearch.common.concurrent.CompletableContext.lambda$addListener$0(CompletableContext.java:42) ~[elasticsearch-core-6.6.2.jar:6.6.2]
	at java.util.concurrent.CompletableFuture.uniWhenComplete(Unknown Source) ~[?:1.8.0_211]
	at java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(Unknown Source) ~[?:1.8.0_211]
	at java.util.concurrent.CompletableFuture.postComplete(Unknown Source) ~[?:1.8.0_211]
	at java.util.concurrent.CompletableFuture.completeExceptionally(Unknown Source) ~[?:1.8.0_211]
	at org.elasticsearch.common.concurrent.CompletableContext.completeExceptionally(CompletableContext.java:57) ~[elasticsearch-core-6.6.2.jar:6.6.2]
	at org.elasticsearch.transport.netty4.Netty4TcpChannel.lambda$new$1(Netty4TcpChannel.java:72) ~[?:?]
	at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:511) ~[?:?]
	at io.netty.util.concurrent.DefaultPromise.notifyListeners0(DefaultPromise.java:504) ~[?:?]
	at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:483) ~[?:?]
	at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:424) ~[?:?]
	at io.netty.util.concurrent.DefaultPromise.tryFailure(DefaultPromise.java:121) ~[?:?]
	at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.fulfillConnectPromise(AbstractNioChannel.java:327) ~[?:?]
	at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:343) ~[?:?]
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:644) ~[?:?]
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysPlain(NioEventLoop.java:556) ~[?:?]
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:510) ~[?:?]
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:470) ~[?:?]
	at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:909) ~[?:?]
	at java.lang.Thread.run(Unknown Source) [?:1.8.0_211]
Caused by: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information: /0:0:0:0:0:0:0:1:9001
	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[?:?]
	at sun.nio.ch.SocketChannelImpl.finishConnect(Unknown Source) ~[?:?]
	at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:327) ~[?:?]
	at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:340) ~[?:?]
	... 6 more
Caused by: java.net.ConnectException: Connection refused: no further information
	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[?:?]
	at sun.nio.ch.SocketChannelImpl.finishConnect(Unknown Source) ~[?:?]
	at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:327) ~[?:?]
	at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:340) ~[?:?]
	... 6 more
(David) #3

Another thing, I see also this in logs:

> 2019.05.08 12:04:20 DEBUG es[][i.n.u.i.CleanerJava6] java.nio.ByteBuffer.cleaner(): unavailable
> java.security.AccessControlException: access denied ("java.lang.reflect.ReflectPermission" "suppressAccessChecks")
> 	at java.security.AccessControlContext.checkPermission(Unknown Source) ~[?:1.8.0_211]
> 	at java.security.AccessController.checkPermission(Unknown Source) ~[?:1.8.0_211]
> 	at java.lang.SecurityManager.checkPermission(Unknown Source) ~[?:1.8.0_211]
> 	at java.lang.reflect.AccessibleObject.setAccessible(Unknown Source) ~[?:1.8.0_211]
> 	at io.netty.util.internal.CleanerJava6$1.run(CleanerJava6.java:56) ~[?:?]
> 	at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_211]
> 	at io.netty.util.internal.CleanerJava6.<clinit>(CleanerJava6.java:48) ~[?:?]
> 	at io.netty.util.internal.PlatformDependent.<clinit>(PlatformDependent.java:174) ~[?:?]
> 	at io.netty.util.ConstantPool.<init>(ConstantPool.java:32) ~[?:?]
> 	at io.netty.util.AttributeKey$1.<init>(AttributeKey.java:27) ~[?:?]
> 	at io.netty.util.AttributeKey.<clinit>(AttributeKey.java:27) ~[?:?]
> 	at org.elasticsearch.transport.netty4.Netty4Transport.<clinit>(Netty4Transport.java:219) ~[?:?]
> 	at org.elasticsearch.transport.Netty4Plugin.getSettings(Netty4Plugin.java:57) ~[?:?]
> 	at org.elasticsearch.plugins.PluginsService.lambda$getPluginSettings$0(PluginsService.java:89) ~[elasticsearch-6.6.2.jar:6.6.2]
> 	at java.util.stream.ReferencePipeline$7$1.accept(Unknown Source) [?:1.8.0_211]
> 	at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Unknown Source) [?:1.8.0_211]
> 	at java.util.stream.AbstractPipeline.copyInto(Unknown Source) [?:1.8.0_211]
> 	at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source) [?:1.8.0_211]
> 	at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source) [?:1.8.0_211]
> 	at java.util.stream.AbstractPipeline.evaluate(Unknown Source) [?:1.8.0_211]
> 	at java.util.stream.ReferencePipeline.collect(Unknown Source) [?:1.8.0_211]
> 	at org.elasticsearch.plugins.PluginsService.getPluginSettings(PluginsService.java:89) [elasticsearch-6.6.2.jar:6.6.2]
> 	at org.elasticsearch.node.Node.<init>(Node.java:354) [elasticsearch-6.6.2.jar:6.6.2]
> 	at org.elasticsearch.node.Node.<init>(Node.java:265) [elasticsearch-6.6.2.jar:6.6.2]
> 	at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:212) [elasticsearch-6.6.2.jar:6.6.2]
> 	at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:212) [elasticsearch-6.6.2.jar:6.6.2]
> 	at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:333) [elasticsearch-6.6.2.jar:6.6.2]
> 	at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:159) [elasticsearch-6.6.2.jar:6.6.2]
> 	at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:150) [elasticsearch-6.6.2.jar:6.6.2]
> 	at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) [elasticsearch-6.6.2.jar:6.6.2]
> 	at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124) [elasticsearch-cli-6.6.2.jar:6.6.2]
> 	at org.elasticsearch.cli.Command.main(Command.java:90) [elasticsearch-cli-6.6.2.jar:6.6.2]
> 	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:116) [elasticsearch-6.6.2.jar:6.6.2]
> 	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:93) [elasticsearch-6.6.2.jar:6.6.2]
(G Ann Campbell) #4

Hi David,

What version of SonarQube are we talking about?

 
Ann

(David) #5

The last version 7.7 but I put an old snapshot of my server with the old version of sonarqube and it works again, I think it’s the new version of JAVA who occurs a lot of permission problem (,) I really don’t know.

(G Ann Campbell) #6

Hi again,

I should have asked the first time. What specific version of Java is running on your server?

 
Ann

(David) #7

Java 8.0.181

(Declan Burns) #8

Any updates?

Just downloaded the Community version 7.7 and am having the same issue running on Windows 10 x64 with Java 8.0.172 (build 1.8.0_172-b11)

Previous community versions i.e. 7.6 run fine.

Current web.log states similar to above

2019.05.13 16:51:00 INFO  web[][o.s.p.ProcessEntryPoint] Starting web
2019.05.13 16:51:00 ERROR web[][o.s.s.a.EmbeddedTomcat] Fail to start web server
org.apache.catalina.LifecycleException: Failed to initialize component [StandardServer[-1]]
	at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:112)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:140)
	at org.apache.catalina.startup.Tomcat.start(Tomcat.java:427)
	at org.sonar.server.app.EmbeddedTomcat.start(EmbeddedTomcat.java:61)
	at org.sonar.server.app.WebServer.start(WebServer.java:51)
	at org.sonar.process.ProcessEntryPoint.launch(ProcessEntryPoint.java:113)
	at org.sonar.process.ProcessEntryPoint.launch(ProcessEntryPoint.java:100)
	at org.sonar.server.app.WebServer.main(WebServer.java:91)
Caused by: org.apache.catalina.LifecycleException: Failed to initialize component [StandardService[Tomcat]]
	at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:112)
	at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:875)
	at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:107)
	... 7 common frames omitted
Caused by: org.apache.catalina.LifecycleException: Failed to initialize connector [Connector[HTTP/1.1-9000]]
	at org.apache.catalina.core.StandardService.initInternal(StandardService.java:559)
	at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:107)
	... 9 common frames omitted
2019.05.13 16:51:00 WARN  web[][o.s.p.ProcessEntryPoint] Fail to start web
java.lang.RuntimeException: org.apache.catalina.LifecycleException: Failed to initialize component [StandardServer[-1]]
	at com.google.common.base.Throwables.propagate(Throwables.java:160)
	at org.sonar.server.app.EmbeddedTomcat.start(EmbeddedTomcat.java:65)
	at org.sonar.server.app.WebServer.start(WebServer.java:51)
	at org.sonar.process.ProcessEntryPoint.launch(ProcessEntryPoint.java:113)
	at org.sonar.process.ProcessEntryPoint.launch(ProcessEntryPoint.java:100)
	at org.sonar.server.app.WebServer.main(WebServer.java:91)
Caused by: org.apache.catalina.LifecycleException: Failed to initialize component [StandardServer[-1]]
	at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:112)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:140)
	at org.apache.catalina.startup.Tomcat.start(Tomcat.java:427)
	at org.sonar.server.app.EmbeddedTomcat.start(EmbeddedTomcat.java:61)
	... 4 common frames omitted
Caused by: org.apache.catalina.LifecycleException: Failed to initialize component [StandardService[Tomcat]]
	at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:112)
	at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:875)
	at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:107)
	... 7 common frames omitted
Caused by: org.apache.catalina.LifecycleException: Failed to initialize connector [Connector[HTTP/1.1-9000]]
	at org.apache.catalina.core.StandardService.initInternal(StandardService.java:559)
	at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:107)
	... 9 common frames omitted
(G Ann Campbell) #9

Hi,

Stackoverflow tells me this error message is caused by the port Tomcat wants already being in use.

Can you check the 9000 range to see what ports are in use?

 
Ann

(David) #10

I resintall version 6 of sonarqube, there are error permission with version 7

(Declan Burns) #11

Nothing running or executing on 9000 range, specifically 9001 or 9092.
Rebooted, tried to run the bat file twice. Now getting the following error…
Seems to agree with @digital3d assumption of permission errors as the background tasks are failing to initialize

2019.05.14 10:07:13 INFO  web[][o.s.p.ProcessEntryPoint] Starting web
2019.05.14 10:07:14 INFO  web[][o.a.t.u.n.NioSelectorPool] Using a shared selector for servlet write/read
2019.05.14 10:07:15 INFO  web[][o.e.p.PluginsService] no modules loaded
2019.05.14 10:07:15 INFO  web[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.join.ParentJoinPlugin]
2019.05.14 10:07:15 INFO  web[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.percolator.PercolatorPlugin]
2019.05.14 10:07:15 INFO  web[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
2019.05.14 10:07:17 INFO  web[][o.s.s.e.EsClientProvider] Connected to local Elasticsearch: [127.0.0.1:9001]
2019.05.14 10:07:17 INFO  web[][o.s.s.p.LogServerVersion] SonarQube Server / 7.7.0.23042 / 1dcac8b8de36b377a1810cc8f1c4c31744e12729
2019.05.14 10:07:17 INFO  web[][o.s.s.p.d.EmbeddedDatabase] Starting embedded database on port 9092 with url jdbc:h2:tcp://127.0.0.1:9092/sonar
2019.05.14 10:07:17 INFO  web[][o.s.s.p.d.EmbeddedDatabase] Embedded database started. Data stored in: C:\Sonar\sonarqube-7.7\data
2019.05.14 10:07:17 INFO  web[][o.sonar.db.Database] Create JDBC data source for jdbc:h2:tcp://127.0.0.1:9092/sonar
2019.05.14 10:07:17 WARN  web[][o.s.db.dialect.H2] H2 database should be used for evaluation purpose only.
2019.05.14 10:07:18 INFO  web[][o.s.s.p.ServerFileSystemImpl] SonarQube home: C:\Sonar\sonarqube-7.7
2019.05.14 10:07:18 INFO  web[][o.s.s.u.SystemPasscodeImpl] System authentication by passcode is disabled
2019.05.14 10:07:18 INFO  web[][o.s.s.p.ServerPluginRepository] Deploy plugin Git / 1.8.0.1574 / aec3dc8f5228aabd218e1cd31ac6e6515a43715d
2019.05.14 10:07:18 INFO  web[][o.s.s.p.ServerPluginRepository] Deploy plugin JaCoCo / 1.0.1.143 / 65c55e41e32c114704fd597ccea91fc55becb4ec
2019.05.14 10:07:18 INFO  web[][o.s.s.p.ServerPluginRepository] Deploy plugin LDAP / 2.2.0.608 / 79dc3fa4393a29667673c70182f3016288b548b7
2019.05.14 10:07:18 INFO  web[][o.s.s.p.ServerPluginRepository] Deploy plugin SonarC# / 7.11.0.8083 / 3783082180771634d564dcf54c28a9f345852b34
2019.05.14 10:07:18 INFO  web[][o.s.s.p.ServerPluginRepository] Deploy plugin SonarCSS / 1.0.3.724 / 3ad5232345519caed38a24c70fb77e91757833bf
2019.05.14 10:07:18 INFO  web[][o.s.s.p.ServerPluginRepository] Deploy plugin SonarFlex / 2.4.0.1222 / 68d9cb3b7daccbc4869c4f2b89d09218d26a0829
2019.05.14 10:07:18 INFO  web[][o.s.s.p.ServerPluginRepository] Deploy plugin SonarGo / 1.1.0.1612 / 1809c7be6d88396c0a1b8d597b1e9e0ed8d29730
2019.05.14 10:07:18 INFO  web[][o.s.s.p.ServerPluginRepository] Deploy plugin SonarHTML / 3.1.0.1615 / 4181edb5eff5605bec82dc0aa15ecd70eaa5857f
2019.05.14 10:07:18 INFO  web[][o.s.s.p.ServerPluginRepository] Deploy plugin SonarJS / 5.1.1.7506 / 7537ba97d4de0e1dbc862ddff9fadaed8cc02127
2019.05.14 10:07:18 INFO  web[][o.s.s.p.ServerPluginRepository] Deploy plugin SonarJava / 5.11.0.17289 / af4a10d32a35370facd63e239fd8d452d981798a
2019.05.14 10:07:18 INFO  web[][o.s.s.p.ServerPluginRepository] Deploy plugin SonarKotlin / 1.5.0.315 / 4ff3a145a58f3f84f1b39846a205a129d742e993
2019.05.14 10:07:18 INFO  web[][o.s.s.p.ServerPluginRepository] Deploy plugin SonarPHP / 3.0.0.4537 / 026dee08c29a3689ab1228552e14bfefda9ae57e
2019.05.14 10:07:18 INFO  web[][o.s.s.p.ServerPluginRepository] Deploy plugin SonarPython / 1.13.0.2922 / e234b7c67bd6330f24ed876596f72068bf78e0d7
2019.05.14 10:07:18 INFO  web[][o.s.s.p.ServerPluginRepository] Deploy plugin SonarRuby / 1.5.0.315 / 4ff3a145a58f3f84f1b39846a205a129d742e993
2019.05.14 10:07:18 INFO  web[][o.s.s.p.ServerPluginRepository] Deploy plugin SonarScala / 1.5.0.315 / 4ff3a145a58f3f84f1b39846a205a129d742e993
2019.05.14 10:07:18 INFO  web[][o.s.s.p.ServerPluginRepository] Deploy plugin SonarTS / 1.9.0.3766 / 4a4080b78001a78d758d1d0fa0190fb9496b6f57
2019.05.14 10:07:18 INFO  web[][o.s.s.p.ServerPluginRepository] Deploy plugin SonarVB / 7.11.0.8083 / 3783082180771634d564dcf54c28a9f345852b34
2019.05.14 10:07:18 INFO  web[][o.s.s.p.ServerPluginRepository] Deploy plugin SonarXML / 2.0.1.2020 / c5b84004face582d56f110e24c29bf9c6a679e69
2019.05.14 10:07:18 INFO  web[][o.s.s.p.ServerPluginRepository] Deploy plugin Svn / 1.9.0.1295 / 942e075773975354e32691a60bfd968065703e04
2019.05.14 10:07:20 INFO  web[][o.s.s.p.w.MasterServletFilter] Initializing servlet filter org.sonar.server.ws.WebServiceFilter@26040596 [pattern=UrlPattern{inclusions=[/api/system/migrate_db.*, ...], exclusions=[/api/properties*, ...]}]
2019.05.14 10:07:21 INFO  web[][o.s.s.a.EmbeddedTomcat] HTTP connector enabled on port 9000
2019.05.14 10:07:22 INFO  web[][o.s.s.p.UpdateCenterClient] Update center: https://update.sonarsource.org/update-center.properties (no proxy)
2019.05.14 10:07:23 ERROR web[][o.s.s.p.Platform] Background initialization failed. Stopping SonarQube
org.elasticsearch.cluster.block.ClusterBlockException: blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];
	at org.elasticsearch.cluster.block.ClusterBlocks.indexBlockedException(ClusterBlocks.java:183)
	at org.elasticsearch.action.support.replication.TransportReplicationAction.blockExceptions(TransportReplicationAction.java:255)
	at org.elasticsearch.action.support.replication.TransportReplicationAction.access$500(TransportReplicationAction.java:100)
	at org.elasticsearch.action.support.replication.TransportReplicationAction$ReroutePhase.doRun(TransportReplicationAction.java:780)
	at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)
	at org.elasticsearch.action.support.replication.TransportReplicationAction.doExecute(TransportReplicationAction.java:172)
	at org.elasticsearch.action.support.replication.TransportReplicationAction.doExecute(TransportReplicationAction.java:100)
	at org.elasticsearch.action.support.TransportAction$RequestFilterChain.proceed(TransportAction.java:167)
	at org.elasticsearch.action.support.TransportAction.execute(TransportAction.java:139)
	at org.elasticsearch.action.support.TransportAction.execute(TransportAction.java:81)
	at org.elasticsearch.action.bulk.TransportBulkAction$BulkOperation.doRun(TransportBulkAction.java:420)
	at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)
	at org.elasticsearch.action.bulk.TransportBulkAction.executeBulk(TransportBulkAction.java:533)
	at org.elasticsearch.action.bulk.TransportBulkAction.executeIngestAndBulk(TransportBulkAction.java:271)
	at org.elasticsearch.action.bulk.TransportBulkAction.doExecute(TransportBulkAction.java:222)
	at org.elasticsearch.action.bulk.TransportBulkAction.doExecute(TransportBulkAction.java:90)
	at org.elasticsearch.action.support.TransportAction$RequestFilterChain.proceed(TransportAction.java:167)
	at org.elasticsearch.action.support.TransportAction.execute(TransportAction.java:139)
	at org.elasticsearch.action.bulk.TransportSingleItemBulkWriteAction.doExecute(TransportSingleItemBulkWriteAction.java:69)
	at org.elasticsearch.action.bulk.TransportSingleItemBulkWriteAction.doExecute(TransportSingleItemBulkWriteAction.java:44)
	at org.elasticsearch.action.support.TransportAction$RequestFilterChain.proceed(TransportAction.java:167)
	at org.elasticsearch.action.support.TransportAction.execute(TransportAction.java:139)
	at org.elasticsearch.action.support.replication.TransportReplicationAction$OperationTransportHandler.messageReceived(TransportReplicationAction.java:284)
	at org.elasticsearch.action.support.replication.TransportReplicationAction$OperationTransportHandler.messageReceived(TransportReplicationAction.java:276)
	at org.elasticsearch.transport.RequestHandlerRegistry.processMessageReceived(RequestHandlerRegistry.java:66)
	at org.elasticsearch.transport.TcpTransport$RequestHandler.doRun(TcpTransport.java:1289)
	at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)
	at org.elasticsearch.common.util.concurrent.EsExecutors$1.execute(EsExecutors.java:140)
	at org.elasticsearch.transport.TcpTransport.handleRequest(TcpTransport.java:1247)
	at org.elasticsearch.transport.TcpTransport.messageReceived(TcpTransport.java:1111)
	at org.elasticsearch.transport.TcpTransport.inboundMessage(TcpTransport.java:914)
	at org.elasticsearch.transport.netty4.Netty4MessageChannelHandler.channelRead(Netty4MessageChannelHandler.java:53)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:323)
	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:297)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	at io.netty.handler.logging.LoggingHandler.channelRead(LoggingHandler.java:241)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965)
	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:656)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysPlain(NioEventLoop.java:556)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:510)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:470)
	at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:909)
	at java.lang.Thread.run(Unknown Source)
2019.05.14 10:07:23 INFO  web[][o.s.p.StopWatcher] Stopping process
(G Ann Campbell) #12

Hi,

I don’t think you’ve said specifically. Are you running on Windows @Sloppydec? And if so, are you sure there aren’t any “helpful” little processes like a virus scanner locking random files in the background?

 
Ann

(Declan Burns) #13

yes I am running Windows 10 and I did think to disable the anti virus and any background tasks.
I’d assume these same tasks would prevent previous versions also but they do not.

(Scott) #14

@Sloppydec how much free space do you have on the device?

In version 7.7 they upgraded the ElasticSearch version and now when you have low disk space the ES indexes are marked as read-only. In this case you’ll need to increase the free space, stop the SonarQube server, delete the SQ_HOME/data/es6 folder and start it again.

(G Ann Campbell) #15

Thanks @Scott! Good to know!

(Declan Burns) #16

“Stop the SQ server…” haha it won’t start!
Nonetheless, good to know as a future remedy, I did delete the “es6” folder but the server version still refuses to boot the web component and stops.

(Scott) #17

Good point :sweat_smile:

Well… It’s the same “.../index read-only / allow delete (api)...” error?

EDIT:
In this case, look at the es.log file. You’ll probably see some lines like this:

low disk watermark [85%] exceeded on [81z-GjG7QGWEYVgRx9_Dag][sonarqube][(...)\data\es6\nodes\0] free: 33.1gb[14.9%], replicas will not be assigned to this node
(Declan Burns) #18

thanks for the reply Scott. Today’s attempt is still proving fruitless, though the load does seem to be taking more time to resolve the web component.

I removed the ‘read-only’ flag on all files and folders in the server root and changed the log level in the sonar.properties file to TRACE. web.log and es.log files attached as txt files.

web.log file is pushing out the error as you mentioned above…

ERROR web[o.s.s.p.Platform] Background initialization failed. Stopping SonarQube
org.elasticsearch.cluster.block.ClusterBlockException: blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];
at org.elasticsearch.cluster.block.ClusterBlocks.indexBlockedException(ClusterBlocks.java:183)
es.txt (1.7 MB)
web.txt (82.5 KB)

P.S. Deleted /data/es6 and /temp/es6 folders prior to this attempt and from your earlier question there is +9Gb of free space

(Greg Bishop) #19

Did you all ever find the solution to this? I am having the exact same issue, but on Linux. Not sure if it’s connected, but wanted to mention that.