SonarQube не может запуститься в CentOS: systemd возвращает (код = выход, статус = 203 / EXEC) - PullRequest
0 голосов
/ 24 апреля 2019

После https://www.vultr.com/docs/how-to-install-sonarqube-on-centos-7 для установки SonarQube на моем CentOS.Когда я пытаюсь запустить SonarQube через sudo systemctl start sonar, выдается следующее сообщение об ошибке:

Job for sonar.service failed because the control process exited with error code. See "systemctl status sonar.service" and "journalctl -xe" for details.

Вывод статуса systemctl sonar.service:

sonar.service - SonarQube service
   Loaded: loaded (/etc/systemd/system/sonar.service; disabled; vendor preset: disabled)
   Active: failed (Result: start-limit) since Wed 2019-04-24 16:56:39 UTC; 19s ago
  Process: 23573 ExecStart=/opt/sonarqube/bin/linux-x86-64/sonar.sh start (code=exited, status=203/EXEC)

Apr 24 16:56:39 ip-172-31-13-96.ap-south-1.compute.internal systemd[1]: sonar.service: control process exited, code=exited status=203
Apr 24 16:56:39 ip-172-31-13-96.ap-south-1.compute.internal systemd[1]: Failed to start SonarQube service.
Apr 24 16:56:39 ip-172-31-13-96.ap-south-1.compute.internal systemd[1]: Unit sonar.service entered failed state.
Apr 24 16:56:39 ip-172-31-13-96.ap-south-1.compute.internal systemd[1]: sonar.service failed.
Apr 24 16:56:39 ip-172-31-13-96.ap-south-1.compute.internal systemd[1]: sonar.service holdoff time over, scheduling restart.
Apr 24 16:56:39 ip-172-31-13-96.ap-south-1.compute.internal systemd[1]: start request repeated too quickly for sonar.service
Apr 24 16:56:39 ip-172-31-13-96.ap-south-1.compute.internal systemd[1]: Failed to start SonarQube service.
Apr 24 16:56:39 ip-172-31-13-96.ap-south-1.compute.internal systemd[1]: Unit sonar.service entered failed state.
Apr 24 16:56:39 ip-172-31-13-96.ap-south-1.compute.internal systemd[1]: sonar.service failed.

Вывод journalctl -xe:

Apr 24 16:56:39 ip-172-31-13-96.ap-south-1.compute.internal systemd[1]: Starting SonarQube service...
-- Subject: Unit sonar.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit sonar.service has begun starting up.
Apr 24 16:56:39 ip-172-31-13-96.ap-south-1.compute.internal systemd[23573]: Failed at step EXEC spawning /opt/sonarqube/bin/linux-x86-64/sona
-- Subject: Process /opt/sonarqube/bin/linux-x86-64/sonar.sh could not be executed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- The process /opt/sonarqube/bin/linux-x86-64/sonar.sh could not be executed and failed.
--
-- The error number returned by this process is 2.
Apr 24 16:56:39 ip-172-31-13-96.ap-south-1.compute.internal systemd[1]: sonar.service: control process exited, code=exited status=203
Apr 24 16:56:39 ip-172-31-13-96.ap-south-1.compute.internal systemd[1]: Failed to start SonarQube service.
-- Subject: Unit sonar.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit sonar.service has failed.
--
-- The result is failed.
Apr 24 16:56:39 ip-172-31-13-96.ap-south-1.compute.internal systemd[1]: Unit sonar.service entered failed state.
Apr 24 16:56:39 ip-172-31-13-96.ap-south-1.compute.internal systemd[1]: sonar.service failed.
Apr 24 16:56:39 ip-172-31-13-96.ap-south-1.compute.internal systemd[1]: sonar.service holdoff time over, scheduling restart.
Apr 24 16:56:39 ip-172-31-13-96.ap-south-1.compute.internal systemd[1]: start request repeated too quickly for sonar.service
Apr 24 16:56:39 ip-172-31-13-96.ap-south-1.compute.internal systemd[1]: Failed to start SonarQube service.
-- Subject: Unit sonar.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit sonar.service has failed.
--
-- The result is failed.
Apr 24 16:56:39 ip-172-31-13-96.ap-south-1.compute.internal systemd[1]: Unit sonar.service entered failed state.
Apr 24 16:56:39 ip-172-31-13-96.ap-south-1.compute.internal systemd[1]: sonar.service failed.

1 Ответ

0 голосов
/ 24 апреля 2019

status=203/EXEC означает, что systemd не может выполнить ExecStart скрипт. Наиболее «популярные» причины:

  • неверный путь к скрипту
  • скрипт имеет недопустимые разрешения:
    • Пользователь службы не имеет прав на чтение скрипта
    • скрипт не помечен как исполняемый

Я надеюсь, что /opt/sonarqube/bin/linux-x86-64/sonar.sh существует, поэтому убедитесь, что скрипт помечен как исполняемый.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...