<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&#39;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">&lt;<a href="mailto:sdouglas@redhat.com" target="_blank">sdouglas@redhat.com</a>&gt;</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>
&lt;<a href="mailto:thomas.darimont@googlemail.com">thomas.darimont@googlemail.<wbr>com</a>&gt; wrote:<br>
&gt; Hello group,<br>
&gt;<br>
&gt; (coss-post from keycloak-user Mailing List)<br>
&gt;<br>
&gt; the undertow servlet-container is started pretty early during the startup of<br>
&gt; the<br>
&gt; wildfly application server. However the initialization of the keycloak<br>
&gt; server<br>
&gt; application might take a while to complete. Within this period requests that<br>
&gt; are<br>
&gt; sent to the keycloak endpoints result in responses with HTTP Status Code<br>
&gt; 404.<br>
&gt;<br>
&gt; Is it possible to configure undertow to return a HTTP Status Code 503<br>
&gt; (Service Unvailable)<br>
&gt; until the keycloak application startup has completed?<br>
&gt;<br>
&gt; This would ease configuring load-balancers and to avoid showing a file not<br>
&gt; found<br>
&gt; to users during server restarts.<br>
&gt;<br>
&gt; Cheers,<br>
&gt; Thomas<br>
&gt;<br>
</div></div>&gt; ______________________________<wbr>_________________<br>
&gt; undertow-dev mailing list<br>
&gt; <a href="mailto:undertow-dev@lists.jboss.org">undertow-dev@lists.jboss.org</a><br>
&gt; <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>