gpt4 book ai didi

centos - SonarQube 无法在 CentOS 上启动 : systemd returns (code=exited, status=203/EXEC)

转载 作者:行者123 更新时间:2023-12-04 19:31:57 24 4
gpt4 key购买 nike

关注 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.

最佳答案

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

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

  • 希望 /opt/sonarqube/bin/linux-x86-64/sonar.sh存在,因此请验证该脚本是否标记为可执行。

    关于centos - SonarQube 无法在 CentOS 上启动 : systemd returns (code=exited, status=203/EXEC),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55835294/

    24 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com