【发布时间】:2023-03-27 05:04:01
【问题描述】:
我正在尝试通过我的 elasticbeanstalk 堆栈中的 .ebextensions 安装应用程序。我在这里关注了advanced environment customization 的文档。这是我的配置:
files:
"/tmp/software.sh" :
mode: "000755"
owner: root
group: root
content: |
#!/bin/bash
wget https://website.net/software/software-LATEST-1.x86_64.rpm
software-LATEST-1.x86_64.rpm
sed -i -e '$a\
*.* @@127.0.0.1:1514;RSYSLOG_FileFormat' /etc/rsyslog.conf
/sbin/service rsyslog restart
/sbin/service software start
container_commands:
01_run:
command: "/tmp/software.sh"
应用配置时,即使我指向 /sbin/service.我尝试了很多不同的东西,但我总是得到这个错误。在主机上手动运行脚本没有任何问题。
堆栈使用的映像是 Amazon Linux release 2 (Karoo)
具体报错信息为:
[3744211/3744211]\n\n/tmp/[01;31m[Kalert[m[K_software.sh: line 8: service: command not found\n/tmp/[01;31m[Kalert[m[K_software.sh: line 9: service: command not found. \ncontainer_command 02_run in .eb[01;31m[Kextensions[m[K/[01;31m[Kalert[m[K-software.config failed. For more detail, check /var/log/eb-activity.log using console or EB CLI","returncode":127,"events":
【问题讨论】:
标签: amazon-web-services amazon-elastic-beanstalk