2013-03-08 182 views
3

有时它看起来像一个Plone站点的bin /实例启动失败。症状Plone bin /实例启动和bin /实例重启失败有时

  • 该网站已经运行了一段时间没有维护

  • 一个运行扩建:bin/buildout

  • 当一个人试图用bin/instance startbin/instance restart

  • 该网站重新启动网站没有开始。什么都不记录到控制台。

  • 但是,如果运行bin/instance fg第一的网站确实开始

这影响的Plone 3.x和4.x版的Plone网站。

下面是一个过程如何进行的示例。你可以看到,该网站并没有真正启动,尽管给予重新开始,但最后还是想出了FG:

*************** /PICKED VERSIONS *************** 
[email protected]:/srv/plone/zzz$ bin/instance restart 
. 
daemon process restarted, pid=27819 
[email protected]:/srv/plone/zzz$ bin/instance start 

daemon process started, pid=27945 
[email protected]:/srv/plone/zzz$ bin/instance status 
daemon manager not running 
[email protected]:/srv/plone/zzz$ bin/instance fg 
2013-03-08 04:18:11 INFO ZServer HTTP server started at Fri Mar 8 04:18:11 2013 
    Hostname: 0.0.0.0 
    Port: xxxx 

从日志文件,它看起来像它已经达到了Zope的开始。虽然bin/instance状态或上游前端代理服务器都不同意。你在日志中看到这个。

2013-03-08T04:19:21 INFO Zope Ready to handle requests 

任何想法如何进一步调试?

它可能是某种竞争条件/慢启动问题?

难道过程后Ready to handle

有其他人obeserved相同的行为默默地死去?

+0

我们在这里看到类似的行为,并同意它似乎是某种时间问题。 再加上重启可能会崩溃(!),如果在此期间发生了新的扩展,我们已经决定使用'stop;睡2;开始'这对我们很好。 – 2013-03-08 06:50:26

回答

5

如果bin/buildout重建实例,那么它也会删除并重新构建parts/instance目录。

这是一个目录,它包含几个项目,使bin/instance restart失败;管理重启的守护进程本身不再完整。

您需要使用bin/instance stop停止实例的daemonizing过程,随后bin/instance start(这将创建一个全新的守护进程)。

+0

...但是,你可以做的更好的事情是使用supervirsor,然后“bin/supervisorctl restart” – 2013-03-08 11:59:14

+0

@keul:当然,但请注意,潜在的'supervisord'可能会遭受同样的命运。我还没有遇到过,但我怀疑如果你将套接字存储在''parts'子目录中,你可能会把'supervisord'状态搞得一团糟。 :-) – 2013-03-08 12:03:25

+0

你确定吗?我从来没有使用supervisor来解决这个问题......但可能是因为我们配置主管在我们调用重启时执行stop&start! – 2013-03-08 13:08:38