<div dir="ltr">Hi Stuart,<div><br></div><div>thanks for the reply - I got a similar tip on the keycloak-user list however if I configure the default-response-code=503</div><div>on the (single) host element of the undertow subsystem in Wildfly (10.1.0) and restart the server then I get a </div><div>404 but never a 503 when I access paths of an web app (keycloak) that is not fully initialized yet.</div><div><br></div><div>Seems that I'm seeing the same behaviour as those folks:</div><div><a href="https://developer.jboss.org/thread/257526">https://developer.jboss.org/thread/257526</a><br></div><div><br></div><div>Is there anything else that one needs to configure to make this work?</div><div><br></div><div>In the meantime I played a bit with alternative approaches e.g.: <a href="https://github.com/thomasdarimont/undertow-extensions">https://github.com/thomasdarimont/undertow-extensions</a></div><div><br></div><div>Cheers,</div><div>Thomas</div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-01-30 22:09 GMT+01:00 Stuart Douglas <span dir="ltr"><<a href="mailto:sdouglas@redhat.com" target="_blank">sdouglas@redhat.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">You can add the default-response-code attribute in the host element of<br>
the undertow subsystem to make it return 503 by default.<br>
<br>
Stuart<br>
<div><div class="h5"><br>
On Mon, Jan 30, 2017 at 9:34 PM, Thomas Darimont<br>
<<a href="mailto:thomas.darimont@googlemail.com">thomas.darimont@googlemail.<wbr>com</a>> wrote:<br>
> Hello group,<br>
><br>
> (coss-post from keycloak-user Mailing List)<br>
><br>
> the undertow servlet-container is started pretty early during the startup of<br>
> the<br>
> wildfly application server. However the initialization of the keycloak<br>
> server<br>
> application might take a while to complete. Within this period requests that<br>
> are<br>
> sent to the keycloak endpoints result in responses with HTTP Status Code<br>
> 404.<br>
><br>
> Is it possible to configure undertow to return a HTTP Status Code 503<br>
> (Service Unvailable)<br>
> until the keycloak application startup has completed?<br>
><br>
> This would ease configuring load-balancers and to avoid showing a file not<br>
> found<br>
> to users during server restarts.<br>
><br>
> Cheers,<br>
> Thomas<br>
><br>
</div></div>> ______________________________<wbr>_________________<br>
> undertow-dev mailing list<br>
> <a href="mailto:undertow-dev@lists.jboss.org">undertow-dev@lists.jboss.org</a><br>
> <a href="https://lists.jboss.org/mailman/listinfo/undertow-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/<wbr>mailman/listinfo/undertow-dev</a><br>
</blockquote></div><br></div>