我正在将 meteor 项目部署到 beantalk 应用程序,但我收到错误:
Script /opt/elasticbeanstalk/hooks/appdeploy/enact/50start.sh
failed with returncode 1
在/var/log/directory-hooks-executor.log 中我发现:
status: Unknown job: nodejs
Failed to find status of job.
Traceback (most recent call last):
File "/opt/elasticbeanstalk/containerfiles/ebnode.py", line 599, in <module>
main()
File "/opt/elasticbeanstalk/containerfiles/ebnode.py", line 583, in main
nodejs_upstart.start()
File "/opt/elasticbeanstalk/containerfiles/ebnode.py", line 199, in start
raise e
Exception: Failed to run command: None
我正在运行运行 Node.js 的 64 位 Amazon Linux 2014.03 v1.1.0 知道原因吗?
最佳答案
在我的例子中,这个错误是在我将 Json 值作为 ENV 变量传递时产生的。
发生这种情况是因为 Beanstalk 使用“.”将所有环境变量存储在文件/tmp/deployment/config/#etc#init#nodejs.conf 中。
例如:
METEOR_SETTINGS='{ "public": { } }'
将在nodejs.conf中写成
METEOR_SETTINGS="{ "public": { } }"
由于字符串没有正确闭合,所以会产生错误。
关于node.js - 部署到弹性 beantalk 时出错 - 未知作业 : nodejs,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38667155/