17217
Reporter: mdoering
Type: Bug
Summary: metrics not returning 404 but 500
Priority: Major
Status: Reopened
Created: 2015-02-12 15:20:08.13
Updated: 2015-02-13 11:11:51.655
Description: This should return a 404:
http://apps2.gbif.org:9010/occurrence/counts
http://api.gbif.org/v1/occurrence/counts]]>
Author: trobertson@gbif.org
Created: 2015-02-12 16:26:47.177
Updated: 2015-02-12 16:26:47.177
Does this surface anywhere to warrant it being critical?
It hints at Servlet API mismatches between the container and the version expected by the Jersey framework.
Author: trobertson@gbif.org
Created: 2015-02-12 16:32:32.656
Updated: 2015-02-12 16:32:32.656
Logs are showing
{code}
java.lang.NoSuchMethodError: javax.servlet.http.HttpServletRequest.isAsyncStarted()Z
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:684) ~[metrics-ws-0.19.jar:0.19]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) ~[metrics-ws-0.19.jar:0.19]
{code}
Looks like the container must be providing a 2.x version.
Author: fmendez@gbif.org
Comment: ah ok...someone found this: https://github.com/gbif/c-deploy/blob/master/services/roles/varnish/templates/default.vcl#L107...which means that this happens with other patterns like http://api.gbif.org/v1/occurrence/dataset*, ../publishing*, etc. too
Created: 2015-02-12 22:29:14.127
Updated: 2015-02-12 22:29:14.127
Author: fmendez@gbif.org
Comment: https://github.com/gbif/c-deploy/commit/437a6cbf01695d1f1101c6e2e1115062e9831a35 implements a more accurate expression to evaluate url patterns served by metrics-ws
Created: 2015-02-13 00:15:11.862
Updated: 2015-02-13 00:15:11.862
Author: mdoering@gbif.org
Comment: Good quick fix in VCL, but I think this should be done in the metrics service returning a 404 for non existing URLs instead of 500 errors. It is not critical for sure
Created: 2015-02-13 11:11:17.411
Updated: 2015-02-13 11:11:51.648