我遵循从7.3升级到7.9.1 LTS的标准过程。但是无法运行7.9.1
SonarQube的日志目录中未生成日志
$ sudo systemctl status sonarqube.service
sonarqube.service - SonarQube service
Loaded: loaded (/etc/systemd/system/sonarqube.service; enabled; vendor preset
Active: failed (Result: start-limit-hit) since Thu 2019-08-22 06:18:25 UTC; 2
Process: 61751 ExecStop=/opt/sonarqube/sonarqube-7.9.1/bin/linux-x86-64/sonar.
Process: 61685 ExecStart=/opt/sonarqube/sonarqube-7.9.1/bin/linux-x86-64/sonar
Main PID: 3206 (code=exited, status=0/SUCCESS)
Aug 22 06:18:25 sonarQubeServer systemd[1]: sonarqube.service: Service hold-off
Aug 22 06:18:25 sonarQubeServer systemd[1]: sonarqube.service: Scheduled restart
Aug 22 06:18:25 sonarQubeServer systemd[1]: Stopped SonarQube service.
Aug 22 06:18:25 sonarQubeServer systemd[1]: sonarqube.service: Start request rep
Aug 22 06:18:25 sonarQubeServer systemd[1]: sonarqube.service: Failed with resul
Aug 22 06:18:25 sonarQubeServer systemd[1]: Failed to start SonarQube service.
$ ls /opt/sonarqube/sonarqube-7.9.1/logs/
README.txt
$ cat /etc/systemd/system/sonarqube.service
[Unit]
Description=SonarQube service
After=syslog.target network.target
[Service]
Type=forking
ExecStart=/opt/sonarqube/sonarqube-7.9.1/bin/linux-x86-64/sonar.sh start
ExecStop=/opt/sonarqube/sonarqube-7.9.1/bin/linux-x86-64/sonar.sh stop
User=sonarqube
Group=sonarqube
Restart=always
[Install]
WantedBy=multi-user.target
$ cat /opt/sonarqube/sonarqube-7.9.1/conf/wrapper.conf | grep java.command
#wrapper.java.command=/path/to/my/jdk/bin/java
#wrapper.java.command=java
wrapper.java.command=/usr/lib/jvm/java-11-openjdk-amd64/bin/java
$ sudo systemctl status -l sonarqube.service
● sonarqube.service - SonarQube service
Loaded: loaded (/etc/systemd/system/sonarqube.service; enabled; vendor preset
Active: failed (Result: start-limit-hit) since Fri 2019-08-23 13:42:58 UTC; 4
Process: 2694 ExecStop=/opt/sonarqube/sonarqube-7.9.1/bin/linux-x86-64/sonar.s
Process: 2598 ExecStart=/opt/sonarqube/sonarqube-7.9.1/bin/linux-x86-64/sonar.
Aug 23 13:42:58 sonarQubeServer systemd[1]: sonarqube.service: Service hold-off
Aug 23 13:42:58 sonarQubeServer systemd[1]: sonarqube.service: Scheduled restart
Aug 23 13:42:58 sonarQubeServer systemd[1]: Stopped SonarQube service.
Aug 23 13:42:58 sonarQubeServer systemd[1]: sonarqube.service: Start request rep
Aug 23 13:42:58 sonarQubeServer systemd[1]: sonarqube.service: Failed with resul
Aug 23 13:42:58 sonarQubeServer systemd[1]: Failed to start SonarQube service.
lines 1-12/12 (END)
答案 0 :(得分:0)
对我来说,我必须安装Java。
sudo apt install openjdk-8-jre-headless