[undertow-dev] Return HTTP Status 503 (Service Unvailable) until Web Application is available.

Thomas Darimont thomas.darimont at googlemail.com
Mon Jan 30 16:44:07 EST 2017


Hi Stuart,

thanks for the reply - I got a similar tip on the keycloak-user list
however if I configure the default-response-code=503
on the (single) host element of the undertow subsystem in Wildfly (10.1.0)
and restart the server then I get a
404 but never a 503 when I access paths of an web app (keycloak) that is
not fully initialized yet.

Seems that I'm seeing the same behaviour as those folks:
https://developer.jboss.org/thread/257526

Is there anything else that one needs to configure to make this work?

In the meantime I played a bit with alternative approaches e.g.:
https://github.com/thomasdarimont/undertow-extensions

Cheers,
Thomas

2017-01-30 22:09 GMT+01:00 Stuart Douglas <sdouglas at redhat.com>:

> You can add the default-response-code attribute in the host element of
> the undertow subsystem to make it return 503 by default.
>
> Stuart
>
> On Mon, Jan 30, 2017 at 9:34 PM, Thomas Darimont
> <thomas.darimont at googlemail.com> wrote:
> > Hello group,
> >
> > (coss-post from keycloak-user Mailing List)
> >
> > the undertow servlet-container is started pretty early during the
> startup of
> > the
> > wildfly application server. However the initialization of the keycloak
> > server
> > application might take a while to complete. Within this period requests
> that
> > are
> > sent to the keycloak endpoints result in responses with HTTP Status Code
> > 404.
> >
> > Is it possible to configure undertow to return a HTTP Status Code 503
> > (Service Unvailable)
> > until the keycloak application startup has completed?
> >
> > This would ease configuring load-balancers and to avoid showing a file
> not
> > found
> > to users during server restarts.
> >
> > Cheers,
> > Thomas
> >
> > _______________________________________________
> > undertow-dev mailing list
> > undertow-dev at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/undertow-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/undertow-dev/attachments/20170130/5540d12d/attachment.html 


More information about the undertow-dev mailing list