nilsnolde / docker-valhalla

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

Route Query Error 171: No Suitable Edges Near Location #132

Closed HarshJa1n closed 10 months ago

HarshJa1n commented 10 months ago

Hello , I am reaching out to bring to your attention an issue I've encountered while trying to query a route using this image.

Summary

I'm trying to query to get route between two points like here:

curl http://localhost:8002/route --data '{"locations":[{"lat":28.7573925,"lon":77.2783296,"type":"break"},{"lat":28.8432142,"lon":78.6116628,"type":"break"}],"costing":"auto","directions_options":{"units":"miles"}}' | jq '.'

I have downloaded the OSM for India from geofabrik so I'm using two Indian coordinates. However, I keep getting the error 171: No suitable edges near location. I noticed warnings during the tile building, but I am unsure if they are related to the error: 2024/01/15 10:03:08.840325 [INFO] Parsing files for ways: /custom_files/india-latest.osm.pbf 2024/01/15 10:03:08.842012 [INFO] Parsing ways... 2024/01/15 10:03:49.748048 [WARN] Error during parsing of layer tag on the way 180350458: stoi 2024/01/15 10:06:22.603421 [WARN] Error during parsing of layer tag on the way 804206583: stoi 2024/01/15 10:06:30.498851 [WARN] Error during parsing of layer tag on the way 818470557: stoi 2024/01/15 10:06:30.498937 [WARN] Error during parsing of layer tag on the way 818470558: stoi

Command I run

docker run -dt --name valhalla_repo -p 8002:8002 -v $PWD/custom_files:/custom_files ghcr.io/gis-ops/docker-valhalla/valhalla:latest

Docker Logs

➜ docker_test docker logs valhalla_repo

INFO: Running container with user valhalla UID 59999 and GID 59999.

find: '/custom_files/transit_tiles': No such file or directory WARNING: Hash not found for: /custom_files/india-latest.osm.pbf! WARNING: No routing tiles found at /custom_files/valhalla_tiles.tar or /custom_files/valhalla_tiles, starting a new build INFO: Running build tiles with: /custom_files/valhalla.json /custom_files/india-latest.osm.pbf

============================ = Build the initial graph. =

