gpt4 book ai didi

amazon-web-services - 代码部署 : Script at specified location: scripts/stop_server run as user root failed with exit code 1

转载 作者:行者123 更新时间:2023-12-04 14:27:15 29 4
gpt4 key购买 nike

不管我在里面放什么stop_server文件 CodeDeploy 最终出现上述错误。
我什至注释掉了所有行以简化调试,所以现在它看起来像这样

#!/bin/bash
# pkill -f node

我的 appspec.yml :
version: 0.0
os: linux
files:
- source: /app.js
destination: /home/ec2-user/node-website
- source: /package.json
destination: /home/ec2-user/node-website
- source: /public/
destination: /home/ec2-user/node-website/public
- source: /node_modules
destination: /home/ec2-user/node-website/node_modules

permissions:
- object: /
pattern: "**"
owner: ec2-user
group: ec2-user

hooks:
AfterInstall:
- location: scripts/install_dependencies
timeout: 300
runas: ec2-user
#- location: scripts/codestar_remote_access
# timeout: 300
# runas: ec2-user
- location: scripts/start_server
timeout: 300
runas: ec2-user

ApplicationStop:
- location: scripts/stop_server
timeout: 300
runas: ec2-user

任何建议高度赞赏!

最佳答案

当您进行部署时,它实际上会使用您上次成功部署的 ApplicationStop,而不是您当前的部署。我通过删除有问题的应用程序并创建一个新应用程序来解决该问题。

关于amazon-web-services - 代码部署 : Script at specified location: scripts/stop_server run as user root failed with exit code 1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55368103/

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