-
2. Re: How would I enable a 'maintenance page' in Wildfly?
nick.sree Feb 29, 2016 1:57 AM (in response to ctomc)@Tomaz Cerar, does this possible in Wildfly 10.0.0-FInal ? If so can you please give some hint on how to set this ?
-
3. Re: How would I enable a 'maintenance page' in Wildfly?
ctomc Feb 29, 2016 4:31 AM (in response to nick.sree)Yes it is possible
You can set default-response-code for host you are running this on.
something along the lines:
<host name="default-host" alias="localhost" default-response-code="503">
or in cli:
/subsystem=undertow/server=default-server/host=default-host:write-attribute(name=default-response-code, value=503)
and similarly for any other hosts you might have.
-
4. Re: How would I enable a 'maintenance page' in Wildfly?
nick.sree Feb 29, 2016 6:39 AM (in response to ctomc)@Tomaz thanks for the quick reply, does it automatically find 503 page ? where do we have to add the custom 503 page ?
-
5. Re: How would I enable a 'maintenance page' in Wildfly?
darrell.esau Dec 12, 2016 6:55 PM (in response to route_nl)Does this actually work? I'm not having any success in WildFly 10.0.0 Final or in 10.1.0 Final.
I've downloaded 10.1.0 final, edited standalone.xml so it looks like this:
<host name="default-host" default-response-code="503" alias="localhost">
Then - when starting the server, I still receive 404's when accessing the unloaded context.
-
6. Re: How would I enable a 'maintenance page' in Wildfly?
jaikiran Dec 14, 2016 6:26 AM (in response to darrell.esau)How are you starting the server, what command?
-
7. Re: How would I enable a 'maintenance page' in Wildfly?
darrell.esau Dec 14, 2016 3:05 PM (in response to jaikiran)A couple of ways - one through Eclipse using JBoss tools, and one just running standalone.sh from terminal.
(this is on macOS Sierra)
Through Eclipse, I use these arguments:
-mp "/Applications/wildfly/modules" org.jboss.as.standalone -b 0.0.0.0 --server-config=standalone.xml -Djboss.server.base.dir=/Applications/wildfly/standalone
-
8. Re: How would I enable a 'maintenance page' in Wildfly?
jaikiran Dec 15, 2016 6:39 AM (in response to darrell.esau)I see that there are very specific test cases (a couple of them) which verify this very functionality and those tests are passing
wildfly/DefaultResponseCodeAtRootTestCase.java at master · wildfly/wildfly · GitHub
wildfly/DefaultResponseCodeTestCase.java at master · wildfly/wildfly · GitHub
So I believe the functionality is working.
Can you add more details about what URL you are trying to access and how you verify that the context isn't loaded? A curl/wget output to your URL including the response headers would help too.
-
9. Re: How would I enable a 'maintenance page' in Wildfly?
darrell.esau Dec 15, 2016 12:23 PM (in response to jaikiran)It's quite possible I don't understand what this is supposed to be doing, but it seems pretty clear.
My test case for trying to functionality is very straight forward - please correct me if my assumptions aren't correct.
Here's what I did:
1) Download WildFly 10.1.0 Final from the website.
2) Edit standalone.xml, to add a single attribute to the <host> element on line 361. The single attribute added was: default-response-code="503", so the final line is:
<host name="default-host" alias="localhost" default-response-code="503">
3) Save the file, then start WildFly using the standalone.sh script in /bin (with no parameters).
4) After Wildfly is loaded, in a browser, navigate to "http://localhost:8080/blah"
You'll receive a 404 error page - I was expecting to see a 503 error.
-
10. Re: How would I enable a 'maintenance page' in Wildfly?
a-i-ks Feb 23, 2017 8:43 AM (in response to darrell.esau)Darrell Esau schrieb:
You'll receive a 404 error page - I was expecting to see a 503 error.
I've noticed the same behaviour. Could you solve the problem or find an alternative solution for displaying a maintenance page?
-
11. Re: How would I enable a 'maintenance page' in Wildfly?
jaikiran Feb 24, 2017 12:25 AM (in response to a-i-ks)There is a similar question asked in the undertow-dev mailing list recently [undertow-dev] Return HTTP Status 503 (Service Unvailable) until Web Application is available.
You might want to discuss this further in that list undertow-dev Info Page