2024/01/15 10:03:08.822542 [INFO] Running valhalla_build_tiles with 8 thread(s). 2024/01/15 10:03:08.824490 [INFO] Start stage = initialize End stage = build 2024/01/15 10:03:08.840325 [INFO] Parsing files for ways: /custom_files/india-latest.osm.pbf 2024/01/15 10:03:08.842012 [INFO] Parsing ways... 2024/01/15 10:03:49.748048 [WARN] Error during parsing of layer tag on the way 180350458: stoi 2024/01/15 10:06:22.603421 [WARN] Error during parsing of layer tag on the way 804206583: stoi 2024/01/15 10:06:30.498851 [WARN] Error during parsing of layer tag on the way 818470557: stoi 2024/01/15 10:06:30.498937 [WARN] Error during parsing of layer tag on the way 818470558: stoi 2024/01/15 10:06:30.499128 [WARN] Error during parsing of layer tag on the way 818470564: stoi 2024/01/15 10:07:47.749136 [WARN] Error during parsing of layer tag on the way 937080474: stoi 2024/01/15 10:07:47.749340 [WARN] Error during parsing of layer tag on the way 937080475: stoi 2024/01/15 10:07:47.750290 [WARN] Error during parsing of layer tag on the way 937080483: stoi 2024/01/15 10:07:47.750426 [WARN] Error during parsing of layer tag on the way 937080486: stoi 2024/01/15 10:07:47.750518 [WARN] Error during parsing of layer tag on the way 937080488: stoi 2024/01/15 10:07:47.750582 [WARN] Error during parsing of layer tag on the way 937080489: stoi 2024/01/15 10:07:47.750644 [WARN] Error during parsing of layer tag on the way 937080490: stoi 2024/01/15 10:07:47.750707 [WARN] Error during parsing of layer tag on the way 937080491: stoi 2024/01/15 10:07:47.750867 [WARN] Error during parsing of layer tag on the way 937080495: stoi 2024/01/15 10:11:17.072600 [INFO] Added 3019 culdesac roundabouts from 13186 candidates. 2024/01/15 10:11:17.073358 [INFO] Finished with 9286163 routable ways containing 123817922 nodes 2024/01/15 10:11:17.226656 [INFO] Sorting osm access tags by way id... 2024/01/15 10:11:18.620148 [INFO] Finished 2024/01/15 10:11:18.649930 [INFO] Write OSMData to temp files 2024/01/15 10:11:18.703851 [INFO] Done 2024/01/15 10:11:18.752145 [INFO] Parsing files for relations: /custom_files/india-latest.osm.pbf 2024/01/15 10:11:18.783685 [INFO] Parsing relations... 2024/01/15 10:12:00.516645 [INFO] Finished with 2013 simple restrictions 2024/01/15 10:12:00.518443 [INFO] Finished with 0 lane connections 2024/01/15 10:12:00.521838 [INFO] Sorting complex restrictions by from id... 2024/01/15 10:12:00.525524 [INFO] Sorting complex restrictions by to id... 2024/01/15 10:12:00.527387 [INFO] Finished 2024/01/15 10:12:00.528010 [INFO] Write OSMData to temp files 2024/01/15 10:12:00.547806 [INFO] Done 2024/01/15 10:12:00.550463 [INFO] Parsing files for nodes: /custom_files/india-latest.osm.pbf 2024/01/15 10:12:00.651594 [INFO] Sorting osm way node references by node id... 2024/01/15 10:16:38.549684 [INFO] Parsing nodes... 2024/01/15 10:23:13.224829 [INFO] Finished with 110295675 nodes contained in routable ways 2024/01/15 10:23:13.225844 [INFO] Sorting osm way node references by way index and node shape index... 2024/01/15 10:27:37.765048 [INFO] Finished: max_osm_id 11509590111 2024/01/15 10:27:37.765733 [INFO] Number of nodes with refs (exits) = 127 2024/01/15 10:27:37.767938 [INFO] Number of nodes with exit_to = 3 2024/01/15 10:27:37.767954 [INFO] Number of nodes with names = 5199 2024/01/15 10:27:37.767959 [INFO] Number of way refs = 368 2024/01/15 10:27:37.767975 [INFO] Number of reverse way refs = 0 2024/01/15 10:27:37.768205 [INFO] Unique Node Strings (names, refs, etc.) = 3876 2024/01/15 10:27:37.768221 [INFO] Unique Strings (names, refs, etc.) = 82463 2024/01/15 10:27:37.778804 [INFO] Write OSMData to temp files 2024/01/15 10:27:37.838423 [INFO] Done 2024/01/15 10:27:37.842734 [INFO] Creating graph edges from ways... 2024/01/15 10:28:04.040401 [INFO] Finished with 21092906 graph edges 2024/01/15 10:28:04.226694 [INFO] Sorting graph... 2024/01/15 10:29:18.072806 [INFO] Nodes processed. Sorting begin and end nodes by edge. 2024/01/15 10:29:25.500424 [INFO] Sorting begin and end nodes done. Populating edges... 2024/01/15 10:29:26.885083 [INFO] Finished with 16856822 graph nodes 2024/01/15 10:29:27.168004 [INFO] Writing tile manifest to /custom_files/valhalla_tiles/tile_manifest.json 2024/01/15 10:29:27.175435 [INFO] Reclassifying_V2 link graph edges... 2024/01/15 10:29:40.552143 [INFO] Class: 0 exit count = 799 2024/01/15 10:29:40.553125 [INFO] Class: 1 exit count = 16608 2024/01/15 10:29:40.553314 [INFO] Class: 2 exit count = 9667 2024/01/15 10:29:40.553329 [INFO] Class: 3 exit count = 7600 2024/01/15 10:29:40.553333 [INFO] Class: 4 exit count = 10265 2024/01/15 10:29:40.553340 [INFO] Class: 5 exit count = 3371 2024/01/15 10:29:40.553343 [INFO] Class: 6 exit count = 13977 2024/01/15 10:29:40.553363 [INFO] Class: 7 exit count = 0 2024/01/15 10:30:00.952316 [INFO] Finished with 34591 reclassified. Turn channel count = 15366 2024/01/15 10:30:01.041621 [INFO] Reclassifying ferry connection graph edges... 2024/01/15 10:30:18.439764 [INFO] Finished ReclassifyFerryEdges: ferry_endpoint_count = 223, 3146 edges reclassified. Failed both directions for 57 connections. 2024/01/15 10:30:18.690555 [INFO] Building 4876 tiles with 8 threads... 2024/01/15 10:30:21.700797 [WARN] Admin db /custom_files/admin_data/admins.sqlite not found. Not saving admin information. 2024/01/15 10:30:21.700866 [WARN] Admin db /custom_files/admin_data/admins.sqlite not found. Not saving admin information. 2024/01/15 10:30:21.700824 [WARN] Admin db /custom_files/admin_data/admins.sqlite not found. Not saving admin information. 2024/01/15 10:30:21.700858 [WARN] Admin db /custom_files/admin_data/admins.sqlite not found. Not saving admin information. 2024/01/15 10:30:21.700839 [WARN] Admin db /custom_files/admin_data/admins.sqlite not found. Not saving admin information. 2024/01/15 10:30:21.700797 [WARN] Admin db /custom_files/admin_data/admins.sqlite not found. Not saving admin information. 2024/01/15 10:30:21.700805 [WARN] Admin db /custom_files/admin_data/admins.sqlite not found. Not saving admin information. 2024/01/15 10:30:21.700797 [WARN] Admin db /custom_files/admin_data/admins.sqlite not found. Not saving admin information. 2024/01/15 10:30:21.703073 [WARN] Time zone db /custom_files/timezone_data/timezones.sqlite not found. Not saving time zone information. 2024/01/15 10:30:21.703156 [WARN] Time zone db /custom_files/timezone_data/timezones.sqlite not found. Not saving time zone information. 2024/01/15 10:30:21.703261 [WARN] Time zone db /custom_files/timezone_data/timezones.sqlite not found. Not saving time zone information. 2024/01/15 10:30:21.703356 [WARN] Time zone db /custom_files/timezone_data/timezones.sqlite not found. Not saving time zone information. 2024/01/15 10:30:21.703449 [WARN] Time zone db /custom_files/timezone_data/timezones.sqlite not found. Not saving time zone information. 2024/01/15 10:30:21.703521 [WARN] Time zone db /custom_files/timezone_data/timezones.sqlite not found. Not saving time zone information. 2024/01/15 10:30:21.703622 [WARN] Time zone db /custom_files/timezone_data/timezones.sqlite not found. Not saving time zone information. 2024/01/15 10:30:21.703701 [WARN] Time zone db /custom_files/timezone_data/timezones.sqlite not found. Not saving time zone information. 2024/01/15 10:39:22.928985 [INFO] Finished 2024/01/15 10:39:22.957308 [INFO] Node Count = 16856822 2024/01/15 10:39:22.957355 [INFO] Directed Edge Count = 42185812 2024/01/15 10:39:22.957369 [INFO] EdgeInfo Count = 21249443

