“/postinstall”失败,返回代码[Timeout]

2024-09-25 00:36:21 发布

您现在位置:Python中文网/ 问答频道 /正文

当我运行“dotcloud push traing”时。。。运行安装后脚本需要很长时间,并出现以下错误。 我创建了一个新帐户。 cd到project并运行命令:“dotcloud create training”和“dotcloud push training”,但没有任何更改。
有人能帮我吗?plz公司

Running postinstall script...
ERROR: deployment aborted due to unexpected command result: "./postinstall" failed with return code [Timeout]

安装后

^{pr2}$

在要求.txt在

Django==1.4
PIL==1.1.7

Tags: 命令project脚本错误createtrainingcd公司
2条回答

试着把这个当作你的挂件。它可能有助于定位错误(扩展Ken的建议):

#!/bin/bash
# set -e makes the script exit on the first error
set -e
# set -x will add debug trace information to all of your commands
set -x

echo "$0 starting"

#python createdb.py

python training/manage.py syncdb  noinput
python mkadmin.py
mkdir -p /home/dotcloud/data/media /home/dotcloud/volatile/static
python training/manage.py collectstatic  noinput

echo "$0 complete"

有关更多调试信息,请访问http://tldp.org/LDP/Bash-Beginners-Guide/html/sect_02_03.html

任何错误消息,如“../postinstall failed with return code”(postinstall失败,返回代码)都表示posinstall脚本有问题。在

为了在dotCloud上轻松调试安装后执行,可以执行以下操作:

假设你的应用程序是“拉面”,你的服务是“www”。在

$ dotcloud -A ramen run www
> ~/current/postinstall

它将重新执行postinstall,但这次是从您的会话执行的,因此您可以轻松地更新postinstall代码并重新运行它,而不必一次又一次地推送。在

一旦找到了根本原因,就在本地修复它并重新发布应用程序。在

相关问题 更多 >