I can't start SonarQube in CENTOS 7 because the PIDs keeps on changing rapidly

951 views
Skip to first unread message

Mostafa Mokhayeran

unread,
May 14, 2018, 12:19:31 AM5/14/18
to SonarQube

I am trying to Integrating Jenkins 2 and SonarQube 6.7.3 on centos 7 due to this tutorial:

https://www.youtube.com/watch?v=osc0j_Z1x0w

I install and config all software like: java, PostgreSQL, SonarQube,... I am really confused how to start sonar correctly in order to be able open sonar dashboard on Firefox by http://localhost:9000/ now i can't open it because the sonar service not started correctly and PID keeps on changing rapidly :

[root@localhost ~]# service sonar status
SonarQube is running (36211).
[root@localhost ~]# service sonar status
SonarQube is not running.
[root@localhost ~]# service sonar status
SonarQube is running (36602).
[root@localhost ~]# service sonar status
SonarQube is running (36602).
[root@localhost ~]# service sonar status
SonarQube is not running.
[root@localhost ~]# service sonar status
SonarQube is running (36993).
[root@localhost ~]# service sonar status
SonarQube is running (36993).
[root@localhost ~]# 

Mostafa Mokhayeran

unread,
May 14, 2018, 4:04:04 AM5/14/18
to SonarQube
es.log :

2018.05.14 12:27:10 INFO  es[][o.e.e.NodeEnvironment] using [1] data paths, mounts [[/ (rootfs)]], net usable_space [10.1gb], net total_space [16.9gb], spins? [unknown], types [rootfs]
2018.05.14 12:27:10 INFO  es[][o.e.e.NodeEnvironment] heap size [503.6mb], compressed ordinary object pointers [true]
2018.05.14 12:27:10 INFO  es[][o.e.n.Node] node name [sonarqube], node ID [BTKB2-kkR6iAMcYsu_xCtQ]
2018.05.14 12:27:10 INFO  es[][o.e.n.Node] version[5.6.3], pid[24936], build[1a2f265/2017-10-06T20:33:39.012Z], OS[Linux/3.10.0-693.el7.x86_64/amd64], JVM[Oracle Corporation/OpenJDK 64-Bit Server VM/1.8.0_161/25.161-b14]
2018.05.14 12:27:10 INFO  es[][o.e.n.Node] JVM arguments [-XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -Djdk.io.permissionsUseCanonicalPath=true, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Dlog4j.skipJansi=true, -Xms512m, -Xmx512m, -XX:+HeapDumpOnOutOfMemoryError, -Des.path.home=/opt/sonarqube/elasticsearch]
2018.05.14 12:27:11 INFO  es[][o.e.p.PluginsService] loaded module [aggs-matrix-stats]
2018.05.14 12:27:11 INFO  es[][o.e.p.PluginsService] loaded module [ingest-common]
2018.05.14 12:27:11 INFO  es[][o.e.p.PluginsService] loaded module [parent-join]
2018.05.14 12:27:11 INFO  es[][o.e.p.PluginsService] loaded module [percolator]
2018.05.14 12:27:11 INFO  es[][o.e.p.PluginsService] loaded module [reindex]
2018.05.14 12:27:11 INFO  es[][o.e.p.PluginsService] loaded module [transport-netty4]
2018.05.14 12:27:11 INFO  es[][o.e.p.PluginsService] no plugins loaded
2018.05.14 12:27:15 INFO  es[][o.e.d.DiscoveryModule] using discovery type [zen]
2018.05.14 12:27:16 INFO  es[][o.e.n.Node] initialized
2018.05.14 12:27:16 INFO  es[][o.e.n.Node] starting ...
2018.05.14 12:27:16 INFO  es[][o.e.t.TransportService] publish_address {127.0.0.1:9001}, bound_addresses {127.0.0.1:9001}
2018.05.14 12:27:19 INFO  es[][o.e.c.s.ClusterService] new_master {sonarqube}{BTKB2-kkR6iAMcYsu_xCtQ}{HSfGjpH3QkKNLKEcBUkk8w}{127.0.0.1}{127.0.0.1:9001}{rack_id=sonarqube}, reason: zen-disco-elected-as-master ([0] nodes joined)
2018.05.14 12:27:19 INFO  es[][o.e.n.Node] started
2018.05.14 12:27:19 INFO  es[][o.e.g.GatewayService] recovered [0] indices into cluster_state
2018.05.14 12:27:26 INFO  es[][o.e.n.Node] stopping ...
2018.05.14 12:27:26 INFO  es[][o.e.n.Node] stopped
2018.05.14 12:27:26 INFO  es[][o.e.n.Node] closing ...
2018.05.14 12:27:26 INFO  es[][o.e.n.Node] closed.14 12:24:00 INFO  es[][o.e.g.GatewayService] recovered [0] indices into cluster_state
2018.05.14 12:24:09 INFO  es[][o.e.n.Node] stopping ...
2018.05.14 12:24:09 INFO  es[][o.e.n.Node] stopped
2018.05.14 12:24:09 INFO  es[][o.e.n.Node] closing ...
2018.05.14 12:24:09 INFO  es[][o.e.n.Node] closed

