SonarQube无法启动CentOS:systemd返回(代码=退出,状态= 203 / EXEC)

问题描述 投票:0回答:1

https://www.vultr.com/docs/how-to-install-sonarqube-on-centos-7在我的CentOS上安装SonarQube。当我试图通过sudo systemctl start sonar启动SonarQube时,它给出了以下错误:

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

输出systemctl status 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.
centos sonarqube startup
1个回答
0
投票

status=203/EXEC意味着systemd无法执行ExecStart脚本。最“流行”的原因是:

  • 脚本路径不正确
  • 脚本具有无效权限: 服务用户没有读取脚本的权限 脚本未标记为可执行文件

我希望/opt/sonarqube/bin/linux-x86-64/sonar.sh存在,所以请验证脚本是否标记为可执行文件。

© www.soinside.com 2019 - 2024. All rights reserved.