當我AWSCodeDeploy創建一個新的部署與GitHub上我收到這個失敗Codedeploy代理錯誤消息:在亞馬遜的Linux實例中運行時
Error CodeScriptFailed
Script Namescripts/stop_server.sh
MessageScript at specified location: scripts/stop_server.sh run as user ubuntu failed with exit code 1
Log TailLifecycleEvent - ApplicationStop
Script - scripts/stop_server.sh
[stderr]su: user ubuntu does not exist
但是,我的例子是一個Amazon Linux實例並沒有一個ubuntu
用戶,任何人都知道這件事?
一個嘗試運行的腳本是:
# scripts/stop_server.sh
#!/bin/bash
forever stop .
我appspec.yml文件:
version: 0.0
os: linux
files:
- source:/
destination: /home/ec2-user
hooks:
AfterInstall:
- location: scripts/install_dependencies.sh
timeout: 5
runas: root
ApplicationStart:
- location: scripts/start_server.sh
timeout: 5
runas: root
ApplicationStop:
- location: scripts/stop_server.sh
timeout: 5
runas: root
Codedeploy代理版本agent_version: OFFICIAL_1.0-1.1095_rpm
嗨@Ravi很抱歉很久沒有回覆你了。 感謝您的幫助。 我解決了刪除具有問題的應用程序並創建一個新問題的問題。我相信這個問題是無情的,ApplicationStop鉤子。 –