[GIS] GeoServer replies HTTP Error 503

boundless-suitegeoserverpostgis

I've seen this question was asked before but I couldn't find any solution to the problem.

Since today, my GeoServer does not reply on any requests anymore, I can't even access the GeoServer UI. I didn't change any settings since the last time I used GeoServer and it worked fine then. This is the HTTP error message:

HTTP ERROR: 503
SERVICE_UNAVAILABLE
RequestURI=/geoserver/web
Powered by jetty://

Going further, access to my PostgreSQL/PostGIS Database is denied as well, telling me

could not connect to server: Connection refused (0x0000274D/10061) Is
the server running on host "127.0.0.1" and accepting TCP/IP
connections on port 54321?

Has anybody experienced something similar? If lines from the log are needed, let me know which ones.


This is probably why it fails:

ERROR [context.ContextLoader] – Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'gwcCatalogConfiguration' defined in URL
[jar:file:/C:/Program%20Files%20(x86)/OpenGeo/OpenGeo%20Suite/webapps/geoserver/WEB-INF/lib/gwc-2.1-SNAPSHOT.jar!/geowebcache-geoserver-context.xml]:
Cannot resolve reference to bean 'rawCatalog' while setting
constructor argument; nested exception is
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'rawCatalog' defined in URL
[jar:file:/C:/Program%20Files%20(x86)/OpenGeo/OpenGeo%20Suite/webapps/geoserver/WEB-INF/lib/main-2.1-SNAPSHOT.jar!/applicationContext.xml]:
Initialization of bean failed; nested exception is
java.lang.RuntimeException: java.lang.IllegalArgumentException:
Resource must be part of a store

Best Answer

This is the answer to my question! Thank you Andrea Aime!

GeoServer is not starting up anymore because its configuration is ruined: at org.geoserver.config.DefaultGeoServerLoader.loadCatalog(DefaultGeoServerLoader.java:37)

Nested in org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'gwcCatalogConfiguration' defined in URL [jar:file:/C:/Program%20Files%20(x86)/OpenGeo/OpenGeo%20Suite/webapps/geoserver/WEB-INF/lib/gwc-2.1-SNAPSHOT.jar!/geowebcache-geoserver-context.xml]: Cannot resolve reference to bean 'rawCatalog' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'rawCatalog' defined in URL [jar:file:/C:/Program%20Files%20(x86)/OpenGeo/OpenGeo%20Suite/webapps/geoserver/WEB-INF/lib/main-2.1-SNAPSHOT.jar!/applicationContext.xml]: Initialization of bean failed; nested exception is java.lang.RuntimeException: java.lang.IllegalArgumentException: Resource must be part of a store: java.lang.IllegalArgumentException: Resource must be part of a store at org.geoserver.catalog.impl.CatalogImpl.validate(CatalogImpl.java:368) at org.geoserver.catalog.impl.CatalogImpl.add(CatalogImpl.java:354) at org.geoserver.config.GeoServerLoader.readCatalog(GeoServerLoader.java:382) at org.geoserver.config.GeoServerLoader.readCatalog(GeoServerLoader.java:220)

As far as I can see you have a layer sitting around whose store has been deleted. This should never happen, did you try to modify the on disk GeoServer catalog configuration by hand? My guess is that the id of the feature types/coverage in the store "cases" do not match the one of the store file itself.

For example, the states_shapefile store.xml has:

DataStoreInfoImpl--570ae188:124761b8d78:-7fd9
states_shapefile true WorkspaceInfoImpl--570ae188:124761b8d78:-7ffd
http://www.openplans.org/topp file:data/shapefiles/states.shp

and the featuretype.xml contained in the states sub-directory has:


FeatureTypeInfoImpl--570ae188:124761b8d78:-7fc1 ...
DataStoreInfoImpl--570ae188:124761b8d78:-7fd9

The featureType/store/id element must match the store id.

Cheers Andrea

Related Question