Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem loading a WMS #1

Open
jsanz opened this issue Aug 24, 2015 · 11 comments
Open

Problem loading a WMS #1

jsanz opened this issue Aug 24, 2015 · 11 comments

Comments

@jsanz
Copy link

jsanz commented Aug 24, 2015

Following this issue with a GeoWebCache WMS layer that is not working when we add it to the editor we got this on the logs

==> mapproxy-source-requests.log <==
[2015-08-24 14:05:41,186] GET http://192.168.100.82:8180/geowebcacheWM/service/wms?SERVICE=WMS&&styles=&format=image%2Fpng&height=256&bbox=10018754.1714,-10018754.1714,20037508.3428,3.08454036713e-06&transparent=True&layers=SATELLITE_WM&service=WMS&width=256&request=GetMap&srs=EPSG%3A3857&version=1.1.1 - - 60027

On the other hand the Capabilities document is giving proper GetMap urls so it seems something internal on the proxy that produces that IP address.

<GetMap>
<Format>image/png</Format>
<DCPType><HTTP><Get>
<OnlineResource xlink:type="simple" xlink:href="http://api.maps.vic.gov.au/geowebcacheWM/service/wms?SERVICE=WMS&"/>
</Get></HTTP></DCPType>
</GetMap>

Any pointer on what could be wrong?

@olt
Copy link
Member

olt commented Aug 25, 2015

I think this actually belongs to https://github.com/omniscale/wmtsproxy/
However, I'm able to add both services from the issue to WMTSProxy. Maybe the IP was a temporary glitch in the configuration of the external service?

@jsanz
Copy link
Author

jsanz commented Aug 25, 2015

Hi @olt, I'm still having the same issue my colleague reported, I can add the server, get the layers and select one of them but afterwards the tiles from the server are not shown as a basemap.

@olt
Copy link
Member

olt commented Aug 25, 2015

What URLs are you sending to the WMTSProxy API?

The following request gives me:

/check?url=http://api.maps.vic.gov.au/geowebcacheWM/service/wms?SERVICE=WMS%26request=GetCapabilities
{
  "layers": [
    {
      "llbbox": [
        -180.0,
        -90.0,
        180.0,
        90.0
      ],
      "name": "WEB_MERCATOR",
      "srs": [
        "EPSG:3857"
      ],
      "title": "WEB_MERCATOR"
    },
    {
      "llbbox": [
        -180.0,
        -90.0,
        180.0,
        90.0
      ],
      "name": "HYBRID_MERCATOR",
      "srs": [
        "EPSG:3857"
      ],
      "title": "HYBRID_MERCATOR"
    },
    {
      "llbbox": [
        -180.0,
        -90.0,
        180.0,
        90.0
      ],
      "name": "SATELLITE_WM",
      "srs": [
        "EPSG:3857"
      ],
      "title": "SATELLITE_WM"
    }
  ],
  "title": "Web Map Service - GeoWebCache",
  "type": "wms"
}

And I can add each of them with the following requests:

/add?type=wms&url=http://api.maps.vic.gov.au/geowebcacheWM/service/wms?SERVICE=WMS%26request=GetCapabilities&layer=HYBRID_MERCATOR&srs=EPSG:3857
/add?type=wms&url=http://api.maps.vic.gov.au/geowebcacheWM/service/wms?SERVICE=WMS%26request=GetCapabilities&layer=SATELLITE_WM&srs=EPSG:3857
/add?type=wms&url=http://api.maps.vic.gov.au/geowebcacheWM/service/wms?SERVICE=WMS%26request=GetCapabilities&layer=WEB_MERCATOR&srs=EPSG:3857

The tile request
/api_maps_vic_gov_au_HYBRID_MERCATOR_EPSG_3857/wmts/map/webmercator/6/57/39.png
returns a valid image.

The source request for that tile goes to http://api.maps.vic.gov.au/geowebcacheWM/service/wms?SERVICE=WMS&&styles=&format=image%2Fpng&height=1184&bbox=14832452.4647,-5205055.87811,17728498.5924,-2309009.75044&transparent=True&layers=HYBRID_MERCATOR&service=WMS&width=1184&request=GetMap&srs=EPSG%3A3857&version=1.1.1

Can you compare these requests with the URLs CartoDB sends?

@viddo
Copy link

viddo commented Aug 25, 2015

@olt
Copy link
Member

olt commented Aug 25, 2015

Are you still seeing requests to 192.168.100.82:8180? Can you remove the cached mapproxy configurations? api_maps_vic_gov_au_*.yaml

@viddo
Copy link

viddo commented Aug 27, 2015

Yes, that seems to work indeed 👍
…although, does it make sense to create/cache those .yaml files if a service returns local IPs that obviously aren't going to work outside that network?

@olt
Copy link
Member

olt commented Aug 27, 2015

It's hard for MapProxy to tell if a configuration actually makes sense.
But yes, it is likely that you will hit a broken WMS service in the future.

We could store a timestamp in the services.csv and compare that timestamp to the cached MapProxy config. That way you could refresh a config by /adding the service again.

@viddo
Copy link

viddo commented Aug 27, 2015

Yeah that could be.
Re: your proposal, do I understand it correctly that with that kind of change all existing services would stay as they are (just like now), unless refreshed through an /add endpoint?

@olt
Copy link
Member

olt commented Aug 28, 2015

Yes. Old CSV entries won't have a timestamp and so they will not be recreated. We could also add the timestamp (if present) to the cache name. That way any cached tiles will also be ignored on /add. The old tiles will be removed by the cron job on that system (not sure what time interval is configured for that).

@olt
Copy link
Member

olt commented Sep 1, 2015

Ok, I've implemented the change in the WMTSProxy repo: https://github.com/omniscale/wmtsproxy
Existing services are unaffected by this. The Capabilities document will only be re-requested if you add a service again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants