[Geoserver-users] GeoServer does not start because of a GWC error

Hello list

I am using GeoServer 2.1-SNAPSHOT (unluckily upgrading is not an
option for now) and suddenly I am getting a GWC error (see below) that
prevents GeoServer to correctly start.
This can be easily fixed by removing the gwc directory, but I would
like to know if there is a way to fix it someway to recover the gwc
directory (I do not want to regenerate it).

...
19 Aug 08:51:18 INFO [org.geoserver] - Loaded service 'wcs', enabled
19 Aug 08:51:18 INFO [org.geoserver] - Loaded service 'wfs', enabled
19 Aug 08:51:18 INFO [org.geoserver] - Loaded service 'wms', enabled
19 Aug 08:51:18 INFO [gwc.config] - Initializing GeoServer specific
GWC configuration from gwc-gs.xml
19 Aug 08:51:18 INFO [storage.DefaultStorageFinder] -
***************************************************************************************
19 Aug 08:51:18 INFO [storage.DefaultStorageFinder] - *** Reverting to
java.io.tmpdir null for storage. Please set GEOWEBCACHE_CACHE_DIR. ***
19 Aug 08:51:18 INFO [storage.DefaultStorageFinder] -
***************************************************************************************
19 Aug 08:51:20 ERROR [jdbc.JDBCMetaBackend] - Failed to start JDBC
metastore: General error: java.lang.RuntimeException: Unexpected code
path [50000-119]
19 Aug 08:51:20 WARN [jdbc.JDBCMetaBackend] - Disabling JDBC
metastore, not all functionality will be available!
19 Aug 08:51:20 INFO [config.XMLConfiguration] - Will look for
geowebcache.xml in
'/opt/tomcat7/prod/tomcat/apache-tomcat-7.0.34/temp/geowebcache'
19 Aug 08:51:20 INFO [config.XMLConfiguration] - Found configuration
file in /opt/tomcat7/prod/tomcat/apache-tomcat-7.0.34/temp/geowebcache
19 Aug 08:51:20 INFO [config.XMLConfiguration] - Configuration file
validated fine.
19 Aug 08:51:20 INFO [config.XMLConfiguration] - Initializing GridSets
from /opt/tomcat7/prod/tomcat/apache-tomcat-7.0.34/temp/geowebcache
19 Aug 08:51:20 INFO [config.XMLConfiguration] - Initializing layers
from /opt/tomcat7/prod/tomcat/apache-tomcat-7.0.34/temp/geowebcache
19 Aug 08:51:20 INFO [layer.TileLayerDispatcher] - Configuration
/opt/tomcat7/prod/tomcat/apache-tomcat-7.0.34/temp/geowebcache
contained no layers.
19 Aug 08:51:20 INFO [storage.EntityStoreBuilder] - Neither disk quota
page store' cache memory percent nor cache size was provided.
Defaulting to 25% Heap Size
19 Aug 08:51:22 INFO [storage.BDBQuotaStore] - Berkeley DB JE Disk
Quota page store configured at
/opt/tomcat7/prod/tomcat/apache-tomcat-7.0.34/temp/geowebcache/diskquota_page_store
19 Aug 08:51:22 INFO [storage.BDBQuotaStore] - Quota Store
initialized. Global quota: 11.62 GB
19 Aug 08:51:22 INFO [diskquota.ConfigLoader] - Quota config is:
/opt/tomcat7/prod/tomcat/apache-tomcat-7.0.34/temp/geowebcache/geowebcache-diskquota.xml
19 Aug 08:51:22 INFO [diskquota.DiskQuotaMonitor] - Setting up disk
quota periodic enforcement task
19 Aug 08:51:22 INFO [diskquota.DiskQuotaMonitor] - 0 layers
configured with their own quotas.
19 Aug 08:51:22 INFO [diskquota.DiskQuotaMonitor] - 228 layers
attached to global quota 15.0 GB
19 Aug 08:51:22 INFO [diskquota.DiskQuotaMonitor] - Disk quota
periodic enforcement task set up every 10 SECONDS
19 Aug 08:51:23 INFO [geowebcache.GeoWebCacheDispatcher] - Invoked
setServletPrefix(gwc)
19 Aug 08:51:23 INFO [georss.GeoRSSPoller] - Initializing GeoRSS
poller in a background job...
19 Aug 08:51:23 INFO [georss.GeoRSSPoller] - No enabled GeoRSS feeds
found, poller will not run.
19 Aug 08:51:23 INFO [rest.RESTDispatcher] - Created RESTDispatcher
with 11 paths
19 Aug 08:51:23 INFO [wms.WMSService] - Will NOT recombine tiles for
non-tiling clients.
19 Aug 08:51:23 INFO [wms.WMSService] - Will proxy requests to backend
that are not getmap or getcapabilities.
19 Aug 08:51:23 INFO [org.geoserver] - GeoServer configuration lock is enabled

