Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-dev] NPE on PushCacheFilter

hi Simone,
you were right, I removed everything from WEB-INF/lib and added --lib=lib/jetty-servlets-9.3.0.v20150612.jar to start.ini and the filter now works.

Should such dependency be part of the http2 module?


Beside that, I am still not observing any noticeable performance improvement by using HTTP2.

I have enabled the filter and its debug logging and I see some interesting behaviour:

1) most requests arrive without a referrer thus making it impossible for the PushCacheFilter to create associations (Chrome  43.0.2357.132 m):

(With caching enabled)

15:10:00.233|DEBUG|  o.e.j.s.PushCacheFilter|| GET /js/lib/gridx/gridx/nls/grid-all_en-us.js referrer=null conditional=true
15:10:00.426|DEBUG|  o.e.j.s.PushCacheFilter|| GET /js/assets/images/ion.svg referrer=null conditional=true
15:10:00.488|DEBUG|  o.e.j.s.PushCacheFilter|| GET /js/assets/templates/serviceStatus.html referrer=null conditional=true
15:10:00.565|DEBUG|  o.e.j.s.PushCacheFilter|| GET /js/favicon.ico referrer=https://lnd-cat-test-lnx-64.iontrading.com:9443/js/ conditional=false
15:10:00.566|DEBUG|  o.e.j.s.PushCacheFilter|| Not associated /js/favicon.ico to /js/, outside associate period of 30000ms

(With caching disabled - shift + refresh)

.... .... 
 o.e.j.s.PushCacheFilter|| Pushing Dispatcher@0x5c0484d0{null,/js/common/breadcrumbs/ion_breadcrumbs.css} for /js/
15:20:14.421|DEBUG|  o.e.j.s.PushCacheFilter|| Pushing Dispatcher@0x1e805c7{null,/js/common/streaming_grid/ion_strgrid.js} for /js/
15:20:14.421|DEBUG|  o.e.j.s.PushCacheFilter|| Pushing Dispatcher@0x46d6b945{null,/js/lib/angular-bootstrap/ui-bootstrap-tpls.js} for /js/
15:20:15.648|DEBUG|  o.e.j.s.PushCacheFilter|| GET /js/iod/versrep/iod_versionrep.css referrer=https://lnd-cat-test-lnx-64.iontrading.com:9443/js/ conditional=false
15:20:15.648|DEBUG|  o.e.j.s.PushCacheFilter|| GET /js/iod/shared/iod_converters.js referrer=https://lnd-cat-test-lnx-64.iontrading.com:9443/js/ conditional=false
15:20:15.648|DEBUG|  o.e.j.s.PushCacheFilter|| GET /js/iod/versrep_archive/iod_versrep_archive.css referrer=https://lnd-cat-test-lnx-64.iontrading.com:9443/js/ conditional=false
15:20:15.648|DEBUG|  o.e.j.s.PushCacheFilter|| Not associated /js/iod/versrep/iod_versionrep.css to /js/, outside associate period of 30000ms
15:20:15.648|DEBUG|  o.e.j.s.PushCacheFilter|| GET /js/css/ion.css referrer=https://lnd-cat-test-lnx-64.iontrading.com:9443/js/ conditional=false
.... .... 
15:20:15.649|DEBUG|  o.e.j.s.PushCacheFilter|| Not associated /js/lib/bootstrap/bootstrap.js to /js/, outside associate period of 30000ms
15:20:15.649|DEBUG|  o.e.j.s.PushCacheFilter|| GET /js/lib/cometd-jquery/Cometd.js referrer=https://lnd-cat-test-lnx-64.iontrading.com:9443/js/ conditional=false
15:20:15.649|DEBUG|  o.e.j.s.PushCacheFilter|| Not associated /js/lib/angular/angular.js to /js/, outside associate period of 30000ms
15:20:15.649|DEBUG|  o.e.j.s.PushCacheFilter|| GET /js/iod/versrep_header/iod_versrep_header.css referrer=https://lnd-cat-test-lnx-64.iontrading.com:9443/js/ conditional=false
15:20:15.649|DEBUG|  o.e.j.s.PushCacheFilter|| Not associated /js/common/context/ion_context.js to /js/, outside associate period of 30000ms
15:20:15.649|DEBUG|  o.e.j.s.PushCacheFilter|| GET /js/common/subscription/ion_subscription.js referrer=https://lnd-cat-test-lnx-64.iontrading.com:9443/js/ conditional=false
15:20:15.649|DEBUG|  o.e.j.s.PushCacheFilter|| GET /js/app/ionwebsdk.js referrer=https://lnd-cat-test-lnx-64.iontrading.com:9443/js/ conditional=false
15:20:15.649|DEBUG|  o.e.j.s.PushCacheFilter|| GET /js/common/breadcrumbs/ion_breadcrumbs.js referrer=https://lnd-cat-test-lnx-64.iontrading.com:9443/js/ conditional=false
15:20:15.649|DEBUG|  o.e.j.s.PushCacheFilter|| GET /js/lib/cometd-jquery/TimeSyncExtension.js referrer=https://lnd-cat-test-lnx-64.iontrading.com:9443/js/ conditional=false
15:20:15.649|DEBUG|  o.e.j.s.PushCacheFilter|| Not associated /js/lib/cometd-jquery/TransportRegistry.js to /js/, outside associate period of 30000ms
15:20:15.649|DEBUG|  o.e.j.s.PushCacheFilter|| GET /js/lib/angular-block-ui/angular-block-ui.min.css referrer=https://lnd-cat-test-lnx-64.iontrading.com:9443/js/ conditional=false
15:20:15.649|DEBUG|  o.e.j.s.PushCacheFilter|| GET /js/iod/iod_app.js referrer=https://lnd-cat-test-lnx-64.iontrading.com:9443/js/ conditional=false
15:20:15.650|DEBUG|  o.e.j.s.PushCacheFilter|| Not associated /js/lib/cometd-jquery/jquery.cometd.js to /js/, outside associate period of 30000ms


