GS3.0-RC: Problem with caching

Hi

Using my ported workspace on to geoserver3, I have a query about caching.

My application using the WMS server, and I assume caching, if setup correctly, works without any application changes?

The layers are showing these settings, see attached example.

The cache directory is accessible, and shows some activity

In addition, when a gridsubset is selected, applied and save, subsequent vits to the page dont give any indication thet the gridsubset is active.

Also, on the geowebcache page, selecting any query option i get this

400: Cannot invoke “org.geowebcache.grid.GridSubset.getName()” because “gridSubset” is null

I am not sure if caching is working or not, please can you advise

Thanks @Aimdev

I can confirm that caching is working for me - so your report is exactly the kind of “trouble when updating” we are seeking to learn more about with public testing.

Can I ask you to look in your logs for a stack trace? You can search for the text org.geowebcache.grid.GridSubset.getName() in order to find this.

This should help us determine where the problem is coming from.

Reference:

Hi Jive

Think this is a bit of a red herring, the grid was created and assigned to a number of layers. created a new grid, and now can see all the options in the webcache page.
Don’t know why this one got lost. Will delete it from the list.
Done that and can still see the info on the webcache page
Here is the java dump.

Aimee

28 Apr 17:40:30 INFO [gwc.layer] - No GWC GridSet named 'My_WebMercatorQuadx2' exists.
28 Apr 17:40:30 ERROR [geowebcache.GeoWebCacheDispatcher] - Cannot invoke "org.geowebcache.grid.GridSubset.getSRS()" because "gridSubset" is null http://geoserver:8080/geoserver/gwc/service/wmts
28 Apr 17:40:30 ERROR [geowebcache.GeoWebCacheDispatcher] - Request failed
java.lang.NullPointerException: Cannot invoke "org.geowebcache.grid.GridSubset.getSRS()" because "gridSubset" is null
at org.geowebcache.layer.TileLayer.getGridSubsetForSRS(TileLayer.java:235)
at org.geowebcache.service.wmts.WMTSGetCapabilities.layerWGS84BoundingBox(WMTSGetCapabilities.java:499)
at org.geowebcache.service.wmts.WMTSGetCapabilities.layer(WMTSGetCapabilities.java:455)
at org.geowebcache.service.wmts.WMTSGetCapabilities.contents(WMTSGetCapabilities.java:429)
at org.geowebcache.service.wmts.WMTSGetCapabilities.generateGetCapabilities(WMTSGetCapabilities.java:169)
at org.geowebcache.service.wmts.WMTSGetCapabilities.writeResponse(WMTSGetCapabilities.java:112)
at org.geowebcache.service.wmts.WMTSService.handleRequest(WMTSService.java:577)
at org.geowebcache.GeoWebCacheDispatcher.handleServiceRequest(GeoWebCacheDispatcher.java:404)
at org.geowebcache.GeoWebCacheDispatcher.handleRequestInternal(GeoWebCacheDispatcher.java:275)
at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:177)
at org.geoserver.gwc.dispatch.GwcServiceProxy.dispatch(GwcServiceProxy.java:76)
at jdk.internal.reflect.GeneratedMethodAccessor205.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
...
at org.geoserver.ows.Dispatcher.execute(Dispatcher.java:981)
at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:271)
at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:177)
at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:49)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:963)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:866)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1000)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:892)
at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:622)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:874)
at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:710)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:128)
at com.thetransactioncompany.cors.CORSFilter.doFilterInternal(CORSFilter.java:238)
at com.thetransactioncompany.cors.CORSFilter.doFilter(CORSFilter.java:199)
at com.thetransactioncompany.cors.CORSFilter.doFilter(CORSFilter.java:268)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:107)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:107)
at org.geoserver.filters.ThreadLocalsCleanupFilter.doFilter(ThreadLocalsCleanupFilter.java:28)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:107)
at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:70)
at org.geoserver.monitor.MonitorFilter.doFilter(MonitorFilter.java:157)
at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:67)
at org.geoserver.rest.SuffixStripFilter.doFilterInternal(SuffixStripFilter.java:79)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:67)
at org.geoserver.ows.HTTPHeadersCollector.doFilter(HTTPHeadersCollector.java:48)
at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:67)
at org.geoserver.filters.HTTPMethodFilter.doFilter(HTTPMethodFilter.java:34)
at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:67)
at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:176)
at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:67)
at org.geoserver.filters.SpringDelegatingFilter.doFilter(SpringDelegatingFilter.java:41)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:107)
at org.geoserver.platform.AdvancedDispatchFilter.doFilter(AdvancedDispatchFilter.java:39)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:107)
at org.springframework.security.web.FilterChainProxy.lambda$doFilterInternal$3(FilterChainProxy.java:235)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)
at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:67)
at org.springframework.security.web.access.intercept.AuthorizationFilter.doFilter(AuthorizationFilter.java:101)
at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:71)
at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:88)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:67)
at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:126)
at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:120)
at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:71)
at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:88)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
at org.geoserver.security.filter.GeoServerAnonymousAuthenticationFilter.doFilter(GeoServerAnonymousAuthenticationFilter.java:52)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:67)
at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilterInternal(BasicAuthenticationFilter.java:198)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:71)
at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:88)
at org.geoserver.security.filter.GeoServerBasicAuthenticationFilter.doFilter(GeoServerBasicAuthenticationFilter.java:80)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:67)
at org.geoserver.security.filter.GeoServerSecurityContextPersistenceFilter$1.doFilterInternal(GeoServerSecurityContextPersistenceFilter.java:66)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:71)
at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:88)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:237)
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:195)
at org.geoserver.security.GeoServerSecurityFilterChainProxy.doFilter(GeoServerSecurityFilterChainProxy.java:139)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:355)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:272)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:107)
at org.geoserver.filters.SecurityHeadersFilter.doFilter(SecurityHeadersFilter.java:116)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:107)
at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:46)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:107)
at org.geoserver.filters.SessionDebugFilter.doFilter(SessionDebugFilter.java:47)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:107)
at org.geoserver.filters.FlushSafeFilter.doFilter(FlushSafeFilter.java:41)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:107)
at org.apache.catalina.filters.CorsFilter.handleNonCORS(CorsFilter.java:331)
at org.apache.catalina.filters.CorsFilter.doFilter(CorsFilter.java:158)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:107)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:199)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:107)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:165)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:77)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:113)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:83)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:654)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:72)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:341)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:397)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:903)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1778)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:946)
at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:480)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:57)
at java.base/java.lang.Thread.run(Thread.java:840)

