GetMap request fails on proxied GeoServer

Added by VdB Tim almost 7 years ago

Hi,

I have installed Proxy 2.2.0.

I have also installed GeoServer 2.1.2 on the same server.
Now, I'm trying to proxy this GeoServer instance.
I have configured and secured GeoServer using the Proxy module.

If I execute a GetCapabilities request (http://192.168.103.58:8080/proxy/ogc/geoserver_wms?request=GetCapabilities&service=WMS&VERSION=1.1.1), the response contains the tiger:geoserver_wms_tiger_roads layer:

<Layer queryable="1" opaque="0" noSubsets="0">
<Name>tiger:geoserver_wms_tiger_roads</Name>
<Title>Manhattan (NY) roads</Title>
<Abstract>Highly simplified road layout of Manhattan in New York..</Abstract>
<KeywordList>
<Keyword>DS_tiger_roads</Keyword>
<Keyword>tiger_roads</Keyword>
<Keyword>roads</Keyword>
</KeywordList>
<SRS>EPSG:4326</SRS>
...
</Layer>

When executing a GetMap request using this layer (http://easysdi:8080/proxy/ogc/geoserver_wms?LAYERS=tiger:geoserver_wms_tiger_roads&SERVICE=WMS&VERSION=1.1.1&STYLES=&SRS=EPSG%3A4326&FORMAT=image%2Fpng&TRANSPARENT=true&REQUEST=GetMap&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&BBOX=-74.486274719238,40.457324981689,-73.433647155762,41.105175018311&WIDTH=1533&HEIGHT=943) a ServiceException is returned:
<ServiceExceptionReport version="1.1.1">
<ServiceException code="LayerNotDefined" locator="LAYERS">
Invalid layer name given in the LAYERS parameter : tiger:geoserver_wms_tiger_roads
</ServiceException>
</ServiceExceptionReport>

Below, you'll find the configuration of the layer in the config.xml file (easysdi is the name of the server):
@<config id="geoserver_wms">
<authorization>
<policy-file>/opt/jakarta/apache-tomcat-6.0.33/webapps/proxy/WEB-INF/conf/NewPolicy.xml</policy-file>
</authorization>
<servlet-class>org.easysdi.proxy.wms.WMSProxyServlet</servlet-class>
<servlet-version/>
<xslt-path>
<url/>
</xslt-path>
<log-config>
<logger>org.apache.log4j.Logger</logger>
<log-level>TRACE</log-level>
<file-structure>
<path>/opt/jakarta/apache-tomcat-6.0.33/logs/</path>
<suffix>wms</suffix>

geoserver</prefix>
            <extension>xml</extension>
            <period>daily</period>
        </file-structure>
        <date-format>dd/MM/yyyy HH:mm:ss</date-format>
    </log-config>
    <host-translator/>
    <remote-server-list>
        <remote-server master="true">
            <alias>geoserver_wms</alias>
            <user>admin</user>
            <url>http://easysdi:8080/geoserver/wms</url>
            <password>XXX</password>
        </remote-server>
    </remote-server-list>
    <exception>
        <mode>permissive</mode>
    </exception>
    <service-metadata>
        <Title>geoserver_wms</Title>
        <Abstract/>
        <KeywordList>
            <Keyword/>
        </KeywordList>
        <ContactInformation>
            <ContactOrganization/>
            <ContactName/>
            <ContactPosition/>
            <ContactAddress>
                <AddressType/>
                <Address/>
                <PostalCode/>
                <City/>
                <State/>
                <Country/>
            </ContactAddress>
            <VoicePhone/>
            <Facsimile/>
            <ElectronicMailAddress/>
            <Linkage/>
            <HoursofSservice/>
            <Instructions/>
        </ContactInformation>
        <Fees>none</Fees>
        <AccessConstraints>none</AccessConstraints>
    </service-metadata>
</config>@

This is the policy attached to the layer (from NewPolicy.xml):

@    <Policy Id="all_user02" ConfigId="geoserver_wms">
        <Servers All="false">
            <Server>
                <url>http://easysdi:8080/geoserver/wms</url>
                <Prefix>tiger</Prefix>
                <Namespace>tiger</Namespace>
                <Metadata/>
                <Layers All="false">
                    <Layer>
                        <Name>tiger:tiger_roads</Name>
                    </Layer>
                </Layers>
                <FeatureTypes/>
            </Server>
        </Servers>
        <Subjects All="true"/>
        <Operations All="true"/>
        <AvailabilityPeriod>
            <Mask>d-mm-yyyy</Mask>
            <From>
                <Date>28-01-2008</Date>
            </From>
            <To>
                <Date>28-01-2108</Date>
            </To>
        </AvailabilityPeriod>
        <ImageSize/>
    </Policy>@

In the policy, I've added the Prefix and Namespace elements afterwards (same result without these elements).

Do you have any idea why the GetMap request is not working?

Best regards,
Tim.


Replies (1)

RE: GetMap request fails on proxied GeoServer - Added by Van Hoecke Hélène over 6 years ago

Easysdi Proxy does not support underscore in remote server alias :

&lt;alias&gt;geoserver_wms&lt;/alias&gt;

(1-1/1)