How to stop Plone 5.2.5? Hitting the shutdown button in de Plone adminpage I get:
Module Products.CMFPlone.controlpanel.browser.maintenance, line 93, in handle_shutdown_action
RuntimeError: No active exception to reraise
There is no start/stop button in the ZMI anymore. So how to stop Zope/Plone? It is a fresh install of Plone 5.2.5. And why is the start/stop button not in the ZMI anymore?
Signal handling is now outside of Zope (in fact, you will get the default signal handling -- which means, the process is terminated on receiving a TERM or INTR signal).
@tkimnguyen
Started from command line with ./bin/plonectl start. I also ran it with ./bin/client fg. Hitting the stop button on the adminpage gives the error in both cases. Had this before with older Plone 5.X versions.
Plone is usually either started in the "foreground" or in the background.
When you start Plone in the "foreground", then CTRL-C stops it. When you start Plone in the background, it is under daemon control and you can stop it with the stop command (which in turn sends SIGTERM).
I got it now. CTRL-C is not enough when running on the foreground. I also have exit the Zope user and su back again to be able to run Plone on the foreground again without "Address already in use". I am used to the stop/start buttons in the ZMI on Plone 4. That always stops nicely both in foreground and background.
After CTR-C a job is still there and kill does not kill it. When I exit the Zope user to root and su back again to Zope the job is gone and I can run Plone in the foreground again. Other solution is to have a second terminal open when running Plone in foreground and use kill -signal_number pid.
Usually, CTRL-C is enough to terminate the process and allow a new start (I just checked this):
ixdm: bin/client1 fg
...
Starting server in PID 9803.
Serving on http://0.0.0.0:9080
^Cixdm: bin/client1 fg
...
Starting server in PID 9825.
Serving on http://0.0.0.0:9080
^Cixdm:
I had seen a case when CTRL-C was not able to stop the process: in this case, the application made use of the signal module to customize signal handling. This worked with Zope 2 but no longer works with Zope 4+.
This is on FreeBSD 13.0. I had it also on older versions of FreeBSD. And it is a fresh Plone install with the official installer. I do not use Linux ore other OS to run Plone.
Same issue on Debian Buster AMD64. Just checked it with a Linux-lxc-container. CTL-C is not enough to kill the job. I have to exit the zope-user, and su back to be able to run Plone in the foreground again.