elasticbeanstalk 部署 web 环境失败 /var/pids/web.pid: no such file or directory

问题描述

我想在 AWS Beanstalk 上部署一个 JAVA 应用程序(基于 PlayFramework 1.x)。 我正在使用基于 Corretto 8 的 Web 服务器环境,该环境在 64 位 Amazon Linux 2/3.1.6 上运行。

我还在环境中添加一个负载均衡器。 在部署期间,我的钩子运行良好(例如数据库架构演变),然后是启动 Web 服务器的时候了。

部署失败并出现以下错误

[ERROR] update processes [web cfn-hup Nginx healthd] pid symlinks Failed with error Read pid source file /var/pids/web.pid Failed with error:open /var/pids/web.pid: no such file or directory
[ERROR] An error occurred during execution of command [app-deploy] - [Track pids in healthd]. Stop running the command. Error: update processes [web cfn-hup Nginx healthd] pid symlinks Failed with error Read pid source file /var/pids/web.pid Failed with error:open /var/pids/web.pid: no such file or directory 

我没有为 Nginx 使用任何特定的配置。 我在认端口 (5000) 上运行 JAVA 应用程序。

我在 AWS 论坛和 stackoverflow 上看到有些人在工作环境中遇到了这个问题,但我不使用这种配置。

您遇到过这个问题吗?

解决方法

您的 web.service 无法启动。您可能缺少 jar 中的清单,或者您可能缺少清单文件中的主类。