Peter
January 23, 2025, 10:28am
1
Hi Gabe
GeoServer v2.25.3 (oscarfonts docker image)
gs-datadir-catalog-loader-2.25-SNAPSHOT.jar (dated 2024-12-19)
I was testing your DataDirectory Catalog Loader — GeoServer 2.27.x User Manual and it works on 4 of 5 of my GeoServer configs, but there is one that just does not load the catalog at all with this module enabled.
I have produced a diff of the 2 logs files for you to see where the one (indicated with + in column 1) does not load the catalog.
load_diff.log (31.6 KB)
What can I do to help debug this further?
Thanks
Peter
Peter
January 23, 2025, 11:04am
2
Peter
January 23, 2025, 1:16pm
3
I have narrowed the problem down to either the layers’ projection being 404000 (because there is no geometry associated with the layer) or there was no default style associated with the layers. Once fixed, the catalog is loaded successfully with this config.
I can continue to try to produce a test case, if this is of use to you @groldan
Peter
Having dirty data directories is pretty common, the loader should be solid enough to skip over the misconfigured bits. In other terms, it should be able to load what the current loader was loading too.
While testing it some months ago, I’ve experienced a complete lockup of the GeoServer during startup, some comments and a link to a test data directory can be found here:
geoserver:main
← groldan:GEOS-11284
Tested again, it survived the dirty data directory I have, but then locked up on… a "many shapefile stores" one I use for tests... apparently loading services?
I see this in the logs right before the lockup:
```
19 ago 12:57:21 CONFIG [config.internal] - Loading workspace settings...
19 ago 12:57:21 CONFIG [config.internal] - Loaded 1 workspace-specific settings.
19 ago 12:57:21 CONFIG [config.internal] - Loading workspace services...
```
Trace wise I see:
```
"main" #1 prio=5 os_prio=0 cpu=6227,80ms elapsed=227,82s tid=0x00007be3f401f800 nid=0xc90b in Object.wait() [0x00007be3fabfc000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(java.base@11.0.24/Native Method)
- waiting on <0x0000000628ba8f38> (a java.util.concurrent.ForkJoinTask$AdaptedCallable)
at java.util.concurrent.ForkJoinTask.externalInterruptibleAwaitDone(java.base@11.0.24/ForkJoinTask.java:356)
- waiting to re-lock in wait() <0x0000000628ba8f38> (a java.util.concurrent.ForkJoinTask$AdaptedCallable)
at java.util.concurrent.ForkJoinTask.get(java.base@11.0.24/ForkJoinTask.java:1004)
at org.geoserver.config.internal.GeoServerConfigLoader.loadGeoServer(GeoServerConfigLoader.java:73)
at org.geoserver.config.internal.DataDirectoryLoader.loadGeoServer(DataDirectoryLoader.java:136)
at org.geoserver.config.DataDirectoryGeoServerLoader.readConfiguration(DataDirectoryGeoServerLoader.java:204)
at org.geoserver.config.DefaultGeoServerLoader.loadGeoServer(DefaultGeoServerLoader.java:75)
at org.geoserver.config.GeoServerLoader.postProcessBeforeInitializationGeoServer(GeoServerLoader.java:307)
at org.geoserver.config.GeoServerLoader.postProcessBeforeInitialization(GeoServerLoader.java:284)
at org.geoserver.config.GeoServerLoaderProxy.postProcessBeforeInitialization(GeoServerLoaderProxy.java:62)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:440)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1796)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:620)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:336)
at org.springframework.beans.factory.support.AbstractBeanFactory$$Lambda$267/0x000000084041e040.getObject(Unknown Source)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
- locked <0x000000060c9d0a00> (a java.util.concurrent.ConcurrentHashMap)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:334)
...
"DatadirLoader-1-worker-1" #36 daemon prio=5 os_prio=0 cpu=1592,71ms elapsed=222,04s tid=0x00007be3f63ec800 nid=0xc992 in Object.wait() [0x00007be3b0efd000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(java.base@11.0.24/Native Method)
- waiting on <0x0000000628074aa0> (a java.util.stream.ReduceOps$ReduceTask)
at java.util.concurrent.ForkJoinTask.internalWait(java.base@11.0.24/ForkJoinTask.java:311)
- waiting to re-lock in wait() <0x0000000628074aa0> (a java.util.stream.ReduceOps$ReduceTask)
at java.util.concurrent.ForkJoinPool.awaitJoin(java.base@11.0.24/ForkJoinPool.java:1730)
at java.util.concurrent.ForkJoinTask.doInvoke(java.base@11.0.24/ForkJoinTask.java:411)
at java.util.concurrent.ForkJoinTask.invoke(java.base@11.0.24/ForkJoinTask.java:736)
at java.util.stream.ReduceOps$ReduceOp.evaluateParallel(java.base@11.0.24/ReduceOps.java:919)
at java.util.stream.AbstractPipeline.evaluate(java.base@11.0.24/AbstractPipeline.java:233)
at java.util.stream.ReferencePipeline.reduce(java.base@11.0.24/ReferencePipeline.java:558)
at org.geoserver.config.internal.GeoServerConfigLoader.loadServices(GeoServerConfigLoader.java:109)
at org.geoserver.config.internal.GeoServerConfigLoader.readGeoServer(GeoServerConfigLoader.java:94)
at org.geoserver.config.internal.GeoServerConfigLoader$$Lambda$586/0x0000000840780c40.call(Unknown Sourc
...
"DatadirLoader-1-worker-4" #39 daemon prio=5 os_prio=0 cpu=3249,38ms elapsed=222,04s tid=0x00007be264002000 nid=0xc995 waiting for monitor entry [0x00007be3b0bfc000]
java.lang.Thread.State: BLOCKED (on object monitor)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getSingletonFactoryBeanForTypeCheck(AbstractAutowireCapableBeanFactory.java:1007)
- waiting to lock <0x000000060c9d0a00> (a java.util.concurrent.ConcurrentHashMap)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getTypeForFactoryBean(AbstractAutowireCapableBeanFactory.java:907)
at org.springframework.beans.factory.support.AbstractBeanFactory.isTypeMatch(AbstractBeanFactory.java:638)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBeanNamesForType(DefaultListableBeanFactory.java:583)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:550)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:536)
at org.springframework.context.support.AbstractApplicationContext.getBeanNamesForType(AbstractApplicationContext.java:1305)
at org.geoserver.platform.GeoServerExtensions.extensionNames(GeoServerExtensions.java:234)
at org.geoserver.platform.GeoServerExtensions.extensions(GeoServerExtensions.java:137)
at org.geoserver.platform.GeoServerExtensions.extensions(GeoServerExtensions.java:292)
at org.geoserver.security.CatalogFilterAccessManager.getCatalogFilters(CatalogFilterAccessManager.java:158)
at org.geoserver.security.CatalogFilterAccessManager.hideWorkspace(CatalogFilterAccessManager.java:130)
at org.geoserver.security.CatalogFilterAccessManager.getAccessLimits(CatalogFilterAccessManager.java:77)
at org.geoserver.security.SecureCatalogImpl.buildWrapperPolicy(SecureCatalogImpl.java:965)
at org.geoserver.security.SecureCatalogImpl.buildWrapperPolicy(SecureCatalogImpl.java:911)
...
```
All other threads are idle.
The sample data directory is [here](https://www.dropbox.com/scl/fi/ip3x82pdzui1rxnvwsqmb/large_shapefiles.tar.bz2?rlkey=7uk600hlcp9z6tdbsdka86dpl&st=bkz2knvy&dl=1)
Wondering if it happens on other machines as well… given the concurrent nature of the loader, it may happen on some hardware, and not on others.
Anyhow, certainly looking forward to have a faster data dir loader!
Cheers
Andrea
Hi,
I’m looking for representative datadir issues that’d trigger these failures.
Besides Peter’s finding about the no-geometry layer, do you have any idea what else might be causing this? @Andrea Aime would you have a data directory to share with me?
TIA,
Gabe
Hem… in the message you quoted there is a link pointing at the data directory… here it is again:
While testing it some months ago, I’ve experienced a complete lockup of the GeoServer during startup, some comments and a link to a test data directory can be found here:
https://github.com/geoserver/geoserver/pull/7421#issuecomment-2296306956
The comment shows the stack traces of the locked up GeoServer, as well as giving a link to the sample data dir, at the end.
In any case, here is a direct link to it.