gis-ops / docker-valhalla

This is our flexible Docker repository for the Valhalla routing engine
MIT License
249 stars 71 forks source link

ERROR: No tiles found #60

Closed PatGendre closed 2 years ago

PatGendre commented 2 years ago

log.txt Hi, thanks for publishing and documenting this docker-valhalla! However I cannot obtain a running valhalla instance. I followed the instructions of your tutorial https://gis-ops.com/valhalla-how-to-run-with-docker-on-ubuntu/ I 've created a custom_files dir and preloaded the .pbf into it for the area I want to test. I launched the docker-compose up --build command, everything seems to run smoothly (see attached log), but at the end it always exits with a ERROR: No tiles found. Did you forget to build tiles?. I've tried to change the docker-compose.yml but I cannot solve it. This error message is in the run.sh file and is thrown when there is no TILE_DIR, whereas in my custom_files dir I have indeed a valhalla_tiles so I don't understand how to handle this, in principle TILE_DIR = custom_files/valhalla_tiles is not empty on my machine. Thanks for your help.

nilsnolde commented 2 years ago

Hm it’s possible there’s smth borked when using force_rebuild.. can you nuke everything except the pbf, set that env var to false and try again?

also a „tree -L2 .“ before and after „docker-compose up“ and the contents of your yml file would be helpful.

PatGendre commented 2 years ago

thanks @nilsnolde for your quick reply. I cleaned the custom_files dir and built again, but it failed again with the same error. So attach the tree after and before the docker-compose command, and the config file. Thanks again! after.txt before.txt docker-compose.yml.zip

nilsnolde commented 2 years ago

are you sure you're on the latest image? can you do a docker pull gisops/valhalla:latest to refresh the cache, then take the newest docker-compose.yml from this repo's master and try again (it's mostly about environment variables, where I try my best to be backwards-compatible, but not sure that really works all the time and if it doesn't I also don't really care;)).

note that tutorials are not kept as fresh as repositories' READMEs, they can become stale pretty quickly. last time I looked at that one is easily a year ago while the source code updates every couple of weeks. since our tutorials are also open source people can of course help keeping them up-to-date: https://github.com/gis-ops/tutorials

PatGendre commented 2 years ago

Hi @nilsnolde thanks for your reply, sorry i'm out of town this week, I'll test next monday and keep you informer.

PatGendre commented 2 years ago

Hi @nilsnolde I tried again after docker pull gisops/valhalla:latest and with the newest docker-compose.yml but it failed with the same error. I attach the docker-compose (slightly modified as I added the min,max bbox and set the use_tiles_ignore_pbf to False as I downloaded the pbf file beforehand). docker-compose.yml.zip

nilsnolde commented 2 years ago

hm sorry, I can't reproduce. just yesterday I built europe successfully.

btw, you don't need coordinates anymore necessarily, we adapted the elevation downloader so it automatically pulls only elevation tiles which the built graph covers. you don't need to set use_tiles_ignore_pbf to False, that's only necessary if there's already a graph and you want to make sure it looks at the pbf again to decide if it should build a new graph or not.

PatGendre commented 2 years ago

hi thanks for your explanations, for the moment I cannot solve this, but let you know if I find a way. If you want to keep your issues list clean, you can close this until I solve my problem.

PatGendre commented 2 years ago

I suspect the error is due to a volume mount problem. When I inspect the container built (after it exited), I see that "Volumes": { "/custom_files": {} } although in the docker-config.yml we have

    volumes:
      - ./custom_files/:/custom_files

This would explain why the run.sh cannot find $TILE_DIR .

nilsnolde commented 2 years ago

Jep looks like a good reason. Maybe try prepending the local path with $PWD to make it absolute. Or just the full absolute path to the directory. Or try with plain docker.

good luck!!

nilsnolde commented 2 years ago

finally ran into this! there's a bug yeah, found it and will fix it.

but for me the situation was different: I had a local valhalla_tiles.tar so it skips building and should load that. but then the bug is that it errors when there's no tile_dir. which is stupid, because valhalla doesn't need the tile_dir when there's a tar, which is the preferred way of running it in the first place. that wasn't the case for you though, so I still guess yours is a path issue.