=============================== = Enhancing the initial graph =

2024/01/15 10:39:23.485986 [INFO] Running valhalla_build_tiles with 8 thread(s). 2024/01/15 10:39:23.488104 [INFO] Start stage = enhance End stage = cleanup 2024/01/15 10:39:23.489791 [INFO] Read OSMData unique_names from temp file 2024/01/15 10:39:23.526925 [INFO] Done 2024/01/15 10:39:23.527342 [INFO] Enhancing local graph... 2024/01/15 10:39:23.665061 [WARN] Admin db /custom_files/admin_data/admins.sqlite not found. Not saving admin information. 2024/01/15 10:39:23.665130 [WARN] Admin db /custom_files/admin_data/admins.sqlite not found. Not saving admin information. 2024/01/15 10:39:23.665236 [WARN] Admin db /custom_files/admin_data/admins.sqlite not found. Not saving admin information. 2024/01/15 10:39:23.665295 [WARN] Admin db /custom_files/admin_data/admins.sqlite not found. Not saving admin information. 2024/01/15 10:39:23.665416 [WARN] Admin db /custom_files/admin_data/admins.sqlite not found. Not saving admin information. 2024/01/15 10:39:23.665490 [WARN] Admin db /custom_files/admin_data/admins.sqlite not found. Not saving admin information. 2024/01/15 10:39:23.665565 [WARN] Admin db /custom_files/admin_data/admins.sqlite not found. Not saving admin information. 2024/01/15 10:39:23.665667 [WARN] Admin db /custom_files/admin_data/admins.sqlite not found. Not saving admin information. 2024/01/15 10:39:23.694063 [INFO] Disabled default speeds assignment from config 2024/01/15 10:39:23.702136 [INFO] Disabled default speeds assignment from config 2024/01/15 10:39:23.706750 [INFO] Disabled default speeds assignment from config 2024/01/15 10:39:23.715017 [INFO] Disabled default speeds assignment from config 2024/01/15 10:39:23.716731 [INFO] Disabled default speeds assignment from config 2024/01/15 10:39:23.717804 [INFO] Disabled default speeds assignment from config 2024/01/15 10:39:23.723645 [INFO] Disabled default speeds assignment from config 2024/01/15 10:39:23.736771 [INFO] Disabled default speeds assignment from config /valhalla/scripts/configure_valhalla.sh: line 210: 191 Killed valhalla_build_tiles -c ${CONFIG_FILE} -s enhance ${files}

