tangrams / carousel

This repo is loaded in the iframe in the Tangram project page header.
MIT License
11 stars 12 forks source link

404 errors for tiles #30

Closed rochoa closed 7 years ago

rochoa commented 7 years ago

When using something like https://tangrams.github.io/carousel/?cinnabar, I'm getting 404 errors for some tiles depending on the server handling my requests.

I noticed, at least, two different IP addresses responding to a request like https://vector.mapzen.com/osm/all/15/9650/12318.topojson?api_key=vector-tiles-HqUVidw.

From IP 151.101.33.95

$ curl -v -H 'Host: vector.mapzen.com' http://151.101.33.95/osm/all/15/9650/12318.topojson?api_key=vector-tiles-HqUVidw -s -o /dev/null
*   Trying 151.101.33.95...
* Connected to 151.101.33.95 (151.101.33.95) port 80 (#0)
> GET /osm/all/15/9650/12318.topojson?api_key=vector-tiles-HqUVidw HTTP/1.1
> Host: vector.mapzen.com
> User-Agent: curl/7.43.0
> Accept: */*
>
< HTTP/1.1 200 OK
< Last-Modified: Sat, 01 Oct 2016 03:11:40 GMT
< ETag: "f052e50d652ba8197b1777dd00ce17cb"
< Content-Type: application/json
< Cache-Control: max-age=43200
< Content-Length: 245313
< Date: Tue, 14 Mar 2017 16:20:20 GMT
< Connection: keep-alive
< Server: Fastly
< Vary: Accept-Encoding
< Access-Control-Allow-Origin: *
< Access-Control-Allow-Credentials: true
< Access-Control-Allow-Methods: GET, HEAD
< Access-Control-Allow-Headers: Authorization, Content-Type, Accept, Origin, User-Agent, Cache-Control, Keep-Alive, If-Modified-Since, If-None-Match
< Access-Control-Expose-Headers: Content-Type, Cache-Control, ETag, Expires, Last-Modified, Content-Length
<
{ [12540 bytes data]
* Connection #0 to host 151.101.33.95 left intact

From IP 151.101.133.95

$ curl -v -H 'Host: vector.mapzen.com' http://151.101.133.95/osm/all/15/9650/12318.topojson?api_key=vector-tiles-HqUVidw -s -o /dev/null
*   Trying 151.101.133.95...
* Connected to 151.101.133.95 (151.101.133.95) port 80 (#0)
> GET /osm/all/15/9650/12318.topojson?api_key=vector-tiles-HqUVidw HTTP/1.1
> Host: vector.mapzen.com
> User-Agent: curl/7.43.0
> Accept: */*
>
< HTTP/1.1 404 Not Found
< Retry-After: 0
< Content-Type: text/plain; charset=utf-8
< Content-Length: 113
< Date: Tue, 14 Mar 2017 16:20:32 GMT
< Connection: keep-alive
< Server: S3
< Access-Control-Allow-Origin: *
< Access-Control-Allow-Credentials: true
< Access-Control-Allow-Methods: GET, HEAD
< Access-Control-Allow-Headers: Authorization, Content-Type, Accept, Origin, User-Agent, Cache-Control, Keep-Alive, If-Modified-Since, If-None-Match
< Access-Control-Expose-Headers: Content-Type, Cache-Control, ETag, Expires, Last-Modified, Content-Length
<
{ [113 bytes data]
* Connection #0 to host 151.101.133.95 left intact
meetar commented 7 years ago

Hi @rochoa - we're not seeing anything like that here - we'd like some more information about when and where this happens:

Thanks!

rochoa commented 7 years ago

I started to realise because it was working when using VPN connection but failing when not going through the VPN connection. The VPN connection was using another server for the domain resolution.

When using my normal connection (from Spain), I get:

$ host vector.mapzen.com
vector.mapzen.com is an alias for t.ssl.global.fastly.net.
t.ssl.global.fastly.net has address 151.101.133.95

However, when using the VPN connection (name server), I get:

$ host vector.mapzen.com
vector.mapzen.com is an alias for t.ssl.global.fastly.net.
t.ssl.global.fastly.net has address 151.101.33.95

Some screenshots:

151.101.133.95 151 101 133 95

151.101.33.95 151 101 33 95

HTH. Thanks!

bcamper commented 7 years ago

@rochoa thanks, those requests look like they are to our old tile service URL -- see the message in the 404 response directing you to https://mapzen.com/blog/v1-vector-tile-service/ :) Nonetheless, these URLs should not be used in this repository either, so we'll fix that.

@meetar looks like many styles in this repo are using the old tile service URL (https://github.com/tangrams/carousel/search?utf8=%E2%9C%93&q=vector), but not sure if any of those are being used in production now via this repo? In any case we should fix or remove them.

meetar commented 7 years ago

Resolved with https://github.com/tangrams/carousel/commit/022058f1a4afd9e2011f1820fa0d1b2431942ff9 as soon as the website rebuilds – thanks very much for the catch!

rochoa commented 7 years ago

@meetar & @bcamper, thanks for handling and fixing this one 👍 .