In case it can be interesting, this is the geowebcache-diskquota.xml file:

gwcQuotaConfiguration>
  <enabled>false</enabled>
  <diskBlockSize>4096</diskBlockSize>
  <cacheCleanUpFrequency>10</cacheCleanUpFrequency>
  <cacheCleanUpUnits>SECONDS</cacheCleanUpUnits>
  <maxConcurrentCleanUps>2</maxConcurrentCleanUps>
  <globalExpirationPolicyName>LFU</globalExpirationPolicyName>
  <globalQuota>
    <value>15</value>
    <units>GiB</units>
  </globalQuota>
</gwcQuotaConfiguration>

thanks
p

--
Paolo Corti
Geospatial software developer
web: http://www.paolocorti.net
twitter: @capooti
skype: capooti

Hi,
the only error in the logs I see is this one:

On Fri, Aug 23, 2013 at 9:41 AM, Paolo Corti <pcorti@anonymised.com> wrote:

19 Aug 08:51:20 ERROR [jdbc.JDBCMetaBackend] - Failed to start JDBC
metastore: General error: java.lang.RuntimeException: Unexpected code
path [50000-119]

Maybe go and remove the HSQL database from the tile cache directory and try
again?
If you are using parameters in cached requests (e.g., time, cql filter,
elevation and so on)
you might also have to drop your tile cache.

Cheers
Andrea

--

Our support, Your Success! Visit http://opensdi.geo-solutions.it for more
information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------

Hi Andrea

Maybe go and remove the HSQL database from the tile cache directory and try
again?
If you are using parameters in cached requests (e.g., time, cql filter,
elevation and so on)
you might also have to drop your tile cache.

this seems to have fixed things, though I still see the same error in
the log, but now GeoServer starts successfully at least.

What is strange, though, is that now the disk quota is 949.41 MB out
of 15.0 GB, and from our last log (the one I posted) when GeoServer
could not start we had 11.62 Gb (but not sure if the logged message
means exactly that: "19 Aug 08:51:22 INFO [storage.BDBQuotaStore] -
Quota Store initialized. Global quota: 11.62 GB").
Any ideas?

Thanks a lot, highly appreciated here :wink:

p

--
Paolo Corti
Geospatial software developer
web: http://www.paolocorti.net
twitter: @capooti
skype: capooti

On Fri, Aug 23, 2013 at 10:25 AM, Paolo Corti <pcorti@anonymised.com> wrote:

Hi Andrea

>
> Maybe go and remove the HSQL database from the tile cache directory and
try
> again?
> If you are using parameters in cached requests (e.g., time, cql filter,
> elevation and so on)
> you might also have to drop your tile cache.
>

this seems to have fixed things, though I still see the same error in
the log, but now GeoServer starts successfully at least.

What is strange, though, is that now the disk quota is 949.41 MB out
of 15.0 GB, and from our last log (the one I posted) when GeoServer
could not start we had 11.62 Gb (but not sure if the logged message
means exactly that: "19 Aug 08:51:22 INFO [storage.BDBQuotaStore] -
Quota Store initialized. Global quota: 11.62 GB").
Any ideas?

I don't think the quota subsystem can properly survive the deletion of
the metastore, as said, you probably have to drop the cache.
(and drop the quota database too)

Cheers
Andrea

--

Our support, Your Success! Visit http://opensdi.geo-solutions.it for more
information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------