If an error happen during boostrap, the webapp starts but is in a zombie state and the error page is not displayed
Today, if there is an initialisation error in the inventory endpoint webapp or in Rudder webapp, the application container is nonetheless started but the application does not work. That is the expected behaviour (a servlet container may and generally run several application, it won't be good to have an error on one of them to shutdown the whole thing).
But in our case, we have one application container by application, and we manage the full environment. So it would be much much much more easy to diagnosis a boot error for an admin if the whole application was clearly stopped.
Option I see for now:
- a System.exit(Int)
- but that's bad because it brutally stops the servlet container, maybe letting open resources not cleaned
- a container proprietary method (to be investigated for Jetty)
- a syscall to a shell script that call the normal app container shutdown (well, I know, it's ugly, but it's the most configurable for an admin who want to add things for that case and portable and simple)
#1 Updated by François ARMAND over 6 years ago
The ideal case for an admin is be able to:
- run /etc/init.d/theservice start
- see [FAIL] in red
So that should be acheviable, perhaps with some little tweak of the jetty start-stop script.
For jetty, it seems to be allowed to stop ip from a servlet: http://stackoverflow.com/questions/4650713/jetty-stopping-programatically-causes-1-threads-could-not-be-stopped
#5 Updated by François ARMAND 11 months ago
- Subject changed from Error in webapp bootstrap must prevent full application bootstrap to If an error happen during boostrap, the webapp starts but is in a zombie state
- Severity set to Minor - inconvenience | misleading | easy workaround
- User visibility set to Getting started - demo | first install | level 1 Techniques
#6 Updated by François ARMAND 11 months ago
- Severity changed from Minor - inconvenience | misleading | easy workaround to Major - prevents use of part of Rudder | no simple workaround
Making it major, because in fact, it is not easy to understand what goes wrong and what should be done. A lot of first time user get stuck at that point.
#8 Updated by François ARMAND 11 months ago
- Subject changed from If an error happen during boostrap, the webapp starts but is in a zombie state to If an error happen during boostrap, the webapp starts but is in a zombie state and the error page is not displayed
- Priority set to 0
I'm updating the title to convey the other problem: we do have an error page displayed by apache if the webapp is down (answer 500 code or node up), but in the case at hand, we don't even have that page because the application replies, even if it's full of error or without CSS (because of #10430)
#10 Updated by François ARMAND 10 months ago
So, after looking to it with a fresh eyes, the problem is not in Jetty but in Lift, which is shadowing UnavailableException error and does as if everything is ok: https://groups.google.com/forum/#!topic/liftweb/BHYjE5C-kIk
Putting the bootstrap check out of Lift boot() method will do as we want.
#17 Updated by Vincent MEMBRÉ 9 months ago
- Status changed from Pending release to Released