【问题标题】:Stderr:Failed to restart eb-app.target: Unit not foundStderr:无法重新启动 eb-app.target:未找到单元
【发布时间】:2021-10-26 09:01:30
【问题描述】:

由于已弃用,我需要升级我的 AWS EBS 平台。因此,我在 AWS Elastic Beanstalk 中使用我的 nodejs 应用程序尝试了新的支持环境。创建环境后,其状态为Severe。所以我查看了 EBS 日志。它显示以下错误状态

[ERROR] An error occurred during execution of command [restart-app-server] - [RestartAppServer]. Stop running the command. Error: Restart Target Failure: restarting target eb-app failed: Command /bin/sh -c systemctl restart eb-app.target failed with error exit status 5. Stderr:Failed to restart eb-app.target: Unit not found

我查看了 EBS EC2 实例并尝试使用以下命令重新启动应用服务器

/bin/sh -c systemctl restart eb-app.target

然后我使用以下命令检查状态

/bin/sh -c systemctl status eb-app.target

但它就像退出了。

我快速浏览了 eb-engine.log。它的显示

[ERROR] An error occurred during execution of command [app-deploy] - [Install customer specified node.js version]. Stop running the command. Error: the node.js version range 10.16.0 is not available for this platform. Please choose a version matching one of the following: [v12.0.0 v12.1.0 v12.2.0 v12.3.0 v12.3.1 v12.4.0 v12.5.0 v12.6.0 v12.7.0 v12.8.0 v12.8.1 v12.9.0 v12.9.1 v12.10.0 v12.11.0 v12.11.1 v12.12.0 v12.13.0 v12.13.1 v12.14.0 v12.14.1 v12.15.0 v12.16.0 v12.16.1 v12.16.2 v12.16.3 v12.17.0 v12.18.0 v12.18.1 v12.18.2 v12.18.3 v12.18.4 v12.19.0 v12.19.1 v12.20.0 v12.20.1 v12.20.2 v12.21.0 v12.22.0 v12.22.1 v12.22.2 v12.22.3] 

但我已经在 package.json 中更改了 nodejs 版本,如下链接所示。

nodejs version updation

谁能告诉我为什么它会这样?

【问题讨论】:

    标签: linux amazon-web-services amazon-elastic-beanstalk


    【解决方案1】:

    尝试列出 eb-target:

    sudo systemctl list-unit-files | grep -i eb
    

    现在在您的 eb 目标上应用重启。

    【讨论】:

      猜你喜欢
      • 2021-10-08
      • 2020-01-02
      • 2019-08-20
      • 1970-01-01
      • 1970-01-01
      • 2021-11-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多