Announcements
This site is in read only until July 22 as we migrate to a new platform; refer to this community post for more details.
Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

AppEngine Standard: jetty's "Ambiguous URI path separator" error start occurring intermittently

I'm running a long-life webapp since 2013 on AppEngine Standard(legacy bundle) and recently have noticed that jetty's Dispatcher randomly raise "IllegalStateException: Ambiguous URI path separator". It happens randomly and I suspect some instance is executing new version of jetty which would cause this error. Here comes a stack trace for your further investigation:

java.lang.IllegalStateException: Ambiguous URI path separator
at org.eclipse.jetty.ee8.nested.Dispatcher.checkUriViolations(Dispatcher.java:195)
at org.eclipse.jetty.ee8.nested.Dispatcher.forward(Dispatcher.java:140)
at org.eclipse.jetty.ee8.nested.Dispatcher.forward(Dispatcher.java:114)

This exception happened when you call  RequestDispatcher#forward(request,response) where the path to dispatch is "/tenant/admin/index.vm". (Dispatching to Velocity Servlet).

Obviously the path does not include any url-encoded parts and should be dispatched normally.

 

 

Would appreciate if someone could look at this problem or give me some workaround etc..

Thanks

Mitsu

0 2 375
2 REPLIES 2

Hi @miztaka,

Welcome to Google Cloud Community!

Could you confirm the versions of (1) your current Java runtime and (2) Jetty? The error Ambiguous URI path separator  could probably be linked to certain issues happening in a specific version of Jetty. It can also be due to certain conflicts coming from a newer version of Jetty that has stricter implementation of URI mapping.

To initially troubleshoot this, you can try the following ways:

  • Inspect the release notes from Google App Engine (GAE) Standard for any related updates concerning Jetty since it’s correct that GAE periodically switches to a newer version of Jetty.
  • Examine the logs explorer linked to your deployed GAE service to gather more information about the error you encountered.

Also note that if you’re using a legacy Java runtime version, it’s recommended to consider migrating to the second generation of Java Runtime. Preferably it’s best to be in the latest version of Java Runtime.

If the issue persists, suspected issues like this are best brought up to an App Engine specialist through a Google Cloud support. This will help open up an investigation to the issue you’re experiencing to see if there are any potential bugs that could be identified.

Was this helpful? If so, please accept this answer as “Solution”. If you need additional assistance, reply here within 2 business days and I’ll be happy to help.

Hi @KyleMari, thanks for your response. My app is running on gen2 java17 and I assume jetty version of java17 runtime is 9.4 according to this document.
https://cloud.google.com/appengine/docs/standard/java-gen2/upgrade-java-runtime#java_runtime_compati...

However I can observe that some of my instances are running jetty-12 which causes BREAKING change.

jetty-12.png

Please do not update jetty version without backward compatibility unless being announced.
I expect all of my java17 instances are running jetty 9.4.
My customer faces significant errors and influences to their business.

Thanks
Mitsu

Top Solution Authors