Lift 503's in Heroku with embedded jetty

18 views
Skip to first unread message

Joe Barnes

unread,
Jan 31, 2016, 4:06:30 PM1/31/16
to Lift
Please check any Lift apps you have running in Heroku if you are using embedded jetty.  Several of my apps went down this week, all returning 503 from jetty.  Long story short, if you web.xml's DOCTYPE is the old http://java.sun.com/dtd/web-app_2_3.dtd URL, the container redirects that request over the maximum of 20 times and your app will fail to start.

The quick fix is the remove the DOCTYPE line from your web.xml.  Once we figure out the root cause of the problem, I'll post back here.

Joe

Joe Barnes

unread,
Feb 1, 2016, 3:54:17 PM2/1/16
to Lift
The folks at Heroku did some more investigation of this issue.  When the URL is resolved for the web.xml schema document, Oracle replies with a 302 with a URL that then replies 302 to itself.  Any other environment we have tried does not have this problem.  It's possible that oracle is doing special handling for Heroku IP addresses.  Who knows why, but that seems to be the behavior.

Regardless of that weirdness, updating the schema definition to the servlet 3.0 document works great.  All of our starter kits still reference the old servlet standard.  Perhaps this is a good time to consider updating all of them to 3.0.  I'm unaware of the ramifications this may cause, however.

You can take a look at one of my web.xml files here.

Joe
Reply all
Reply to author
Forward
0 new messages