Last week SonarQube loaded in, worked nice and dandy. Now it throws this warning in sonar.log:
2017.03.16 11:58:47 WARN es[o.e.bootstrap] JNA not found. native methods will be disabled.
2017.03.16 11:58:47 INFO es[o.elasticsearch.node] [sonar-1489661925446] initialized
2017.03.16 11:58:47 INFO es[o.elasticsearch.node] [sonar-1489661925446] starting ...
Did not start of course. What could have changed while I was away?
Edit:
I did not provide the logs after trying to stop Sonar
Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
2017.03.16 16:54:43 INFO app[o.s.a.AppFileSystem] Cleaning or creating temp directory /proj/tn/tools/sonar/temp
2017.03.16 16:54:43 INFO app[o.s.p.m.JavaProcessLauncher] Launch process[es]: /afs/sunrise.ericsson.se/se/app/vbuild/SLED11-x86_64/jdk/1.8.0_102/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=/proj/tn/tools/sonar/temp -javaagent:/afs/sunrise.ericsson.se/se/app/vbuild/SLED11-x86_64/jdk/1.8.0_102/jre/lib/management-agent.jar -cp ./lib/common/*:./lib/search/* org.sonar.search.SearchServer /proj/tn/tools/sonar/temp/sq-process8365491608077217541properties
2017.03.16 16:54:43 INFO es[o.s.p.ProcessEntryPoint] Starting es
2017.03.16 16:54:43 INFO es[o.s.s.EsSettings] Elasticsearch listening on 127.0.0.1:9001
2017.03.16 16:54:43 INFO es[o.elasticsearch.node] [sonar-1489679683034] version[1.7.5], pid[438787], build[00f95f4/2016-02-02T09:55:30Z]
2017.03.16 16:54:43 INFO es[o.elasticsearch.node] [sonar-1489679683034] initializing ...
2017.03.16 16:54:43 INFO es[o.e.plugins] [sonar-1489679683034] loaded [], sites []
2017.03.16 16:54:43 INFO es[o.elasticsearch.env] [sonar-1489679683034] using [1] data paths, mounts [[/proj/tn (seroisproj02002.mo.sw.ericsson.se:/uproj020036/tn)]], net usable_space [330.8gb], net total_space [4.4tb], types [nfs]
2017.03.16 16:54:44 WARN es[o.e.bootstrap] JNA not found. native methods will be disabled.
2017.03.16 16:54:45 INFO es[o.elasticsearch.node] [sonar-1489679683034] initialized
2017.03.16 16:54:45 INFO es[o.elasticsearch.node] [sonar-1489679683034] starting ...
2017.03.16 16:54:45 WARN es[o.s.p.ProcessEntryPoint] Fail to start es
org.elasticsearch.transport.BindTransportException: Failed to bind to [9001]
at org.elasticsearch.transport.netty.NettyTransport.bindServerBootstrap(NettyTransport.java:422) ~[elasticsearch-1.7.5.jar:na]
at org.elasticsearch.transport.netty.NettyTransport.doStart(NettyTransport.java:283) ~[elasticsearch-1.7.5.jar:na]
at org.elasticsearch.common.component.AbstractLifecycleComponent.start(AbstractLifecycleComponent.java:85) ~[elasticsearch-1.7.5.jar:na]
at org.elasticsearch.transport.TransportService.doStart(TransportService.java:153) ~[elasticsearch-1.7.5.jar:na]
at org.elasticsearch.common.component.AbstractLifecycleComponent.start(AbstractLifecycleComponent.java:85) ~[elasticsearch-1.7.5.jar:na]
at org.elasticsearch.node.internal.InternalNode.start(InternalNode.java:257) ~[elasticsearch-1.7.5.jar:na]
at org.sonar.search.SearchServer.start(SearchServer.java:46) [sonar-search-5.6.2.jar:na]
at org.sonar.process.ProcessEntryPoint.launch(ProcessEntryPoint.java:102) ~[sonar-process-5.6.2.jar:na]
at org.sonar.search.SearchServer.main(SearchServer.java:81) [sonar-search-5.6.2.jar:na]
Caused by: org.elasticsearch.common.netty.channel.ChannelException: Failed to bind to: /127.0.0.1:9001
at org.elasticsearch.common.netty.bootstrap.ServerBootstrap.bind(ServerBootstrap.java:272) ~[elasticsearch-1.7.5.jar:na]
at org.elasticsearch.transport.netty.NettyTransport$1.onPortNumber(NettyTransport.java:413) ~[elasticsearch-1.7.5.jar:na]
at org.elasticsearch.common.transport.PortsRange.iterate(PortsRange.java:58) ~[elasticsearch-1.7.5.jar:na]
at org.elasticsearch.transport.netty.NettyTransport.bindServerBootstrap(NettyTransport.java:409) ~[elasticsearch-1.7.5.jar:na]
... 8 common frames omitted
Caused by: java.net.BindException: Address already in use
at sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_102]
at sun.nio.ch.Net.bind(Net.java:433) ~[na:1.8.0_102]
at sun.nio.ch.Net.bind(Net.java:425) ~[na:1.8.0_102]
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) ~[na:1.8.0_102]
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) ~[na:1.8.0_102]
at org.elasticsearch.common.netty.channel.socket.nio.NioServerBoss$RegisterTask.run(NioServerBoss.java:193) ~[elasticsearch-1.7.5.jar:na]
at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioSelector.processTaskQueue(AbstractNioSelector.java:391) ~[elasticsearch-1.7.5.jar:na]
at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:315) ~[elasticsearch-1.7.5.jar:na]
at org.elasticsearch.common.netty.channel.socket.nio.NioServerBoss.run(NioServerBoss.java:42) ~[elasticsearch-1.7.5.jar:na]
at org.elasticsearch.common.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) ~[elasticsearch-1.7.5.jar:na]
at org.elasticsearch.common.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42) ~[elasticsearch-1.7.5.jar:na]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[na:1.8.0_102]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[na:1.8.0_102]
at java.lang.Thread.run(Thread.java:745) ~[na:1.8.0_102]
2017.03.16 16:54:45 INFO es[o.elasticsearch.node] [sonar-1489679683034] stopping ...
2017.03.16 16:54:45 INFO es[o.elasticsearch.node] [sonar-1489679683034] stopped
2017.03.16 16:54:45 INFO es[o.elasticsearch.node] [sonar-1489679683034] closing ...
2017.03.16 16:54:45 INFO es[o.elasticsearch.node] [sonar-1489679683034] closed
Server OS: Linux
Problem solved, bit ashamed, but as the log said the port 9001 was used by someone else on the server (probably my own previous process) so elasticsearch could not bind.
Simply changed it to 9002.
Related
I'm Using Windows 10, Java 11, sonarqube-9.8.0.63668, jdk-11.0.11. I'm quite new to sonarqube, so please tell me if there is any more information that you might need.
Starting the sonarservice used to work fine. I am not sure what is wrong (I haven't changed anything in the .properties file).
I start the service by using command prompt to run the startsonar.bat file
This is what happens when I start the service in command prompt:
C:\Users\mayhe\Documents\sonarqube-9.8.0.63668\sonarqube-9.8.0.63668\bin\windows-x86-64>startsonar.bat Starting SonarQube... 2023.02.19 04:48:52 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory C:\Users\mayhe\Documents\sonarqube-9.8.0.63668\sonarqube-9.8.0.63668\temp 2023.02.19 04:48:52 INFO app[][o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:63759] 2023.02.19 04:48:52 INFO app[][o.s.a.ProcessLauncherImpl] Launch process[ELASTICSEARCH] from [C:\Users\mayhe\Documents\sonarqube-9.8.0.63668\sonarqube-9.8.0.63668\elasticsearch]: C:\Program Files\Eclipse Adoptium\jdk-17.0.5.8-hotspot\bin\java -XX:+UseG1GC -Djava.io.tmpdir=C:\Users\mayhe\Documents\sonarqube-9.8.0.63668\sonarqube-9.8.0.63668\temp -XX:ErrorFile=../logs/es_hs_err_pid%p.log -Des.networkaddress.cache.ttl=60 -Des.networkaddress.cache.negative.ttl=10 -XX:+AlwaysPreTouch -Xss1m -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djna.nosys=true -Djna.tmpdir=C:\Users\mayhe\Documents\sonarqube-9.8.0.63668\sonarqube-9.8.0.63668\temp -XX:-OmitStackTraceInFastThrow -Dio.netty.noUnsafe=true -Dio.netty.noKeySetOptimization=true -Dio.netty.recycler.maxCapacityPerThread=0 -Dio.netty.allocator.numDirectArenas=0 -Dlog4j.shutdownHookEnabled=false -Dlog4j2.disable.jmx=true -Dlog4j2.formatMsgNoLookups=true -Djava.locale.providers=COMPAT -Dcom.redhat.fips=false -Xmx512m -Xms512m -XX:MaxDirectMemorySize=256m -XX:+HeapDumpOnOutOfMemoryError -Delasticsearch -Des.path.home=C:\Users\mayhe\Documents\sonarqube-9.8.0.63668\sonarqube-9.8.0.63668\elasticsearch -Des.path.conf=C:\Users\mayhe\Documents\sonarqube-9.8.0.63668\sonarqube-9.8.0.63668\temp\conf\es -cp lib/* org.elasticsearch.bootstrap.Elasticsearch 2023.02.19 04:48:52 INFO app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running 2023.02.19 04:49:13 INFO app[][o.s.a.SchedulerImpl] Process[es] is up 2023.02.19 04:49:13 INFO app[][o.s.a.ProcessLauncherImpl] Launch process[WEB_SERVER] from [C:\Users\mayhe\Documents\sonarqube-9.8.0.63668\sonarqube-9.8.0.63668]: C:\Program Files\Eclipse Adoptium\jdk-17.0.5.8-hotspot\bin\java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=C:\Users\mayhe\Documents\sonarqube-9.8.0.63668\sonarqube-9.8.0.63668\temp -XX:-OmitStackTraceInFastThrow --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED --add-exports=java.base/jdk.internal.ref=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.management/sun.management=ALL-UNNAMED --add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED -Dcom.redhat.fips=false -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Dhttp.nonProxyHosts=localhost|127.*|[::1] -cp ./lib/sonar-application-9.8.0.63668.jar;C:\Users\mayhe\Documents\sonarqube-9.8.0.63668\sonarqube-9.8.0.63668\lib\jdbc\h2\h2-2.1.214.jar org.sonar.server.app.WebServer C:\Users\mayhe\Documents\sonarqube-9.8.0.63668\sonarqube-9.8.0.63668\temp\sq-process18020723362913653070properties WARNING: A terminally deprecated method in java.lang.System has been called WARNING: System::setSecurityManager has been called by org.sonar.process.PluginSecurityManager (file:/C:/Users/mayhe/Documents/sonarqube-9.8.0.63668/sonarqube-9.8.0.63668/lib/sonar-application-9.8.0.63668.jar) WARNING: Please consider reporting this to the maintainers of org.sonar.process.PluginSecurityManager WARNING: System::setSecurityManager will be removed in a future release 2023.02.19 04:49:14 INFO app[][o.s.a.SchedulerImpl] Process[Web Server] is stopped 2023.02.19 04:49:14 INFO app[][o.s.a.SchedulerImpl] Process[ElasticSearch] is stopped 2023.02.19 04:49:14 INFO app[][o.s.a.SchedulerImpl] SonarQube is stopped
ce.log:
2023.02.04 05:11:37 WARN ce[][c.z.h.p.HikariPool] HikariPool-1 - Thread starvation or clock leap detected (housekeeper delta=16h46m27s756ms572µs900ns).
web.log:
2023.02.19 03:52:43 INFO web[][o.s.p.ProcessEntryPoint] Starting Web Server 2023.02.19 03:52:45 INFO web[][o.s.s.p.LogServerVersion] SonarQube Server / 9.8.0.63668 / 6498415c5112d868f6206d8bcc043a1dac92d1c4 2023.02.19 03:52:45 WARN web[][o.s.c.a.AnnotationConfigApplicationContext] Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jdk.internal.loader.ClassLoaders$AppClassLoader#659e0bfd-org.sonar.server.platform.db.EmbeddedDatabaseFactory': Initialization of bean failed; nested exception is java.lang.IllegalStateException: Unable to start database 2023.02.19 03:52:45 ERROR web[][o.s.s.p.PlatformImpl] Web server startup failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jdk.internal.loader.ClassLoaders$AppClassLoader#659e0bfd-org.sonar.server.platform.db.EmbeddedDatabaseFactory': Initialization of bean failed; nested exception is java.lang.IllegalStateException: Unable to start database at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:628) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:955) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583) at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:187) at org.sonar.server.platform.platformlevel.PlatformLevel.start(PlatformLevel.java:80) at org.sonar.server.platform.platformlevel.PlatformLevel1.start(PlatformLevel1.java:164) at org.sonar.server.platform.PlatformImpl.start(PlatformImpl.java:196) at org.sonar.server.platform.PlatformImpl.startLevel1Container(PlatformImpl.java:162) at org.sonar.server.platform.PlatformImpl.init(PlatformImpl.java:76) at org.sonar.server.platform.web.PlatformServletContextListener.contextInitialized(PlatformServletContextListener.java:43) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4764) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5222) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1393) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1383) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:145) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:916) at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:835) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1393) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1383) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:145) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:916) at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:265) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.StandardService.startInternal(StandardService.java:430) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:930) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.startup.Tomcat.start(Tomcat.java:486) at org.sonar.server.app.EmbeddedTomcat.start(EmbeddedTomcat.java:72) at org.sonar.server.app.WebServer.start(WebServer.java:55) at org.sonar.process.ProcessEntryPoint.launch(ProcessEntryPoint.java:97) at org.sonar.process.ProcessEntryPoint.launch(ProcessEntryPoint.java:81) at org.sonar.server.app.WebServer.main(WebServer.java:104) Caused by: java.lang.IllegalStateException: Unable to start database at org.sonar.server.platform.db.EmbeddedDatabase.startServer(EmbeddedDatabase.java:88) at org.sonar.server.platform.db.EmbeddedDatabase.start(EmbeddedDatabase.java:63) at org.sonar.server.platform.db.EmbeddedDatabaseFactory.start(EmbeddedDatabaseFactory.java:49) at org.sonar.core.platform.StartableBeanPostProcessor.postProcessBeforeInitialization(StartableBeanPostProcessor.java:33) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:440) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1796) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:620) ... 44 common frames omitted Caused by: org.h2.jdbc.JdbcSQLNonTransientException: General error: "org.h2.mvstore.MVStoreException: Chunk 545 not found [2.1.214/9]" [50000-214] at org.h2.message.DbException.getJdbcSQLException(DbException.java:554) at org.h2.message.DbException.getJdbcSQLException(DbException.java:477) at org.h2.message.DbException.get(DbException.java:212) at org.h2.message.DbException.convert(DbException.java:395) at org.h2.engine.Database.<init>(Database.java:403) at org.h2.engine.Engine.openSession(Engine.java:92) at org.h2.engine.Engine.openSession(Engine.java:222) at org.h2.engine.Engine.createSession(Engine.java:201) at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:338) at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:122) at org.h2.Driver.connect(Driver.java:59) at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:681) at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:252) at org.sonar.server.platform.db.EmbeddedDatabase.createDatabase(EmbeddedDatabase.java:115) at org.sonar.server.platform.db.EmbeddedDatabase.startServer(EmbeddedDatabase.java:79) ... 50 common frames omitted Caused by: org.h2.mvstore.MVStoreException: Chunk 545 not found [2.1.214/9] at org.h2.mvstore.DataUtils.newMVStoreException(DataUtils.java:1004) at org.h2.mvstore.MVStore.getChunk(MVStore.java:1384) at org.h2.mvstore.MVStore.readPage(MVStore.java:2566) at org.h2.mvstore.MVMap.readPage(MVMap.java:633) at org.h2.mvstore.MVMap.readOrCreateRootPage(MVMap.java:658) at org.h2.mvstore.MVMap.setRootPos(MVMap.java:643) at org.h2.mvstore.MVStore.openMap(MVStore.java:702) at org.h2.mvstore.MVStore.openMap(MVStore.java:648) at org.h2.mvstore.tx.TransactionStore.openMap(TransactionStore.java:564) at org.h2.mvstore.db.LobStorageMap.<init>(LobStorageMap.java:136) at org.h2.engine.Database.<init>(Database.java:374) ... 60 common frames omitted Suppressed: java.lang.NullPointerException: Cannot invoke "org.h2.store.LobStorageInterface.close()" because "this.lobStorage" is null at org.h2.engine.Database.closeOpenFilesAndUnlock(Database.java:1252) at org.h2.engine.Database.<init>(Database.java:399) ... 60 common frames omitted 2023.02.19 03:52:46 INFO web[][o.s.s.a.EmbeddedTomcat] HTTP connector enabled on port 9000 2023.02.19 03:52:46 INFO web[][o.s.p.ProcessEntryPoint] Hard stopping process
es.log:
2023.02.19 03:52:29 INFO es[][o.e.n.Node] version[7.17.6], pid[11896], build[unknown/unknown/f65e9d338dc1d07b642e14a27f338990148ee5b6/2022-08-23T11:08:48.893373482Z], OS[Windows 10/10.0/amd64], JVM[Eclipse Adoptium/OpenJDK 64-Bit Server VM/17.0.5/17.0.5+8] 2023.02.19 03:52:29 INFO es[][o.e.n.Node] JVM home [C:\Program Files\Eclipse Adoptium\jdk-17.0.5.8-hotspot] 2023.02.19 03:52:29 INFO es[][o.e.n.Node] JVM arguments [-XX:+UseG1GC, -Djava.io.tmpdir=C:\Users\mayhe\Documents\sonarqube-9.8.0.63668\sonarqube-9.8.0.63668\temp, -XX:ErrorFile=../logs/es_hs_err_pid%p.log, -Des.networkaddress.cache.ttl=60, -Des.networkaddress.cache.negative.ttl=10, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -Djna.tmpdir=C:\Users\mayhe\Documents\sonarqube-9.8.0.63668\sonarqube-9.8.0.63668\temp, -XX:-OmitStackTraceInFastThrow, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dio.netty.allocator.numDirectArenas=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Dlog4j2.formatMsgNoLookups=true, -Djava.locale.providers=COMPAT, -Dcom.redhat.fips=false, -Xmx512m, -Xms512m, -XX:MaxDirectMemorySize=256m, -XX:+HeapDumpOnOutOfMemoryError, -Delasticsearch, -Des.path.home=C:\Users\mayhe\Documents\sonarqube-9.8.0.63668\sonarqube-9.8.0.63668\elasticsearch, -Des.path.conf=C:\Users\mayhe\Documents\sonarqube-9.8.0.63668\sonarqube-9.8.0.63668\temp\conf\es] 2023.02.19 03:52:30 INFO es[][o.e.p.PluginsService] loaded module [analysis-common] 2023.02.19 03:52:30 INFO es[][o.e.p.PluginsService] loaded module [lang-painless] 2023.02.19 03:52:30 INFO es[][o.e.p.PluginsService] loaded module [parent-join] 2023.02.19 03:52:30 INFO es[][o.e.p.PluginsService] loaded module [reindex] 2023.02.19 03:52:30 INFO es[][o.e.p.PluginsService] loaded module [transport-netty4] 2023.02.19 03:52:30 INFO es[][o.e.p.PluginsService] no plugins loaded 2023.02.19 03:52:30 INFO es[][o.e.e.NodeEnvironment] using [1] data paths, mounts [[Windows (C:)]], net usable_space [211gb], net total_space [455.2gb], types [NTFS] 2023.02.19 03:52:30 INFO es[][o.e.e.NodeEnvironment] heap size [512mb], compressed ordinary object pointers [true] 2023.02.19 03:52:31 INFO es[][o.e.n.Node] node name [sonarqube], node ID [X8-rPowaSL63lggYpofZqg], cluster name [sonarqube], roles [data_frozen, master, remote_cluster_client, data, data_content, data_hot, data_warm, data_cold, ingest] 2023.02.19 03:52:36 INFO es[][o.e.t.NettyAllocator] creating NettyAllocator with the following configs: [name=unpooled, suggested_max_allocation_size=256kb, factors={es.unsafe.use_unpooled_allocator=null, g1gc_enabled=true, g1gc_region_size=1mb, heap_size=512mb}] 2023.02.19 03:52:36 INFO es[][o.e.i.r.RecoverySettings] using rate limit [40mb] with [default=40mb, read=0b, write=0b, max=0b] 2023.02.19 03:52:36 INFO es[][o.e.d.DiscoveryModule] using discovery type [zen] and seed hosts providers [settings] 2023.02.19 03:52:37 INFO es[][o.e.g.DanglingIndicesState] gateway.auto_import_dangling_indices is disabled, dangling indices will not be automatically detected or imported and must be managed manually 2023.02.19 03:52:37 INFO es[][o.e.n.Node] initialized 2023.02.19 03:52:37 INFO es[][o.e.n.Node] starting ... 2023.02.19 03:52:37 INFO es[][o.e.t.TransportService] publish_address {127.0.0.1:61229}, bound_addresses {127.0.0.1:61229} 2023.02.19 03:52:40 INFO es[][o.e.c.c.Coordinator] cluster UUID [IMag8vk6RwirV2vDDPYE4A] 2023.02.19 03:52:40 INFO es[][o.e.c.s.MasterService] elected-as-master ([1] nodes joined)[{sonarqube}{X8-rPowaSL63lggYpofZqg}{9YWVEDtPSsy0Vr28ywzEow}{127.0.0.1}{127.0.0.1:61229}{cdfhimrsw} elect leader, _BECOME_MASTER_TASK_, _FINISH_ELECTION_], term: 113, version: 2234, delta: master node changed {previous [], current [{sonarqube}{X8-rPowaSL63lggYpofZqg}{9YWVEDtPSsy0Vr28ywzEow}{127.0.0.1}{127.0.0.1:61229}{cdfhimrsw}]} 2023.02.19 03:52:40 INFO es[][o.e.c.s.ClusterApplierService] master node changed {previous [], current [{sonarqube}{X8-rPowaSL63lggYpofZqg}{9YWVEDtPSsy0Vr28ywzEow}{127.0.0.1}{127.0.0.1:61229}{cdfhimrsw}]}, term: 113, version: 2234, reason: Publication{term=113, version=2234} 2023.02.19 03:52:40 INFO es[][o.e.h.AbstractHttpServerTransport] publish_address {127.0.0.1:9001}, bound_addresses {127.0.0.1:9001} 2023.02.19 03:52:40 INFO es[][o.e.n.Node] started 2023.02.19 03:52:40 INFO es[][o.e.g.GatewayService] recovered [7] indices into cluster_state 2023.02.19 03:52:43 INFO es[][o.e.c.r.a.AllocationService] Cluster health status changed from [RED] to [GREEN] (reason: [shards started [[components][2], [components][0], [metadatas][0]]]).
When I open up the localhost I get a "This site can’t be reached localhost refused to connect" error.
I have tried deleting some of the projects that I've already tried analyzing and played around a bit with the .properties file in the conf folder, but couldn't get anywhere. I have tried asking on the sonar community forum, I didn't receive any answer.
I have also tried re-extracting the files from the original zip that I downloaded and tried running the service using the "other" startsonar.bat file.
I was expecting the service to run as usual. I have no idea why, only since a few weeks ago, it started stopping itself immediately after starting
I just had the same issue. I found a solution to my issue.
SonarSource
I have installed sonar on my Ubuntu 14.04 LTS (which I am running inside windows using vagrant) by following a tutorial here
And my sonar.properties file is below
/opt/sonar/conf/sonar.properties
sonar.jdbc.username=sonar
sonar.jdbc.password=sonar
sonar.jdbc.url=jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance
sonar.web.host=127.0.0.1
sonar.web.context=/sonar
sonar.web.port=9000
sonar.jdbc.driverClassName=com.mysql.jdbc.Driver
sonar.jdbc.validationQuery=select 1
sonar.jdbc.dialect=mysql
sonar.jdbc.maxActive=20 sonar.jdbc.maxIdle=5
sonar.jdbc.minIdle=2
sonar.jdbc.maxWait=5000
sonar.jdbc.minEvictableIdleTimeMillis=600000
sonar.jdbc.timeBetweenEvictionRunsMillis=30000
Once after installing I restarted, started the sonar as below
/opt/sonar/bin/linux-x86-64/sonar.sh restart
/opt/sonar/bin/linux-x86-64/sonar.sh start
Now I have checked the status of the sonar as below
/opt/sonar/bin/linux-x86-64/sonar.sh status
and output is SonarQube is running.
and after some time like 15 seconds, I have checked the status again and now the output is SonarQube is not running.
I don't what's the reason that causing sonar to shut down immediately because its not displaying any error
sonar.log(/opt/sonar/logs/sonar.log) file output
--> Wrapper Started as Daemon
Launching a JVM...
Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
2017.07.28 06:47:48 INFO app[o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonar/temp
2017.07.28 06:47:48 INFO app[o.s.p.m.JavaProcessLauncher] Launch process[es]: /usr/lib/jvm/java-8-oracle/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 -javaagent:/usr/lib/jvm/java-8-oracle/jre/lib/management-agent.jar -cp ./lib/common/*:./lib/search/* org.sonar.search.SearchServer /opt/sonar/temp/sq-process8071013234782021313properties
2017.07.28 06:47:48 INFO es[o.s.p.ProcessEntryPoint] Starting es
2017.07.28 06:47:48 INFO es[o.s.s.EsSettings] Elasticsearch listening on 127.0.0.1:9001
2017.07.28 06:47:49 INFO es[o.elasticsearch.node] [sonar-1501224467799] version[1.7.5], pid[5493], build[00f95f4/2016-02-02T09:55:30Z]
2017.07.28 06:47:49 INFO es[o.elasticsearch.node] [sonar-1501224467799] initializing ...
2017.07.28 06:47:49 INFO es[o.e.plugins] [sonar-1501224467799] loaded [], sites []
2017.07.28 06:47:49 INFO es[o.elasticsearch.env] [sonar-1501224467799] using [1] data paths, mounts [[/ (/dev/sda1)]], net usable_space [34.3gb], net total_space [39.3gb], types [ext4]
2017.07.28 06:47:50 WARN es[o.e.bootstrap] JNA not found. native methods will be disabled.
2017.07.28 06:47:52 INFO es[o.elasticsearch.node] [sonar-1501224467799] initialized
2017.07.28 06:47:52 INFO es[o.elasticsearch.node] [sonar-1501224467799] starting ...
2017.07.28 06:47:52 INFO es[o.e.transport] [sonar-1501224467799] bound_address {inet[/127.0.0.1:9001]}, publish_address {inet[/127.0.0.1:9001]}
2017.07.28 06:47:52 INFO es[o.e.discovery] [sonar-1501224467799] sonarqube/a-DrjveQTd6cOLiDMQGFPA
2017.07.28 06:47:55 INFO es[o.e.cluster.service] [sonar-1501224467799] new_master [sonar-1501224467799][a-DrjveQTd6cOLiDMQGFPA][vagrant-ubuntu-trusty-64][inet[/127.0.0.1:9001]]{rack_id=sonar-1501224467799}, reason: zen-disco-join (elected_as_master)
2017.07.28 06:47:55 INFO es[o.elasticsearch.node] [sonar-1501224467799] started
2017.07.28 06:47:55 INFO es[o.e.gateway] [sonar-1501224467799] recovered [0] indices into cluster_state
2017.07.28 06:47:55 INFO app[o.s.p.m.Monitor] Process[es] is up
2017.07.28 06:47:55 INFO app[o.s.p.m.JavaProcessLauncher] Launch process[web]: /usr/lib/jvm/java-8-oracle/jre/bin/java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djruby.management.enabled=false -Djruby.compile.invokedynamic=false -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Djava.net.preferIPv4Stack=true -Djava.io.tmpdir=/opt/sonar/temp -javaagent:/usr/lib/jvm/java-8-oracle/jre/lib/management-agent.jar -cp ./lib/common/*:./lib/server/*:/opt/sonar/lib/jdbc/mysql/mysql-connector-java-5.1.35.jar org.sonar.server.app.WebServer /opt/sonar/temp/sq-process7630170265596703695properties
2017.07.28 06:47:56 INFO web[o.s.p.ProcessEntryPoint] Starting web
2017.07.28 06:47:56 INFO web[o.s.s.a.TomcatContexts] Webapp directory: /opt/sonar/web
2017.07.28 06:47:57 INFO web[o.a.c.h.Http11NioProtocol] Initializing ProtocolHandler ["http-nio-127.0.0.1-9000"]
2017.07.28 06:47:57 INFO web[o.a.t.u.n.NioSelectorPool] Using a shared selector for servlet write/read
2017.07.28 06:47:58 INFO web[o.s.s.p.ServerImpl] SonarQube Server / 5.6.4 / 52298794f1a34a4fd713ff8d441a0c13432e40a9
2017.07.28 06:47:58 INFO web[o.sonar.db.Database] Create JDBC data source for jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance
2017.07.28 06:47:58 ERROR web[o.a.c.c.C.[.[.[/]] Exception sending context initialized event to listener instance of class org.sonar.server.platform.PlatformServletContextListener
java.lang.NumberFormatException: For input string: "20 sonar.jdbc.maxIdle=5"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) ~[na:1.8.0_131]
at java.lang.Integer.parseInt(Integer.java:580) ~[na:1.8.0_131]
at java.lang.Integer.parseInt(Integer.java:615) ~[na:1.8.0_131]
at org.apache.commons.dbcp.BasicDataSourceFactory.createDataSource(BasicDataSourceFactory.java:223) ~[commons-dbcp-1.4.jar:1.4]
at org.sonar.db.DefaultDatabase.initDataSource(DefaultDatabase.java:92) ~[sonar-db-5.6.4.jar:na]
at org.sonar.db.DefaultDatabase.start(DefaultDatabase.java:70) ~[sonar-db-5.6.4.jar:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_131]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_131]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_131]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_131]
at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.invokeMethod(ReflectionLifecycleStrategy.java:110) ~[picocontainer-2.15.jar:na]
at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.start(ReflectionLifecycleStrategy.java:89) ~[picocontainer-2.15.jar:na]
at org.sonar.core.platform.ComponentContainer$1.start(ComponentContainer.java:320) ~[sonar-core-5.6.4.jar:na]
at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84) ~[picocontainer-2.15.jar:na]
--> Wrapat org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:169) ~[picocontainer-2.15.jar:na]
Launchinat org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:132) ~[picocontainer-2.15.jar:na]
Wrapper at org.picocontainer.behaviors.Stored.start(Stored.java:110) ~[picocontainer-2.15.jar:na]
Copyriat org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(DefaultPicoContainer.java:1016) ~[picocontainer-2.15.jar:na]
at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1009) ~[picocontainer-2.15.jar:na]
2017.07.at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:767) ~[picocontainer-2.15.jar:na]
2017.07.at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:141) ~[sonar-core-5.6.4.jar:na].awt.headless=true -Xmx1G -Xms256m -Xss256k -Djava.net.preferIPv4Stack=true -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMat org.sonar.server.platform.platformlevel.PlatformLevel.start(PlatformLevel.java:84) ~[sonar-server-5.6.4.jar:na]r=/opt/sonar/temp -javaagent:/usr/lib/jvm/java-8-oracle/jre/lib/management-agent.jar -cp ./lib/common/*:./lib/search/* org.sonat org.sonar.server.platform.Platform.start(Platform.java:216) ~[sonar-server-5.6.4.jar:na]
2017.07.at org.sonar.server.platform.Platform.startLevel1Container(Platform.java:175) ~[sonar-server-5.6.4.jar:na]
2017.07.at org.sonar.server.platform.Platform.init(Platform.java:90) ~[sonar-server-5.6.4.jar:na]
2017.07.at org.sonar.server.platform.PlatformServletContextListener.contextInitialized(PlatformServletContextListener.java:43) ~[sonar-server-5.6.4.jar:na]
2017.07.at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4812) [tomcat-embed-core-8.0.32.jar:8.0.32]
2017.07.at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5255) [tomcat-embed-core-8.0.32.jar:8.0.32]
2017.07.at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147) [tomcat-embed-core-8.0.32.jar:8.0.32])]], net usable_space [34.3gb], net total_space [39.3gb], types [ext4]
2017.07.at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408) [tomcat-embed-core-8.0.32.jar:8.0.32]
2017.07.at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398) [tomcat-embed-core-8.0.32.jar:8.0.32]
2017.07.at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_131]g ...
2017.07.at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_131], publish_address {inet[/127.0.0.1:9001]}
2017.07.at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_131]
2017.07.at java.lang.Thread.run(Thread.java:748) [na:1.8.0_131]224467799] new_master [sonar-1501224467799][a-DrjveQTd6cOLiDMQGFPA][vagrant-ubuntu-trusty-64][inet[/127.0.0.1:9001]]{rack_id=sonar-1501224467799}, reason: zen-disco-join (electe2017.07.28 06:47:58 ERROR web[o.a.c.c.StandardContext] One or more listeners failed to start. Full details will be found in the appropriate container log file
2017.07.28 06:47:58 ERROR web[o.a.c.c.StandardContext] Context [] startup failed due to previous errors
2017.07.28 06:47:58 WARN web[o.a.c.l.WebappClassLoaderBase] The web application [ROOT] appears to have started a thread named [Abandoned connection cleanup thread] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: INFO app[o.s.p.m.Monitor] Process[es] is up
java.lang.Object.wait(Native Method).JavaProcessLauncher] Launch process[web]: /usr/lib/jvm/java-8-oracle/jre/bin/java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djruby.management.enabled=false -Djruby.compile.invokedynamic=false -Xmx java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:143)erIPv4Stack=true -Djava.io.tmpdir=/opt/sonar/temp -javaagent:/usr/lib/jvm/java-8-oracle/jre/lib/management-agent.jar -cp ./lib/common/*:./lib/server/*:/opt/sonar/lib/jdbc/mysql/my com.mysql.jdbc.AbandonedConnectionCleanupThread.run(AbandonedConnectionCleanupThread.java:43)265596703695properties
2017.07.28 06:47:58 INFO web[o.a.c.h.Http11NioProtocol] Starting ProtocolHandler ["http-nio-127.0.0.1-9000"]
2017.07.28 06:47:58 INFO web[o.s.s.a.TomcatAccessLog] Web server is started/sonar/web
2017.07.28 06:47:58 INFO web[o.s.s.a.EmbeddedTomcat] HTTP connector enabled on port 9000ttp-nio-127.0.0.1-9000"]
2017.07.28 06:47:58 WARN web[o.s.p.ProcessEntryPoint] Fail to start webselector for servlet write/read
java.lang.IllegalStateException: Webapp did not startarQube Server / 5.6.4 / 52298794f1a34a4fd713ff8d441a0c13432e40a9
2017.07.at org.sonar.server.app.EmbeddedTomcat.isUp(EmbeddedTomcat.java:84) ~[sonar-server-5.6.4.jar:na]06/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance
2017.07.at org.sonar.server.app.WebServer.isUp(WebServer.java:47) [sonar-server-5.6.4.jar:na]to listener instance of class org.sonar.server.platform.PlatformServletContextListener
java.lanat org.sonar.process.ProcessEntryPoint.launch(ProcessEntryPoint.java:105) ~[sonar-process-5.6.4.jar:na]
at org.sonar.server.app.WebServer.main(WebServer.java:68) [sonar-server-5.6.4.jar:na]:1.8.0_131]
2017.07.28 06:47:58 INFO web[o.a.c.h.Http11NioProtocol] Pausing ProtocolHandler ["http-nio-127.0.0.1-9000"]
2017.07.28 06:47:59 INFO web[o.a.c.h.Http11NioProtocol] Stopping ProtocolHandler ["http-nio-127.0.0.1-9000"]
2017.07.28 06:47:59 INFO web[o.a.c.h.Http11NioProtocol] Destroying ProtocolHandler ["http-nio-127.0.0.1-9000"]ommons-dbcp-1.4.jar:1.4]
2017.07.28 06:47:59 INFO web[o.s.s.a.TomcatAccessLog] Web server is stopped92) ~[sonar-db-5.6.4.jar:na]
2017.07.28 06:48:00 INFO app[o.s.p.m.Monitor] Process[es] is stopping ~[sonar-db-5.6.4.jar:na]
2017.07.28 06:48:00 INFO es[o.s.p.StopWatcher] Stopping processhod) ~[na:1.8.0_131]
2017.07.28 06:48:00 INFO es[o.elasticsearch.node] [sonar-1501224467799] stopping ...
2017.07.28 06:48:00 INFO es[o.elasticsearch.node] [sonar-1501224467799] stopped
2017.07.28 06:48:00 INFO es[o.elasticsearch.node] [sonar-1501224467799] closing ...
2017.07.28 06:48:00 INFO es[o.elasticsearch.node] [sonar-1501224467799] closed
2017.07.28 06:48:00 INFO app[o.s.p.m.Monitor] Process[es] is stopped
<-- Wrapper Stopped
I have checked whether mysql is running or not as below and it was running and up
mysqladmin -u root -p status
Uptime: 2781 Threads: 1 Questions: 122 Slow queries: 0 Opens: 48 Flush tables: 1 Open tables: 41 Queries per second avg: 0.043
So finally I didn't understand what makes sonar to shut down after some time once it was started, and what changes to make in order to run sonar continuously and where to debug?
You have a missing line break here:
sonar.jdbc.maxActive=20 sonar.jdbc.maxIdle=5
Sonar can't parse the maxActive option because everything after the first = is parsed as integer. This obviously fails:
java.lang.NumberFormatException: For input string: "20 sonar.jdbc.maxIdle=5"
Simple solution:
sonar.jdbc.maxActive=20
sonar.jdbc.maxIdle=5
Iam trying run StartSonar.bat from command line in order to start sonar serve but its giving me below exception. It seems to related to memory issue or Java version issue but iam unable to find the root cause. Appreciate any help on this.
Sonarqube version is - 5.4
sonar-scanner version - 2.6.1
log file below.
--> 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.
2017.01.12 18:30:42 INFO app[o.s.a.AppFileSystem] Cleaning or creating temp directory C:\Users\502698332\Downloads\Code Review\sonarqube-5.4\sonarqube-5.4\temp
2017.01.12 18:30:42 INFO app[o.s.p.m.JavaProcessLauncher] Launch process[search]: C:\Program Files\Java\jre1.8.0_112\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=C:\Users\502698332\Downloads\Code Review\sonarqube-5.4\sonarqube-5.4\temp -cp ./lib/common/*;./lib/search/* org.sonar.search.SearchServer C:\Users\502698~1\AppData\Local\Temp\sq-process506451527421407979properties
2017.01.12 18:30:43 INFO es[o.s.p.ProcessEntryPoint] Starting search
2017.01.12 18:30:43 INFO es[o.s.s.SearchSettings] Elasticsearch listening on 127.0.0.1:9001
2017.01.12 18:30:43 INFO es[o.elasticsearch.node] [sonar-1484226042365] version[1.7.2], pid[12896], build[e43676b/2015-09-14T09:49:53Z]
2017.01.12 18:30:43 INFO es[o.elasticsearch.node] [sonar-1484226042365] initializing ...
2017.01.12 18:30:43 INFO es[o.e.plugins] [sonar-1484226042365] loaded [], sites []
2017.01.12 18:30:43 INFO es[o.elasticsearch.env] [sonar-1484226042365] using [1] data paths, mounts [[Windows7 (C:)]], net usable_space [379.4gb], net total_space [465.7gb], types [NTFS]
2017.01.12 18:30:44 WARN es[o.e.bootstrap] JNA not found. native methods will be disabled.
2017.01.12 18:30:44 INFO es[o.elasticsearch.node] [sonar-1484226042365] initialized
2017.01.12 18:30:44 INFO es[o.elasticsearch.node] [sonar-1484226042365] starting ...
2017.01.12 18:30:44 WARN es[o.s.p.ProcessEntryPoint] Fail to start search
org.elasticsearch.transport.BindTransportException: Failed to bind to [9001]
at org.elasticsearch.transport.netty.NettyTransport.bindServerBootstrap(NettyTransport.java:422) ~[elasticsearch-1.7.2.jar:na]
at org.elasticsearch.transport.netty.NettyTransport.doStart(NettyTransport.java:283) ~[elasticsearch-1.7.2.jar:na]
at org.elasticsearch.common.component.AbstractLifecycleComponent.start(AbstractLifecycleComponent.java:85) ~[elasticsearch-1.7.2.jar:na]
at org.elasticsearch.transport.TransportService.doStart(TransportService.java:153) ~[elasticsearch-1.7.2.jar:na]
at org.elasticsearch.common.component.AbstractLifecycleComponent.start(AbstractLifecycleComponent.java:85) ~[elasticsearch-1.7.2.jar:na]
at org.elasticsearch.node.internal.InternalNode.start(InternalNode.java:257) ~[elasticsearch-1.7.2.jar:na]
at org.sonar.search.SearchServer.start(SearchServer.java:45) [sonar-search-5.4.jar:na]
at org.sonar.process.ProcessEntryPoint.launch(ProcessEntryPoint.java:81) ~[sonar-process-5.4.jar:na]
at org.sonar.search.SearchServer.main(SearchServer.java:79) [sonar-search-5.4.jar:na]
Caused by: org.elasticsearch.common.netty.channel.ChannelException: Failed to bind to: /127.0.0.1:9001
at org.elasticsearch.common.netty.bootstrap.ServerBootstrap.bind(ServerBootstrap.java:272) ~[elasticsearch-1.7.2.jar:na]
at org.elasticsearch.transport.netty.NettyTransport$1.onPortNumber(NettyTransport.java:413) ~[elasticsearch-1.7.2.jar:na]
at org.elasticsearch.common.transport.PortsRange.iterate(PortsRange.java:58) ~[elasticsearch-1.7.2.jar:na]
at org.elasticsearch.transport.netty.NettyTransport.bindServerBootstrap(NettyTransport.java:409) ~[elasticsearch-1.7.2.jar:na]
... 8 common frames omitted
Caused by: java.net.BindException: Address already in use: bind
at sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_112]
at sun.nio.ch.Net.bind(Unknown Source) ~[na:1.8.0_112]
at sun.nio.ch.Net.bind(Unknown Source) ~[na:1.8.0_112]
at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source) ~[na:1.8.0_112]
at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source) ~[na:1.8.0_112]
at org.elasticsearch.common.netty.channel.socket.nio.NioServerBoss$RegisterTask.run(NioServerBoss.java:193) ~[elasticsearch-1.7.2.jar:na]
at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioSelector.processTaskQueue(AbstractNioSelector.java:391) ~[elasticsearch-1.7.2.jar:na]
at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:315) ~[elasticsearch-1.7.2.jar:na]
at org.elasticsearch.common.netty.channel.socket.nio.NioServerBoss.run(NioServerBoss.java:42) ~[elasticsearch-1.7.2.jar:na]
at org.elasticsearch.common.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) ~[elasticsearch-1.7.2.jar:na]
at org.elasticsearch.common.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42) ~[elasticsearch-1.7.2.jar:na]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) ~[na:1.8.0_112]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ~[na:1.8.0_112]
at java.lang.Thread.run(Unknown Source) ~[na:1.8.0_112]
2017.01.12 18:30:44 INFO es[o.elasticsearch.node] [sonar-1484226042365] stopping ...
2017.01.12 18:30:44 INFO es[o.elasticsearch.node] [sonar-1484226042365] stopped
2017.01.12 18:30:44 INFO es[o.elasticsearch.node] [sonar-1484226042365] closing ...
2017.01.12 18:30:44 INFO es[o.elasticsearch.node] [sonar-1484226042365] closed
<-- Wrapper Stopped
Error is pretty explicit:
org.elasticsearch.transport.BindTransportException: Failed to bind to [9001]
...
Caused by: java.net.BindException: Address already in use: bind
Port 9001 is not free for SonarQube to use. Maybe another SonarQube instance already using it, maybe some other/zombie process. See this StackOverflow question for guidance on how to identify the process using a specific port on Windows.
Solution from their on:
deal with the process already listening on port 9001
tell your SonarQube server to listen on different ports: sonar.web.port and sonar.search.port in sonar.properties
Sometimes, unable to stop currently running application with port (9001). That might be running any system related operations.
Instead of disabling existing app, need to change port of SonarQube from 9001 to other.
For example,
In sonar.properties
Change this line "#sonar.search.port=9001" to "sonar.search.port=9002"
(Which works for me)
while running the StartSonar.bat from command line I am getting the following error contineously.sonarqube log file is showing the below messages.
Any help is always appreciated!
--> 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.
2015.06.13 15:04:41 INFO app[o.s.p.m.JavaProcessLauncher] Launch process[search]: C:\Program Files\Java\jdk1.8.0_45\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=D:\sonarqube-5.1\sonarqube-5.1\temp -cp ./lib/common/*;./lib/search/* org.sonar.search.SearchServer C:\Users\rkutchar\AppData\Local\Temp\sq-process3411693551115002418properties
2015.06.13 15:04:42 INFO es[o.s.p.ProcessEntryPoint] Starting search
2015.06.13 15:04:42 INFO es[o.s.s.SearchServer] Starting Elasticsearch[sonarqube] on port 9001
2015.06.13 15:04:42 INFO es[o.elasticsearch.node] [sonar-1434188081817] version[1.4.4], pid[7068], build[c88f77f/2015-02-19T13:05:36Z]
2015.06.13 15:04:42 INFO es[o.elasticsearch.node] [sonar-1434188081817] initializing ...
2015.06.13 15:04:42 INFO es[o.e.plugins] [sonar-1434188081817] loaded [], sites []
2015.06.13 15:04:43 INFO es[o.elasticsearch.node] [sonar-1434188081817] initialized
2015.06.13 15:04:43 INFO es[o.elasticsearch.node] [sonar-1434188081817] starting ...
2015.06.13 15:04:44 INFO es[o.e.transport] [sonar-1434188081817] bound_address {inet[/0.0.0.0:9001]}, publish_address {inet[/10.76.17.174:9001]}
2015.06.13 15:04:44 INFO es[o.e.discovery] [sonar-1434188081817] sonarqube/Y7PopLbZQ8Gqvlg6o70C3g
2015.06.13 15:04:47 INFO es[o.e.cluster.service] [sonar-1434188081817] new_master [sonar-1434188081817][Y7PopLbZQ8Gqvlg6o70C3g][DIN35003079][inet[/10.76.17.174:9001]]{rack_id=sonar-1434188081817}, reason: zen-disco-join (elected_as_master)
2015.06.13 15:04:47 INFO es[o.elasticsearch.node] [sonar-1434188081817] started
2015.06.13 15:04:47 INFO es[o.e.gateway] [sonar-1434188081817] recovered [6] indices into cluster_state
2015.06.13 15:04:48 INFO app[o.s.p.m.Monitor] Process[search] is up
2015.06.13 15:04:48 INFO app[o.s.p.m.JavaProcessLauncher] Launch process[web]: C:\Program Files\Java\jdk1.8.0_45\jre\bin\java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djruby.management.enabled=false -Djruby.compile.invokedynamic=false -Xmx768m -XX:MaxPermSize=160m -XX:+HeapDumpOnOutOfMemoryError -Djava.net.preferIPv4Stack=true -Djava.io.tmpdir=D:\sonarqube-5.1\sonarqube-5.1\temp -cp ./lib/common/*;./lib/server/*;D:\sonarqube-5.1\sonarqube-5.1\lib\jdbc\mysql\mysql-connector-java-5.1.34.jar org.sonar.server.app.WebServer C:\Users\rkutchar\AppData\Local\Temp\sq-process4890757865030388998properties
2015.06.13 15:04:49 INFO web[o.s.p.ProcessEntryPoint] Starting web
2015.06.13 15:04:49 INFO web[o.s.s.app.Webapp] Webapp directory: D:\sonarqube-5.1\sonarqube-5.1\web
2015.06.13 15:04:49 INFO web[o.a.c.h.Http11NioProtocol] Initializing ProtocolHandler ["http-nio-0.0.0.0-9000"]
2015.06.13 15:04:49 INFO web[o.a.t.u.n.NioSelectorPool] Using a shared selector for servlet write/read
2015.06.13 15:04:50 INFO web[o.e.plugins] [sonar-1434188081817] loaded [], sites []
2015.06.13 15:04:50 INFO web[o.s.s.p.ServerImpl] SonarQube Server / 5.1 / 4aa9af3a6a4362b61db365fba32eb0a55d411e7a
2015.06.13 15:04:50 INFO web[o.s.c.p.Database] Create JDBC datasource for jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance
2015.06.13 15:04:50 ERROR web[o.a.c.c.C.[.[.[/]] Exception sending context initialized event to listener instance of class org.sonar.server.platform.PlatformServletContextListener
java.lang.IllegalStateException: Can not connect to database. Please check connectivity and settings (see the properties prefixed by 'sonar.jdbc.').
at org.sonar.core.persistence.DefaultDatabase.checkConnection(DefaultDatabase.java:117) ~[sonar-core-5.1.jar:na]
at org.sonar.core.persistence.DefaultDatabase.start(DefaultDatabase.java:73) ~[sonar-core-5.1.jar:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_45]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_45]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_45]
at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_45]
at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.invokeMethod(ReflectionLifecycleStrategy.java:110) ~[picocontainer-2.14.3.jar:na]
at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.start(ReflectionLifecycleStrategy.java:89) ~[picocontainer-2.14.3.jar:na]
at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84) ~[picocontainer-2.14.3.jar:na]
at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:169) ~[picocontainer-2.14.3.jar:na]
at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:132) ~[picocontainer-2.14.3.jar:na]
at org.picocontainer.behaviors.Stored.start(Stored.java:110) ~[picocontainer-2.14.3.jar:na]
at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(DefaultPicoContainer.java:1015) ~[picocontainer-2.14.3.jar:na]
at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1008) ~[picocontainer-2.14.3.jar:na]
at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:766) ~[picocontainer-2.14.3.jar:na]
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:91) ~[sonar-plugin-api-5.1.jar:na]
at org.sonar.server.platform.Platform.startLevel1Container(Platform.java:96) ~[sonar-server-5.1.jar:na]
at org.sonar.server.platform.Platform.init(Platform.java:72) ~[sonar-server-5.1.jar:na]
at org.sonar.server.platform.PlatformServletContextListener.contextInitialized(PlatformServletContextListener.java:43) ~[sonar-server-5.1.jar:na]
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4720) [tomcat-embed-core-8.0.18.jar:8.0.18]
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5154) [tomcat-embed-core-8.0.18.jar:8.0.18]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [tomcat-embed-core-8.0.18.jar:8.0.18]
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409) [tomcat-embed-core-8.0.18.jar:8.0.18]
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1399) [tomcat-embed-core-8.0.18.jar:8.0.18]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_45]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_45]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_45]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45]
Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Access denied for user 'sonar'#'localhost' (using password: YES))
at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1549) ~[commons-dbcp-1.4.jar:1.4]
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388) ~[commons-dbcp-1.4.jar:1.4]
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044) ~[commons-dbcp-1.4.jar:1.4]
at org.sonar.core.persistence.DefaultDatabase.checkConnection(DefaultDatabase.java:115) ~[sonar-core-5.1.jar:na]
... 27 common frames omitted
Caused by: java.sql.SQLException: Access denied for user 'sonar'#'localhost' (using password: YES)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:996) ~[mysql-connector-java-5.1.34.jar:5.1.34]
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3887) ~[mysql-connector-java-5.1.34.jar:5.1.34]
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3823) ~[mysql-connector-java-5.1.34.jar:5.1.34]
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:870) ~[mysql-connector-java-5.1.34.jar:5.1.34]
at com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication(MysqlIO.java:1659) ~[mysql-connector-java-5.1.34.jar:5.1.34]
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1206) ~[mysql-connector-java-5.1.34.jar:5.1.34]
at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2234) ~[mysql-connector-java-5.1.34.jar:5.1.34]
at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2265) ~[mysql-connector-java-5.1.34.jar:5.1.34]
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2064) ~[mysql-connector-java-5.1.34.jar:5.1.34]
at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:790) ~[mysql-connector-java-5.1.34.jar:5.1.34]
at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:44) ~[mysql-connector-java-5.1.34.jar:5.1.34]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_45]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:1.8.0_45]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0_45]
at java.lang.reflect.Constructor.newInstance(Constructor.java:422) ~[na:1.8.0_45]
at com.mysql.jdbc.Util.handleNewInstance(Util.java:377) ~[mysql-connector-java-5.1.34.jar:5.1.34]
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:395) ~[mysql-connector-java-5.1.34.jar:5.1.34]
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:325) ~[mysql-connector-java-5.1.34.jar:5.1.34]
at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38) ~[commons-dbcp-1.4.jar:1.4]
at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582) ~[commons-dbcp-1.4.jar:1.4]
at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1556) ~[commons-dbcp-1.4.jar:1.4]
at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1545) ~[commons-dbcp-1.4.jar:1.4]
... 30 common frames omitted
2015.06.13 15:04:51 INFO web[jruby.rack] jruby 1.7.9 (ruby-1.8.7p370) 2013-12-06 87b108a on Java HotSpot(TM) 64-Bit Server VM 1.8.0_45-b15 [Windows 7-amd64]
2015.06.13 15:04:51 INFO web[jruby.rack] using a shared (threadsafe!) runtime
EDIT:
apply plugin: "sonar-runner"
sonarRunner {
sonarProperties {
// can be also set on command line like - Dsonar.analysis.mode=incremental
property "sonar.host.url","http://localhost:9000"
property "sonar.jdbc.url","jdbc:mysql://sonar.someserver.int:3306/sonar"
property "sonar.jdbc.driverClassName","com.mysql.jdbc.Driver"
property "sonar.jdbc.username", "****"
property "sonar.jdbc.password", "****"
//I added these properties to my gradle.build
property "sonar.projectKey","com.example.rkutchar.myapplication"
property "sonar.projectName","MyApplication"
property "sonar.projectVersion","V1.0"
property "sonar.language","java"
property "sonar.sources","src/main/java"
property "sonar.binaries","build"
}
}
subprojects {
sonarRunner {
sonarProperties {
properties["sonar.sources"] += "src/main/java"
}
}
}
sonarRunner {
toolVersion = '2.4'
}
PROJECT.PROPERTIES FILE
# Required metadata
sonar.projectKey=MyApplication
sonar.projectName=My Application
sonar.projectVersion=1.0
# Comma-separated paths to directories with sources (required)
sonar.sources=src/main/java
# Language
sonar.language=java
# Encoding of the source files
sonar.sourceEncoding=UTF-8
conf/sonar-properties
#Configure here general information about the environment, such as SonarQube DB details for example
#No information about specific project should appear here
#----- Default SonarQube server
#sonar.host.url=http://localhost:9000
#----- PostgreSQL
#sonar.jdbc.url=jdbc:postgresql://localhost/sonar
#----- MySQl
sonar.jdbc.url=jdbc:mysql://localhost:3306/sonar?
useUnicode=true&characterEncoding=utf8
#----- Oracle
#sonar.jdbc.url=jdbc:oracle:thin:#localhost/XE
#----- Microsoft SQLServer
#sonar.jdbc.url=jdbc:jtds:sqlserver://localhost/sonar;SelectMethod=Cursor
#----- Global database settings
#sonar.jdbc.username=sonar
#sonar.jdbc.password=sonar
#----- Default source code encoding
#sonar.sourceEncoding=UTF-8
#----- Security (when 'sonar.forceAuthentication' is set to 'true')
#sonar.login=admin
#sonar.password=admin
It seems that the permissions are not correct on your database. You have to execute the following statement on your MySQL database:
GRANT ALL PRIVILEGES ON `sonar`.* TO 'sonar'#'localhost';
As I explained, you should do step by step. First start server then analyze your android project. No need to spend your time on analyzer as long as server is not correctly started.
Mostly you placed the jdbc driver in the right folder. So it cant be realted to JDBC driver absence. Double check this.
I think you might have gotton the sonar.JDBC url property wrong. What DB is it?
Regards,
Karthik Prabhu
When installing sonarqube 5.0, I got following error messages while starting SonarQube on windows7 with mysql 5.6.22:
Launching a JVM...
Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
2015.01.19 11:18:57 INFO app[o.s.p.m.JavaProcessLauncher] Launch process[search]: C:\Tools\jdk1.7.0_71\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=C:\Tools\sonarqube-5.0\temp -cp ./lib/common/*;./lib/search/* org.sonar.search.SearchServer C:\Users\li2\AppData\Local\Temp\sq-process2755720839215931323properties
2015.01.19 11:19:09 INFO sea[o.s.p.ProcessEntryPoint] Starting search
2015.01.19 11:19:09 INFO sea[o.s.s.SearchServer] Starting Elasticsearch[sonarqube] on port 9001
2015.01.19 11:19:09 WARN sea[o.s.s.SearchSettings] Elasticsearch HTTP connector is enabled on port 9010. MUST NOT BE USED INTO PRODUCTION
2015.01.19 11:19:09 INFO sea[o.elasticsearch.node] [sonar-1421662737113] version[1.1.2], pid[8464], build[e511f7b/2014-05-22T12:27:39Z]
2015.01.19 11:19:09 INFO sea[o.elasticsearch.node] [sonar-1421662737113] initializing ...
2015.01.19 11:19:09 INFO sea[o.e.plugins] [sonar-1421662737113] loaded [], sites []
2015.01.19 11:19:11 INFO sea[o.elasticsearch.node] [sonar-1421662737113] initialized
2015.01.19 11:19:11 INFO sea[o.elasticsearch.node] [sonar-1421662737113] starting ...
2015.01.19 11:19:27 INFO sea[o.e.transport] [sonar-1421662737113] bound_address {inet[/0.0.0.0:9001]}, publish_address {inet[/192.168.0.107:9001]}
2015.01.19 11:19:30 INFO sea[o.e.cluster.service] [sonar-1421662737113] new_master [sonar-1421662737113][RB8i_Ar8Rv-Do_15hhhWtQ][LI21][inet[/192.168.0.107:9001]]{rack_id=sonar-1421662737113}, reason: zen-disco-join (elected_as_master)
2015.01.19 11:19:51 WARN sea[o.e.cluster.service] [sonar-1421662737113] failed to connect to node [[sonar-1421662737113][RB8i_Ar8Rv-Do_15hhhWtQ][LI21][inet[/192.168.0.107:9001]]{rack_id=sonar-1421662737113}]
org.elasticsearch.transport.ConnectTransportException: [sonar-1421662737113][inet[/192.168.0.107:9001]] connect_timeout[30s]
at org.elasticsearch.transport.netty.NettyTransport.connectToChannels(NettyTransport.java:719) ~[elasticsearch-1.1.2.jar:na]
at org.elasticsearch.transport.netty.NettyTransport.connectToNode(NettyTransport.java:648) ~[elasticsearch-1.1.2.jar:na]
at org.elasticsearch.transport.netty.NettyTransport.connectToNode(NettyTransport.java:616) ~[elasticsearch-1.1.2.jar:na]
at org.elasticsearch.transport.TransportService.connectToNode(TransportService.java:129) ~[elasticsearch-1.1.2.jar:na]
at org.elasticsearch.cluster.service.InternalClusterService$UpdateTask.run(InternalClusterService.java:405) ~[elasticsearch-1.1.2.jar:na]
at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:134) [elasticsearch-1.1.2.jar:na]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_71]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_71]
at java.lang.Thread.run(Thread.java:745) [na:1.7.0_71]
Caused by: java.net.ConnectException: Connection timed out: no further information: /192.168.0.107:9001
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[na:1.7.0_71]
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739) ~[na:1.7.0_71]
at org.elasticsearch.common.netty.channel.socket.nio.NioClientBoss.connect(NioClientBoss.java:150) ~[elasticsearch-1.1.2.jar:na]
at org.elasticsearch.common.netty.channel.socket.nio.NioClientBoss.processSelectedKeys(NioClientBoss.java:105) ~[elasticsearch-1.1.2.jar:na]
at org.elasticsearch.common.netty.channel.socket.nio.NioClientBoss.process(NioClientBoss.java:79) ~[elasticsearch-1.1.2.jar:na]
at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:318) ~[elasticsearch-1.1.2.jar:na]
at org.elasticsearch.common.netty.channel.socket.nio.NioClientBoss.run(NioClientBoss.java:42) ~[elasticsearch-1.1.2.jar:na]
at org.elasticsearch.common.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) ~[elasticsearch-1.1.2.jar:na]
at org.elasticsearch.common.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42) ~[elasticsearch-1.1.2.jar:na]
... 3 common frames omitted
2015.01.19 11:19:51 INFO sea[o.e.discovery] [sonar-1421662737113] sonarqube/RB8i_Ar8Rv-Do_15hhhWtQ
2015.01.19 11:19:51 INFO sea[o.elasticsearch.http] [sonar-1421662737113] bound_address {inet[/127.0.0.1:9010]}, publish_address {inet[/127.0.0.1:9010]}
2015.01.19 11:19:52 INFO sea[o.e.gateway] [sonar-1421662737113] recovered [4] indices into cluster_state
2015.01.19 11:19:52 INFO sea[o.elasticsearch.node] [sonar-1421662737113] started
2015.01.19 11:19:53 INFO app[o.s.p.m.Monitor] Process[search] is up
2015.01.19 11:19:53 INFO app[o.s.p.m.JavaProcessLauncher] Launch process[web]: C:\Tools\jdk1.7.0_71\jre\bin\java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djruby.management.enabled=false -Xmx768m -XX:MaxPermSize=160m -XX:+HeapDumpOnOutOfMemoryError -Djava.net.preferIPv4Stack=true -Djava.io.tmpdir=C:\Tools\sonarqube-5.0\temp -cp ./lib/common/*;./lib/server/*;C:\Tools\sonarqube-5.0\lib\jdbc\mysql\mysql-connector-java-5.1.27.jar org.sonar.server.app.WebServer C:\Users\li2\AppData\Local\Temp\sq-process1889452272417488373properties
2015.01.19 11:20:06 INFO web[o.s.p.ProcessEntryPoint] Starting web
2015.01.19 11:20:06 INFO web[o.s.s.app.Connectors] HTTP connector is enabled on port 9000
2015.01.19 11:20:06 INFO web[o.s.s.app.Webapp] Webapp directory: C:\Tools\sonarqube-5.0\web
2015.01.19 11:20:07 INFO web[o.e.plugins] [sonar-1421662737113] loaded [], sites []
2015.01.19 11:20:19 INFO web[o.s.s.p.ServerImpl] SonarQube Server / 5.0 / dc62506bf3b331ec19c053e225e415d164ee60b0
2015.01.19 11:20:19 INFO web[o.s.c.p.Database] Create JDBC datasource for jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance
2015.01.19 11:20:20 INFO web[o.s.s.p.DefaultServerFileSystem] SonarQube home: C:\Tools\sonarqube-5.0
2015.01.19 11:20:20 INFO web[o.s.a.u.TimeProfiler] Install plugins...
2015.01.19 11:20:20 INFO web[o.s.s.p.ServerPluginJarsInstaller] Deploy plugin Findbugs / 3.1 / adc09c989cebc856d44239116a00ab0b602b0851
2015.01.19 11:20:20 INFO web[o.s.s.p.ServerPluginJarsInstaller] Deploy plugin Duplications / 5.0 / dc62506bf3b331ec19c053e225e415d164ee60b0
2015.01.19 11:20:20 INFO web[o.s.s.p.ServerPluginJarsInstaller] Deploy plugin Git / 5.0 / dc62506bf3b331ec19c053e225e415d164ee60b0
2015.01.19 11:20:20 INFO web[o.s.s.p.ServerPluginJarsInstaller] Deploy plugin Core / 5.0 / dc62506bf3b331ec19c053e225e415d164ee60b0
2015.01.19 11:20:20 INFO web[o.s.s.p.ServerPluginJarsInstaller] Deploy plugin Java / 2.8 / 20a3d682b1334eb1857e7bc8a40e11f04fed9528
2015.01.19 11:20:20 INFO web[o.s.s.p.ServerPluginJarsInstaller] Deploy plugin SVN / 5.0 / dc62506bf3b331ec19c053e225e415d164ee60b0
2015.01.19 11:20:20 INFO web[o.s.s.p.ServerPluginJarsInstaller] Deploy plugin English Pack / 5.0 / dc62506bf3b331ec19c053e225e415d164ee60b0
2015.01.19 11:20:20 INFO web[o.s.s.p.ServerPluginJarsInstaller] Deploy plugin Email notifications / 5.0 / dc62506bf3b331ec19c053e225e415d164ee60b0
2015.01.19 11:20:20 INFO web[o.s.a.u.TimeProfiler] Install plugins done: 234 ms
2015.01.19 11:20:21 INFO web[o.s.s.p.RailsAppsDeployer] Deploy Ruby on Rails applications
2015.01.19 11:20:21 INFO web[jruby.rack] jruby 1.7.9 (ruby-1.8.7p370) 2013-12-06 87b108a on Java HotSpot(TM) 64-Bit Server VM 1.7.0_71-b14 [Windows 7-amd64]
2015.01.19 11:20:21 INFO web[jruby.rack] using a shared (threadsafe!) runtime
2015.01.19 11:20:29 INFO web[DbMigration] == InitialSchema: migrating ==================================================
2015.01.19 11:20:29 INFO web[DbMigration] -- create_table(:projects, {})
2015.01.19 11:20:29 INFO web[DbMigration] -> 0.0310s
2015.01.19 11:20:29 INFO web[DbMigration] -> 0 rows
........
........
2015.01.19 11:20:50 INFO web[o.s.j.s.AbstractDatabaseConnector] Initializing Hibernate
2015.01.19 11:20:51 INFO web[o.s.s.p.UpdateCenterClient] Update center: http://update.sonarsource.org/update-center.properties (HTTP proxy: xxx)
2015.01.19 11:20:52 INFO web[o.s.s.n.NotificationService] Notification service started (delay 60 sec.)
2015.01.19 11:20:52 INFO web[o.s.s.s.IndexSynchronizer] Index rules for updates after Sun Jan 18 20:37:25 CET 2015
2015.01.19 11:20:52 INFO web[o.s.s.s.IndexSynchronizer] Index activeRules for updates after Sun Jan 18 20:37:27 CET 2015
2015.01.19 11:20:52 INFO web[o.s.s.s.IndexSynchronizer] Index sonarLogs for updates after null
2015.01.19 11:20:52 INFO web[o.s.s.s.IndexSynchronizer] Index issues
2015.01.19 11:20:52 INFO web[o.s.s.s.IndexSynchronizer] Index source files
2015.01.19 11:20:52 INFO web[o.s.a.u.TimeProfiler] Load metrics...
2015.01.19 11:20:52 INFO web[o.s.s.s.RegisterMetrics] Cleaning quality gate conditions
2015.01.19 11:20:52 INFO web[o.s.a.u.TimeProfiler] Load metrics done: 234 ms
2015.01.19 11:20:52 INFO web[o.s.s.s.RegisterDebtModel] Register technical debt model...
2015.01.19 11:20:52 INFO web[o.s.s.s.RegisterDebtModel] Register technical debt model done: 78 ms
2015.01.19 11:20:52 INFO web[o.s.a.u.TimeProfiler] Register rules...
2015.01.19 11:22:57 WARN sea[o.e.cluster.service] [sonar-1421662737113] failed to reconnect to node [sonar-1421662737113][RB8i_Ar8Rv-Do_15hhhWtQ][LI21][inet[/192.168.0.107:9001]]{rack_id=sonar-1421662737113}
org.elasticsearch.transport.ConnectTransportException: [sonar-1421662737113][inet[/192.168.0.107:9001]] connect_timeout[30s]
at org.elasticsearch.transport.netty.NettyTransport.connectToChannels(NettyTransport.java:719) ~[elasticsearch-1.1.2.jar:na]
at org.elasticsearch.transport.netty.NettyTransport.connectToNode(NettyTransport.java:648) ~[elasticsearch-1.1.2.jar:na]
at org.elasticsearch.transport.netty.NettyTransport.connectToNode(NettyTransport.java:616) ~[elasticsearch-1.1.2.jar:na]
at org.elasticsearch.transport.TransportService.connectToNode(TransportService.java:129) ~[elasticsearch-1.1.2.jar:na]
at org.elasticsearch.cluster.service.InternalClusterService$ReconnectToNodes.run(InternalClusterService.java:516) ~[elasticsearch-1.1.2.jar:na]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_71]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_71]
at java.lang.Thread.run(Thread.java:745) [na:1.7.0_71]
Caused by: java.net.ConnectException: Connection timed out: no further information: /192.168.0.107:9001
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[na:1.7.0_71]
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739) ~[na:1.7.0_71]
I have searched for similar questions but with no success.
Does someone have an idea how to fix that?
Thanks!
I got the same problem. It could be resolved by a possibility to not only specify sonar.search.port but also something like sonar.search.host. The reason in my setting is that the default IP which sonar search uses is only accessible from outside hosts. It must not be used from localhost.
I worked around it by adding the following line to sonar.properties as described here:
sonar.search.javaAdditionalOpts=-Des.network.host=127.0.0.1