tileserver-gl icon indicating copy to clipboard operation
tileserver-gl copied to clipboard

Tileserver-gl stopped working after container recreation

Open jxlarrea opened this issue 3 years ago • 1 comments

After some maintenance in my K8 that caused the tileserver-gl container to be recreated, I noticed that it's no longer working. Using the latest image from docker (maptiler/tileserver-gl), the server does start and the initial style is served but the sources json files that are referenced in the style are no longer served by tileserver-gl.

In my config.json file, I have the following sources:

  "data": {
        "natural_optimized": {
            "mbtiles": "itsd_natural.optimized.mbtiles"
        },
        "v3": {
            "mbtiles": "osm-planet.mbtiles"
        }
    }

My style.json file referenced those like this:

  "sources": {
    "itsd_natural_optimized": {
      "type": "raster",
      "url": "mbtiles://{natural_optimized}"
    },
    "openmaptiles": {
      "type": "vector",
      "url": "mbtiles://{v3}"
    }
  }

When my style.json file is served to a user, it shows the sources like this:

"sources": {
    "itsd_natural_optimized": {
	"type": "raster",
	"url": "https://my-maps-doman.com/data/natural_optimized.json"
    },
    "openmaptiles": {
         "type": "vector",
         "url": "https://my-maps-doman.com/data/v3.json"
     }
}

This issue is that https://my-maps-doman.com/data/natural_optimized.json and https://my-maps-doman.com/data/v3.json (domain not real) no longer work. Both return 404 with a "Not Found" message. Looking at the logs in the container, I can see "GET /data/v3.json 404 9 - 0.313 ms" and "GET /data/natural_optimized.json 404 9 - 0.301 ms".

Any idea what's going on? What is causing natural_optimized.json and v3.json not to be served/found? This was working properly for almost a year. I've spent almost 12 hours trying to find a solution to no avail. Hopefully someone can point me in the right direction.

jxlarrea avatar Jun 25 '21 08:06 jxlarrea

Something else that I just noticed: the frontend doesn't load at all. No error is shown but eventually the request times out.

jxlarrea avatar Jun 25 '21 08:06 jxlarrea