INFO: Running container with user valhalla UID 59999 and GID 59999.

find: '/custom_files/transit_tiles': No such file or directory WARNING: Hash not found for: /custom_files/india-latest.osm.pbf! INFO: Found routing tiles with 'use_tiles_ignore_pbf' True. INFO: Jumping directly to the tile loading! 2024-01-15 11:25:31,850 INFO: Finished tarring 4876 tiles to /custom_files/valhalla_tiles.tar WARNING: User valhalla is running with sudo privileges. Try building the image with a host user's UID & GID. INFO: Found config file. Starting valhalla service! 2024/01/15 11:26:42.092761 [INFO] Tile extract successfully loaded with tile count: 4876 2024/01/15 11:26:42.092778 [INFO] Tile extract successfully loaded with tile count: 4876 2024/01/15 11:26:42.092834 [INFO] Tile extract successfully loaded with tile count: 4876 2024/01/15 11:26:42.092852 [INFO] Tile extract successfully loaded with tile count: 4876 2024/01/15 11:26:42.093065 [INFO] Tile extract successfully loaded with tile count: 4876 2024/01/15 11:26:42.093084 [INFO] Tile extract successfully loaded with tile count: 4876 2024/01/15 11:26:42.093135 [INFO] Tile extract successfully loaded with tile count: 4876 2024/01/15 11:26:42.093188 [INFO] Tile extract successfully loaded with tile count: 4876 2024/01/15 11:26:42.164503 [INFO] Tile extract successfully loaded with tile count: 4876 2024/01/15 11:26:42.166344 [INFO] Tile extract successfully loaded with tile count: 4876 2024/01/15 11:26:42.166978 [INFO] Tile extract successfully loaded with tile count: 4876 2024/01/15 11:26:42.168103 [INFO] Tile extract successfully loaded with tile count: 4876 2024/01/15 11:26:42.168502 [INFO] Tile extract successfully loaded with tile count: 4876 2024/01/15 11:26:42.168558 [INFO] Tile extract successfully loaded with tile count: 4876 2024/01/15 11:26:42.168701 [INFO] Tile extract successfully loaded with tile count: 4876 2024/01/15 11:26:42.168716 [INFO] Tile extract successfully loaded with tile count: 4876 2024/01/15 11:26:42.261778 [WARN] (stat): /custom_files/traffic.tar No such file or directory 2024/01/15 11:26:42.261809 [WARN] (stat): /custom_files/traffic.tar No such file or directory 2024/01/15 11:26:42.261820 [WARN] (stat): /custom_files/traffic.tar No such file or directory 2024/01/15 11:26:42.261836 [WARN] Traffic tile extract could not be loaded 2024/01/15 11:26:42.261865 [WARN] (stat): /custom_files/traffic.tar No such file or directory 2024/01/15 11:26:42.261884 [WARN] Traffic tile extract could not be loaded 2024/01/15 11:26:42.261895 [WARN] Traffic tile extract could not be loaded 2024/01/15 11:26:42.261883 [WARN] (stat): /custom_files/traffic.tar No such file or directory 2024/01/15 11:26:42.261920 [WARN] Traffic tile extract could not be loaded 2024/01/15 11:26:42.261790 [WARN] (stat): /custom_files/traffic.tar No such file or directory 2024/01/15 11:26:42.261978 [WARN] Traffic tile extract could not be loaded 2024/01/15 11:26:42.261986 [WARN] (stat): /custom_files/traffic.tar No such file or directory 2024/01/15 11:26:42.261994 [WARN] Traffic tile extract could not be loaded 2024/01/15 11:26:42.261940 [WARN] (stat): /custom_files/traffic.tar No such file or directory 2024/01/15 11:26:42.262007 [WARN] Traffic tile extract could not be loaded 2024/01/15 11:26:42.262013 [WARN] (stat): /custom_files/traffic.tar No such file or directory 2024/01/15 11:26:42.262020 [WARN] Traffic tile extract could not be loaded 2024/01/15 11:26:42.261828 [WARN] Traffic tile extract could not be loaded 2024/01/15 11:26:42.262039 [WARN] (stat): /custom_files/traffic.tar No such file or directory 2024/01/15 11:26:42.262050 [WARN] Traffic tile extract could not be loaded 2024/01/15 11:26:42.262106 [WARN] (stat): /custom_files/traffic.tar No such file or directory 2024/01/15 11:26:42.262118 [WARN] Traffic tile extract could not be loaded 2024/01/15 11:26:42.262163 [WARN] (stat): /custom_files/traffic.tar No such file or directory 2024/01/15 11:26:42.262173 [WARN] Traffic tile extract could not be loaded 2024/01/15 11:26:42.262185 [WARN] (stat): /custom_files/traffic.tar No such file or directory 2024/01/15 11:26:42.262219 [WARN] (stat): /custom_files/traffic.tar No such file or directory 2024/01/15 11:26:42.262240 [WARN] Traffic tile extract could not be loaded 2024/01/15 11:26:42.262221 [WARN] Traffic tile extract could not be loaded 2024/01/15 11:26:42.262332 [WARN] (stat): /custom_files/traffic.tar No such file or directory 2024/01/15 11:26:42.262343 [WARN] Traffic tile extract could not be loaded 2024/01/15 11:26:42.262350 [WARN] (stat): /custom_files/traffic.tar No such file or directory 2024/01/15 11:26:42.262358 [WARN] Traffic tile extract could not be loaded 0 2024/01/15 11:27:34.174268 GET /route HTTP/1.1 2024/01/15 11:27:34.177443 [INFO] Got Loki Request 0 2024/01/15 11:27:34.251753 [WARN] 400::No suitable edges near location request_id=0 0 2024/01/15 11:27:34.255082 400 228 1 2024/01/15 11:27:38.407917 GET /route HTTP/1.1 2024/01/15 11:27:38.408523 [INFO] Got Loki Request 1 2024/01/15 11:27:38.410635 [WARN] 400::No suitable edges near location request_id=1 1 2024/01/15 11:27:38.411040 400 228 ➜ docker_test curl http://localhost:8002/route --data '{"locations":[{"lat":28.7573925,"lon":77.2783296,"type":"break"},{"lat":28.8432142,"lon":78.6116628,"type":"break"}],"costing":"auto","directions_options":{"units":"miles"}}' | jq '.' % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 274 100 101 100 173 2930 5019 --:--:-- --:--:-- --:--:-- 8058 { "error_code": 171, "error": "No suitable edges near location", "status_code": 400, "status": "Bad Request" }

Additional information

I am running it with: CPU Limit: 8 Memory Limit: 4 GB Swap: 1 GB Virtual Disk Limit: 64 GB

I also referred Issue on valhalla, but it seems to be outdated. I would appreciate any guidance or assistance.

nilsnolde commented 10 months ago

/valhalla/scripts/configure_valhalla.sh: line 210: 191 Killed valhalla_build_tiles -c ${CONFIG_FILE} -s enhance ${files}

You'll need more memory than 4 GB. If you have 64 GB, why not give it at least 12 GB? That'll make it succeed.