2) interestingly favicon.ico is always requested with a referrer and always produces that incorrect message ("not associated as outside associate period").


I haven't had time to fully understand the problem but given the lack of any performance improvements and the messages I see on the logs I would tend to think that Push is not really working as expected.
Maybe this is caused by browser misbehaviour (lack of referrer for example).

What browsers have you guys used when testing HTTP2 Push?


thanks,
Michele




On 9 July 2015 at 01:06, Simone Bordet <sbordet@xxxxxxxxxxx> wrote:
Hi,

On Thu, Jul 2, 2015 at 9:59 AM, Michele Rossi <michele.rossi@xxxxxxxxx> wrote:
> hi,
>
> I am experimenting with Jetty 9.3.0.v20150612 and HTTP2 to try to reduce the
> load time of my _javascript_ web application.
>
> The application needs to load about 60 resources (.js etc) for a total of
> 3.8Mb and I was hoping that HTTP2 would help.
>
> I am serving my static files through DefaultServlet configured as shown in
> the default web.xml, the only difference being "useFileMappedBuffer=true"
>
> I added the PushCacheFilter to my web.xml as shown on
> https://eclipse.org/jetty/documentation/current/http2-configuring-push.html
>
> (As a side note, in order to make PushCacheFilter work, I add to add
> jetty-http-9.3.0.v20150612.jar, jetty-server, jetty-servlets,jetty-util to
> WEB-INF/lib and that might be worth adding to the documentation)
>
> With the PushCacheFilter enabled  I get the following stacktrace:
>
> java.lang.NullPointerException: null
>         at
> org.eclipse.jetty.servlets.PushCacheFilter.doFilter(PushCacheFilter.java:119)
> ~[jetty-servlets-9.3.0.v20150612.jar:9.3.0.v20150612]
>         at
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1667)
> ~[jetty-servlet-9.3.0.v20150612.jar:9.3.0.v20150612]
>         at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:581)
> [jetty-servlet-9.3.0.v20150612.jar:9.3.0.v20150612]
>         at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
> [jetty-server-9.3.0.v20150612.jar:9.3.0.v20150612]
>
>
> Having a look at the code, it looks like
> org.eclipse.jetty.server.Request.getBaseRequest(ServletRequest) returns
> null.
>
> This could be because the request is not an instance of any of the classes
> considered in the method (maybe because HTTP2 requests are wrapped
> differently?).
>
> Another side note: I have tested the load time with HTTP2 (no
> PushCacheFilter) and HTTPS and so far I am getting better results with HTTPS
> (Chrome 43.0.2357.130 m).
> However I have not been able to test on an isolated network and my tests
> show quite a bit of variance so for now I am not convinced of my results.
> I am just interested to find out if anybody else has obtained anything
> similar and whether the browsers could be responsible.
>
>
> I really hope I am not wasting your time with one of those stupid
> configuration errors.

I think it's a classloader issue due to the fact you have added
jetty-server-<version>.jar to WEB-INF/lib.
Try to remove it.

--
Simone Bordet
----
http://cometd.org
http://webtide.com
Developer advice, training, services and support
from the Jetty & CometD experts.
_______________________________________________
jetty-dev mailing list
jetty-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


Back to the top