我无法在CENTOS 7中启动SonarQube,因为PID会持续快速变化

时间:2018-05-07 09:39:22

标签: linux postgresql jenkins sonarqube centos7

由于本教程,我正在尝试将Jenkins 2和SonarQube 6.7.3集成到centos 7上:

  

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

我安装和配置所有软件,如:java,PostgreSQL,SonarQube,......我真的很困惑如何正确启动声纳,以便能够在;;上通过http://localhost:9000/打开声纳仪表板,现在我可以&#39 ; t打开它是因为声纳服务未正确启动且 PID继续快速变化

[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 ~]# 

sonar can't be opened on FireFox

我通过以下命令启动并启用PostgreSQL:

[root@localhost ~]# systemctl start postgresql-9.6
[root@localhost ~]# systemctl enable postgresql-9.6
[root@localhost ~]# systemctl status postgresql-9.6
● postgresql-9.6.service - PostgreSQL 9.6 database server
Loaded: loaded (/usr/lib/systemd/system/postgresql-9.6.service; enabled; 
vendor preset: disabled)
Active: active (running) since Mon 2018-05-07 11:44:12 +0430; 1h 26min ago
Docs: https://www.postgresql.org/docs/9.6/static/
***Main PID: 1288 (postmaster)***
CGroup: /system.slice/postgresql-9.6.service
        ├─1288 /usr/pgsql-9.6/bin/postmaster -D /var/lib/pgsql/9.6/data/
        ├─1626 postgres: logger process   
        ├─1630 postgres: checkpointer process   
        ├─1631 postgres: writer process   
        ├─1632 postgres: wal writer process   
        ├─1633 postgres: autovacuum launcher process   
        └─1634 postgres: stats collector process   

May 07 11:43:57 localhost.localdomain systemd[1]: Starting PostgreSQL 9.6 
database server...
May 07 11:44:11 localhost.localdomain postmaster[1288]: < 2018-05-07 
11:44:11.217 +0430 > LOG:  redir...ess
May 07 11:44:11 localhost.localdomain postmaster[1288]: < 2018-05-07 
11:44:11.217 +0430 > HINT:  Futu...g".
May 07 11:44:12 localhost.localdomain systemd[1]: Started PostgreSQL 9.6 
database server.
Hint: Some lines were ellipsized, use -l to show in full.

当我再次运行命令systemctl status postgresql-9.6时,输出与上次运行Main PID: 1288 (postmaster)的输出相同:

[root@localhost ~]# systemctl status postgresql-9.6
● postgresql-9.6.service - PostgreSQL 9.6 database server
Loaded: loaded (/usr/lib/systemd/system/postgresql-9.6.service; enabled; 
vendor preset: disabled)
Active: active (running) since Mon 2018-05-07 11:44:12 +0430; 1h 29min ago
Docs: https://www.postgresql.org/docs/9.6/static/
***Main PID: 1288 (postmaster)***
CGroup: /system.slice/postgresql-9.6.service
       ├─1288 /usr/pgsql-9.6/bin/postmaster -D /var/lib/pgsql/9.6/data/
       ├─1626 postgres: logger process   
       ├─1630 postgres: checkpointer process   
       ├─1631 postgres: writer process   
       ├─1632 postgres: wal writer process   
       ├─1633 postgres: autovacuum launcher process   
       └─1634 postgres: stats collector process   

May 07 11:43:57 localhost.localdomain systemd[1]: Starting PostgreSQL 9.6 
database server...
May 07 11:44:11 localhost.localdomain postmaster[1288]: < 2018-05-07 
11:44:11.217 +0430 > LOG:  redir...ess
May 07 11:44:11 localhost.localdomain postmaster[1288]: < 2018-05-07 
11:44:11.217 +0430 > HINT:  Futu...g".
May 07 11:44:12 localhost.localdomain systemd[1]: Started PostgreSQL 9.6 
database server.
Hint: Some lines were ellipsized, use -l to show in full.
[root@localhost ~]# 

但是当我开始并运行声纳时,输出是不同的,主PID继续快速变化:

