【发布时间】:2022-03-19 23:02:34
【问题描述】:
这是我第一次使用 AWS。我有一个来自 github 的 nodejs/typescript 设置。它经历了代码管道的两个阶段
-
构建:我使用
buildspec.yml文件构建打字稿文件并将其转储到 S3 存储桶中。这是buildspect.yml的内容。
version: 0.2
phases:
install:
commands:
- "npm install"
build:
commands:
- "npm run build"
artifacts:
files:
- "dist*/*"
discard-paths: yes
还有我的package.json
{
"name": "aws-install",
"version": "1.0.0",
"description": "",
"main": "./dist/app.js",
"scripts": {
"build": "tsc",
"start": "node ./dist/app.js"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"@types/express": "^4.17.11",
"@types/node": "^14.14.35",
"express": "^4.17.1",
"mongodb": "^3.6.5",
"nodemon": "^2.0.7",
"typescript": "^4.2.3"
},
"devDependencies": {},
"engines": {
"node": "14.15.0"
}
}
- 部署:部署阶段是 Elastic Beanstalk 的事情。我相信它应该获取构建的输出并部署到 EC2 实例。我不认为这是正在发生的事情。它给出了以下错误。
这是我的一般设置的样子
日志 我下载了完整的日志,发现了更多关于错误的详细信息
\var\log\eb-engine.log
2021/03/24 10:05:10.373225 [ERROR] update processes [web nginx cfn-hup 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
2021/03/24 10:05:10.373235 [ERROR] An error occurred during execution of command [app-deploy] - [Track pids in healthd]. Stop running the command. Error: update processes [web nginx cfn-hup 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
我真的不知道在这里还能做什么。先谢谢各位了
【问题讨论】:
-
您能否查看
/var/log/cfn-init-cmd.log了解更详细的错误? -
没什么奇怪的。你想让我把我在那里的东西贴出来吗?
-
您找到解决方案了吗?我面临同样的问题。
-
不,我没有。我已经在 Heroku 上部署了这个项目,因为我无法通过这个。
-
我遇到了同样的问题。就我而言,build 说没问题,就像它成功一样,但事实并非如此。在某个步骤上,我得到了 nuget 包构建和发布,但它失败了,构建到最后说它是成功的,而实际上它不是。
标签: amazon-web-services amazon-ec2 amazon-elastic-beanstalk aws-codepipeline