Hello (cheesybiscuits?),

Thanks for the extensive and explanatory message. You forgot yo mention
which version of GeoServer you're running though.
I've tried the attached geowebcache.xml file (essentially the same you
provided)  with GeoServer 2.1.3 and it seems to work just fine both for
seeding and on-demand caching.
Please try it out and report back, or tell which version you're using. If
problems persists and you're not using 2.1.3 perhaps you should consider
upgrading.

I'll try to answer some of your questions inline:

On Thu, Mar 1, 2012 at 9:24 PM, cheesybiscuits <[email protected]>wrote:

> I'm having trouble understanding how GeoWebCache and GeoServer fit together
> when it comes to new GridSets - this may be a bug but I'm not sure.
>
> I have defined a new GridSet which seems fine (no more messages in
> GeoServer's log when I reload geowebcache.xml). I found out here:
>
> http://osgeo-org.1560.n6.nabble.com/GeoSserver-and-GeoWebCache-td3799862.html
> that I need to specify which layers implement this GridSet.
>
> The documentation I found for geowebcache.xml
> (
> http://geowebcache.org/docs/current/_sources/configuration/layers/projections.txt
> )
> says when I define a wmsLayer element within layers I can choose any name I
> want. At first I wondered how GeoWebCache would know which layer I actually
> wanted to cache, when all I tell it about the URL is the WMS end-point with
> no layer argument, but then I read here:
>
> http://osgeo-org.1560.n6.nabble.com/gwc-layer-naming-convention-td4481580.html
> about using the wmsLayers element to specify the layers within the service
> I
> want.

That is about right.


> However, it doesn't work.
>
> If I use the GeoServer name for a layer in geowebcache.xml it doesn't show
> up in the list of layers I can seed, because the layer is already listed
> there by default and only has the default 4326 and 900913 GridSets.

Indeed, that's a known regression. Although with the upcoming work on
configuring geoserver tile layers through the UI (just committed on trunk)
that's not gonna be needed anymore.


> If I
> give it a new name, which doesn't match a GeoServer layer - e.g. "the new
> layer", it shows up as a seed-able layer with my custom GridSet (and
> neither
> of the defaults), but seeding fails with the message "Unexpected response
> code from backend: 404 for http://host_name:8080/geoserver/test/wms?";.

I wonder if there's a problem using the workspace qualifier here (/test),
given your example config worked fine for me.


> If I
> use the preview available with the GWC seed page I can see that the WMS URL
> it uses contains "...wms?LAYERS=the new layer" - it is using the layer name
> I provided which is supposed to be arbitrary, instead of the layers I
> explicitly provided within the wmsLayers element.
>
That is right. The layer name you provided is how gwc publishes the layer.
Internally it will generate WMS requests to the backend WMS using the layer
names provided  in the wmsLayers config attribute.


>
> Is this a bug in GeoWebCache, or something going wrong in my configuration
> file?

The above behavior seems right.


> I disabled "Automatically configure a cached layer for newly added
> layers" and added a new layer in GeoServer, thinking that it wouldn't
> appear
> in the seed-able list with the default GridSets, and therefore I could
> safely use the GeoServer layer name, but it DID show up in the seed-able
> list by default, so I'm no better off.
>
This might actually be a bug. But please try 2.1.3 first if that's not what
you're using?

Cheers,
Gabriel
<?xml version="1.0" encoding="utf-8"?>
<gwcConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  xmlns="http://geowebcache.org/schema/1.3.0";
  xsi:schemaLocation="http://geowebcache.org/schema/1.3.0 http://geowebcache.org/schema/1.3.0/geowebcache.xsd";>
  <version>1.3.0</version>
  <backendTimeout>120</backendTimeout>
<gridSets>
   <gridSet>
     <name>Test_GridSet</name>
     <srs>
       <number>900913</number>
     </srs>
     <extent>
       <coords>
         <double>-20037508</double>
         <double>-20037508</double>
         <double>20037508</double>
         <double>20037508</double>
       </coords>
     </extent>
     <metersPerUnit>1</metersPerUnit>
     <tileHeight>256</tileHeight>
     <tileWidth>256</tileWidth>
   </gridSet>
</gridSets>

  <layers>
   <wmsLayer>
     <name>the new layer</name>
     <wmsLayers>bluemarble:bluemarble</wmsLayers>
     <mimeFormats>
       <string>image/gif</string>
       <string>image/jpeg</string>
       <string>image/png</string>
       <string>image/png8</string>
     </mimeFormats>
     <gridSubsets>
       <gridSubset>
         <gridSetName>Test_GridSet</gridSetName>
       </gridSubset>
     </gridSubsets>
     <wmsUrl>
       <string>http://maps.opengeo.org/geoserver/wms</string>
     </wmsUrl>
   </wmsLayer>
  </layers>  
</gwcConfiguration>
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to