Custom error pages for Jetty

31 views
Skip to first unread message

Alain Picard

unread,
Dec 6, 2022, 7:32:23 AM12/6/22
to OPS4J
When starting our server we first use nginx to supply custom error pages while the service is not yet reachable.

The we have a short time window where we are seeing some Jetty 404 or 503 at startup time. Once the service/app is fully started, our custom whiteboard managed error pages will be served.

We want to provide custom error pages to replace the Jetty ones here that appear early in the startup process.

What is the best way? Do we need to use WebContainer#registerErrorPage

Cheers,
Alain

Grzegorz Grzybek

unread,
Dec 6, 2022, 9:34:41 AM12/6/22
to op...@googlegroups.com
Hello

That's the registration of whiteboard managed error pages (Whiteboard refers to HttpService/WebContainer). That's OSGi and you can't have immediate error pages... After the container is started (pax-web-jetty / pax-web-tomcat / pax-web-undertow) there's short period of time where the other parts (like pax-web-extender-whiteboard or pax-web-extender-war) is doing some tracking/discovery work), so you can't effectively avoid a minimal delay...

Doesn't NGinx have some healthcheck mechanism for the backend? I don't think you can do anything at OSGi side...

regards
Grzegorz Grzybek
 

Cheers,
Alain

--
--
------------------
OPS4J - http://www.ops4j.org - op...@googlegroups.com

---
You received this message because you are subscribed to the Google Groups "OPS4J" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ops4j+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ops4j/99e7e776-3b4d-4d70-9694-da31bd0a872an%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages