问题
Sometimes it looks like bin/instance start fails for a Plone site. Symptoms
The site has been running for a while without maintenance
One runs buildout:
bin/buildout
One tries to restart the site using
bin/instance start
orbin/instance restart
The site doesn't start. Nothing is logged to console.
However, if you run
bin/instance fg
first the site does start
This affects both Plone 3.x and Plone 4.x sites.
Below is a sample how the process goes. You can see that the site doesn't really start despite of giving restart and start, but finally comes up with fg:
*************** /PICKED VERSIONS ***************
xxx@yyy:/srv/plone/zzz$ bin/instance restart
.
daemon process restarted, pid=27819
xxx@yyy:/srv/plone/zzz$ bin/instance start
daemon process started, pid=27945
xxx@yyy:/srv/plone/zzz$ bin/instance status
daemon manager not running
xxx@yyy:/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
From log file it looks like it has reached the Zope start. Though both bin/instance status or upstream front end proxy server disagree. You see this in the logs.
2013-03-08T04:19:21 INFO Zope Ready to handle requests
Any ideas how to debug this further?
Could it be some sort of race condition / slow start up issue?
Could it be that the process silently dies after Ready to handle
Have other people obeserved the same behavior?
回答1:
If bin/buildout
rebuilds the instance, then it'll also remove and re-build the parts/instance
directory.
It's that directory that holds a few items that make a bin/instance restart
fail; the daemon process that manages the restart is itself no longer complete.
You need to use bin/instance stop
to stop the instance and the daemonizing process, followed by a bin/instance start
(which creates a fresh new daemon process).
来源:https://stackoverflow.com/questions/15285766/plone-bin-instance-start-and-bin-instance-restart-fail-sometimes