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

SonarQube无法在CentOS上启动:systemd返回(代码=退出,状态=203/EXEC),centos,sonarqube,startup,Centos,Sonarqube,Startup,下面是在我的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 statu

下面是在我的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
存在,因此请验证脚本是否标记为可执行。

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

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

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

我也有这个问题,您是如何解决的?在我的例子中,ExecStart命令能够在terminalI中成功运行也有这个问题,您是如何解决的?在我的例子中,ExecStart命令能够在终端中成功运行