Just to confirm, during the upgrade you “lost” the definition of a grid that was in use by a number of layers?

huh - I cannot think why it would lose a grid definition without more information to go on…

It would be handy if you had your backup of previous data directory and could look for a warning or error the first time it tries to load…

Hi

I removed the complete geoserver directory under the webapps root, then copied the v3 war file into the webapps folder. Then i started up and could see the demo workspaces.

Then i setup the system to look at the original v2 data directory as per the instructions. This directory is outside of the geoserver/tomcat directory structure, it in the /home/geoserver directory.

This resulted in one workspace, osm, and no demos.

All the layers/styles etc were available, and the application worked.

The issue only came to light when i was trying to determine if the caching using WMS was working as i mentioned in my original post.

Thanks for double checking; so it is reproducible. On that initial startup did it say anything in the logs about the gridset not being loaded?

That is the only way I can think that the gridset would be null, is if it failed to load for any reason?

Hi

Reactivated v2 VM, and the grid mentioned in the v3 log is not in the list.

when i go into the webache page i get this message

A list of all the layers and automatic demos

400: null

same for all the other options on that page

I can only assume that in v2 the grid was created, assigned to a number of layers, removed from the layers, but somehow was still registered in the workspace assigned to the layers. That v2 workspace was transferred to the new system running geoserver3, and subsequently caused an error.

In the earliest v3 log there is no mention of the grid.

In the version 2 Log there is a reference to the grid

No GWC GridSet named ‘My_WebMercatorQuadx2’ exists.

Hi

An update. The v2 gs had the same issue. made a new grid, then deleted it, got a warning that it would affect four layers, but deletion worked. Now can use the geowebcache options. where as could not prior to these actions.