[root@localhost ~]# systemctl start sonar
[root@localhost ~]# systemctl enable sonar
[root@localhost ~]# systemctl status sonar
● sonar.service - SonarQube service
  Loaded: loaded (/etc/systemd/system/sonar.service; enabled; vendor preset: 
  disabled)
  Active: active (running) since Mon 2018-05-07 13:19:57 +0430; 6s ago
  Process: 121807 ExecStop=/opt/sonarqube/bin/linux-x86-64/sonar.sh stop 
  (code=exited, status=0/SUCCESS)
  Process: 121850 ExecStart=/opt/sonarqube/bin/linux-x86-64/sonar.sh start 
  (code=exited, status=0/SUCCESS)
  ***Main PID: 121893 (wrapper)***
  CGroup: /system.slice/sonar.service
       ├─121893 /opt/sonarqube/bin/linux-x86-64/./wrapper /opt/sonarqube/bin/linux-x86-64/../../conf...
       └─121895 java -Dsonar.wrapped=true -Djava.awt.headless=true -Xms8m - 
       Xmx32m -Djava.library.pat...

       May 07 13:19:56 localhost.localdomain systemd[1]: sonar.service 
       holdoff time over, scheduling restart.
       May 07 13:19:56 localhost.localdomain systemd[1]: Starting SonarQube 
       service...
       May 07 13:19:56 localhost.localdomain sonar.sh[121850]: Starting 
       SonarQube...
       May 07 13:19:56 localhost.localdomain sonar.sh[121850]: PID:
       May 07 13:19:56 localhost.localdomain sonar.sh[121850]: 
       "/opt/sonarqube/bin/linux-x86-64/./wrapper" "...be"
       May 07 13:19:57 localhost.localdomain sonar.sh[121850]: Started 
       SonarQube.
       May 07 13:19:57 localhost.localdomain systemd[1]: Started SonarQube 
       service.
       Hint: Some lines were ellipsized, use -l to show in full.
       [root@localhost ~]# 

上一个命令Main PID: 121893 (wrapper),另一个命令是Main PID: 123382 (wrapper)

[root@localhost ~]# systemctl status sonar
● sonar.service - SonarQube service
Loaded: loaded (/etc/systemd/system/sonar.service; enabled; vendor preset: 
disabled)
Active: active (running) since Mon 2018-05-07 13:21:11 +0430; 3s ago
Process: 123296 ExecStop=/opt/sonarqube/bin/linux-x86-64/sonar.sh stop 
(code=exited, status=0/SUCCESS)
Process: 123339 ExecStart=/opt/sonarqube/bin/linux-x86-64/sonar.sh start 
(code=exited, status=0/SUCCESS)
***Main PID: 123382 (wrapper)***
CGroup: /system.slice/sonar.service
       ├─123382 /opt/sonarqube/bin/linux-x86-64/./wrapper 
       /opt/sonarqube/bin/linux-x86-64/../../conf...
       ├─123384 java -Dsonar.wrapped=true -Djava.awt.headless=true -Xms8m - 
       Xmx32m -Djava.library.pat...
       └─123411 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.161- 
       0.b14.el7_4.x86_64/jre/bin/java -XX:+UseCo...

       May 07 13:21:10 localhost.localdomain systemd[1]: sonar.service 
       holdoff time over, scheduling restart.
       May 07 13:21:10 localhost.localdomain systemd[1]: Starting SonarQube 
       service...
       May 07 13:21:10 localhost.localdomain sonar.sh[123339]: Starting 
       SonarQube...
       May 07 13:21:10 localhost.localdomain sonar.sh[123339]: PID:
       May 07 13:21:10 localhost.localdomain sonar.sh[123339]: 
       "/opt/sonarqube/bin/linux-x86-64/./wrapper" "...be"
       May 07 13:21:11 localhost.localdomain sonar.sh[123339]: Started 
       SonarQube.
       May 07 13:21:11 localhost.localdomain systemd[1]: Started SonarQube 
       service.
       Hint: Some lines were ellipsized, use -l to show in full.

0 个答案:

没有答案