tileserver-gl
tileserver-gl copied to clipboard
Error: EACCES: permission denied, stat '2023-08-planet.mbtiles'
Hello all,
I just generated a whole planet mbtile, and I'm trying to deploy it to my k8s cluster with tileserver-gl, but it's not working at all.
I've placed all the needed files to a PVC, and mounted this PVC in /data, as default.
When I start my pod at k8s cluster, I'm receiving the following error:
Starting tileserver-gl v4.4.10
node:internal/fs/utils:347
throw err;
^
Error: EACCES: permission denied, stat '2023-08-planet.mbtiles'
at Object.statSync (node:fs:1615:3)
at file:///usr/src/app/src/main.js:180:35
at FSReqCallback.oncomplete (node:fs:208:21) {
errno: -13,
syscall: 'stat',
code: 'EACCES',
path: '2023-08-planet.mbtiles'
}
Node.js v18.15.0
Here it is my file permissions:
node@mlp-tileserver-1:/data# ls -lah
total 87G
drw-rw-rw- 4 root root 4.0K Aug 7 13:22 .
drwxr-xr-x 1 root root 4.0K Aug 8 14:22 ..
-rw-r--r-- 1 root root 87G Aug 4 23:43 2023-08-planet.mbtiles
-rw-r--r-- 1 501 staff 581 Aug 7 13:22 config.json
drwxr-xr-x 6 root root 4.0K Aug 7 13:19 fonts
drwxr-xr-x 4 root root 4.0K Aug 7 13:19 styles
I have another instance of tileserver-gl running, pointing to a different mbtile file, in a different PVC, also mounted in /data, and this error doesn't happen. Here it is the other permissions:
node@mlp-tileserver-0:/data$ ls -lah
total 84G
drwxr-xr-x 4 root root 4.0K Jun 2 20:20 .
drwxr-xr-x 1 root root 4.0K Aug 8 13:41 ..
-rw-r--r-- 1 root root 84G Jun 2 19:30 2020-10-planet.mbtiles
-rw-r--r-- 1 501 staff 581 Jun 2 20:20 config.json
drwxr-xr-x 6 root root 4.0K Jun 2 19:30 fonts
drwxr-xr-x 4 root root 4.0K Jun 2 19:46 styles
When I try to run locally, this issue doesn't happen, and I don't have any idea of what is going on.
I saw the other issues with similar problem, mentioning some port issues.
My pod points to 8080 port, and I have a service mapping 8080 to 80 in both instance. And as I said, the instance mlp-tileserver-0 is running perfectly
# k get pods | grep tileserver
mlp-tileserver-0 1/1 Running 0 76m
# k logs mlp-tileserver-0
Starting tileserver-gl v4.4.10
Using specified config file from config.json
Starting server
Listening at http://[::]:8080/
Startup complete
GET /aaa9 404 143 - 4.717 ms
GET /aab8 404 143 - 1.690 ms
GET / 200 4220 - 72.221 ms
GET / 200 4220 - 20.707 ms
POST / 200 4220 - 25.193 ms
GET /.env 404 143 - 0.878 ms
Does anyone know how to troubleshoot this issue?