Я пытаюсь интегрировать Jenkins 2 и SonarQube 6.7.3 в centos 7 из-за этого урока:
https://www.youtube.com/watch?v=osc0j_Z1x0w
Я устанавливаю и настраиваю все программное обеспечение, такое как: java, PostgreSQL, SonarQube, ... Я действительно запутался, как правильно запустить сонар, чтобы иметь возможность открыть панель гидролокатора на Firefox с помощью http://localhost:9000/
, теперь я не могу открыть его потому что служба эхолота не запустилась правильно и 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 ~]#
сонар не может быть открыт в 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 ~]#
но когда я запускаю и запускаю гидролокатор, выходы отличаются, и основной ПИД продолжает быстро меняться:
[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.