mojodna / tessera

A tilelive-based tile server.
BSD 2-Clause "Simplified" License
324 stars 80 forks source link

Request timeout/no response with tilelive-aws #103

Closed brt0555 closed 2 years ago

brt0555 commented 2 years ago

I'm trying to serve by Tessera tiles from AWS location service, but after running maputnik and tessera, I got:

Listening at http://0.0.0.0:8080
GET /4/2/9.pbf - - ms - -
GET /4/3/9.pbf - - ms - -
GET /4/4/9.pbf - - ms - -
GET /4/5/9.pbf - - ms - -
GET /4/4/8.pbf - - ms - -
GET /4/5/7.pbf - - ms - -
GET /4/5/8.pbf - - ms - -
GET /4/6/8.pbf - - ms - -
GET /4/4/7.pbf - - ms - -
GET /4/6/7.pbf - - ms - -

How I run tessera:

  1. export AWS variables:

    export AWS_ACCESS_KEY_ID=xxx
    export AWS_SECRET_ACCESS_KEY=xxx
    export AWS_DEFAULT_REGION=xxx
  2. run local instance of maputnik ./maputnik

  3. run tessera by node tessera.js -r tilelive-aws aws:///MapName

  4. got result shown above

  5. I have all permissions granted for this map instance

What I have checked:

When I open localhost:8080 i got blank map of Tessera, and it seems to return some response from different request, but all aws-related request seems to stack in "pending" status, so maputnik does not display map with tiles.

Could you advice me, what should I check or what Am I doing wrong?

Edit: I have console log URI of tilelive-aws and auth field is empty, should it look like this?

Url {
  protocol: 'aws:',
  slashes: true,
  auth: null,
  host: '',
  port: null,
  hostname: '',
  hash: null,
  search: null,
  query: [Object: null prototype] {},
  pathname: '/MapName',
  path: '/MapName',
  href: 'aws:///MapName'
}
mojodna commented 2 years ago

Everything there looks right, but try setting AWS_REGION to the same region as AWS_DEFAULT_REGION (and possibly omit the latter); I'm able to reproduce the problem that way. I suspect that AWS_REGION (or a default region in ~/.aws/{config,credentials}) is pointing at a region that doesn't contain the map resource in question.

If you don't mind, please open an issue against https://github.com/beatleboy501/tilelive-aws; it should fail fast rather than sitting around not responding.

brt0555 commented 2 years ago

@mojodna Wow that was exactly the case. Thank you for your quick response. Now it's working as expected. Issue for tilelive-aws reported (https://github.com/beatleboy501/tilelive-aws/issues/2). Thanks!