I was faced with this error Could not locate a layer or layer group with id LayerInfoImpl-23d3f1b3:18fecf517ae:-4d15 within GeoServer configuration, the GWC configuration seems to be out of synch when i navigated to Tile Layers in the administration interface of geoserver.
The file is in data_dir/gwc-layers and has a suffix of _bak to it. I can see in the xml of the file that it reference a workspace which is deleted. I tried to recreate it and remove the _bak suffix and restart geoserver but i got the same error.
In what process do the file get a _bak suffix? Should i delete this files after some time myself or is it handled by geoserver itself?
I am hopeful someone might have additional ideas of how to fix it?
I did finally fixed it.
I again tried to the old resource that was deleted. When i wanted to publish the layer going to the Tile Caching tab i got a message that the GWC layer already existed. After enable and disable tile caching for the layer the issue was solved.
I am not sure how i got the errror in the first place though and why i could not see the GWC layer in the configuration.
I moved your topic into the GeoServer User category as this has been frustrating problem for many individuals.
You are correct that this problem happens with a GeoWebCach “TileSet” is defined – and points to a WMS layer or layer group that no longer exists.
The manual procedure to fix is to go through the gwc-layers folder, and find the file with the broken reference included in the error message, and remove it.
I am not sure how I got the err…
We have done a lot of work to make editing the configuration reliable - but have had a history of problems when deleting a workspace and everything that references the workspace.
It would be helpful to know what release you encountered this problem; it has become much less frequent after some recent improvements by @groldan.