also I run the sonarqube and elastic search in non root user and also I increased this :

sysctl -w vm.max_map_count=262144
sysctl -w fs.file-max=65536
ulimit -n 65536
ulimit -u 2048

whats the problem ?? please help me 

Eric Hartmann

unread,
May 14, 2018, 4:07:26 AM5/14/18
to m.mokh...@gmail.com, SonarQube
Hi Mostafa,

Can you post also web.log and sonar.log ?

Cheers,
Eric HARTMANN | SonarSource


--
You received this message because you are subscribed to the Google Groups "SonarQube" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/6ada17f8-4051-4d74-a094-0ebf93ec504e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mostafa Mokhayeran

unread,
May 14, 2018, 4:12:17 AM5/14/18
to SonarQube
Hello,

2018.05.14 12:37:29 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube/temp
2018.05.14 12:37:29 INFO  app[][o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001
2018.05.14 12:37:29 INFO  app[][o.s.a.p.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [/opt/sonarqube/elasticsearch]: /opt/sonarqube/elasticsearch/bin/elasticsearch -Epath.conf=/opt/sonarqube/temp/conf/es
2018.05.14 12:37:29 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
OpenJDK 64-Bit Server VM warning: If the number of processors is expected to increase from one, then you should configure the number of parallel GC threads appropriately using -XX:ParallelGCThreads=N
2018.05.14 12:37:30 INFO  app[][o.e.p.PluginsService] no modules loaded
2018.05.14 12:37:30 INFO  app[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
2018.05.14 12:37:43 INFO  app[][o.s.a.SchedulerImpl] Process[es] is up
2018.05.14 12:37:43 INFO  app[][o.s.a.p.ProcessLauncherImpl] Launch process[[key='web', ipcIndex=2, logFilenamePrefix=web]] from [/opt/sonarqube]: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.161-0.b14.el7_4.x86_64/jre/bin/java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/opt/sonarqube/temp -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -cp ./lib/common/*:./lib/server/*:/opt/sonarqube/lib/jdbc/postgresql/postgresql-42.2.1.jar org.sonar.server.app.WebServer /opt/sonarqube/temp/sq-process8348882131910508699properties
2018.05.14 12:37:53 INFO  app[][o.s.a.SchedulerImpl] Process [web] is stopped
2018.05.14 12:37:53 INFO  app[][o.s.a.SchedulerImpl] Process [es] is stopped
2018.05.14 12:37:53 INFO  app[][o.s.a.SchedulerImpl] SonarQube is stopped
2018.05.14 12:37:53 WARN  app[][o.s.a.p.AbstractProcessMonitor] Process exited with exit value [es]: 143
<-- Wrapper Stopped

and web.log

aused by: org.postgresql.util.PSQLException: FATAL: password authentication failed for user "sonar"
at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:475)
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:207)
at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:49)
at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:195)
at org.postgresql.Driver.makeConnection(Driver.java:452)
at org.postgresql.Driver.connect(Driver.java:254)
at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)
at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1556)
at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1545)
... 34 common frames omitted

Eric Hartmann

unread,
May 14, 2018, 4:14:49 AM5/14/18
to m.mokh...@gmail.com, SonarQube
According to your web.log file, you did not install correctly the database schema since the username and password are incorrect :
  FATAL: password authentication failed for user "sonar"

So you should double check the installation of Postgresql and more precisely the authentication mechanism (md5 vs peer) and the creation of the user.

Cheers,

Eric HARTMANN | SonarSource

Reply all
Reply to author
Forward
0 new messages