2020-06-05 11:37:38,993 INFO [ors.Application] - Starting Application v6.1.1 on rki-osm with PID 9 (/usr/local/tomcat/webapps/ors/WEB-INF/classes started by root in /ors-core)
2020-06-05 11:37:38,994 DEBUG [ors.Application] - Running with Spring Boot v2.0.4.RELEASE, Spring v5.0.8.RELEASE
2020-06-05 11:37:38,995 INFO [ors.Application] - No active profile set, falling back to default profiles: default
2020-06-05 11:37:41,373 INFO [ors.Application] - Started Application in 3.036 seconds (JVM running for 6.084)
2020-06-05 11:37:41,391 INFO [routing.RoutingProfileManager] - Total - 4.00 GB, Free - 3.86 GB, Max: 10.00 GB, Used - 134.44 MB
2020-06-05 11:37:41,391 INFO [routing.RoutingProfileManager] -
2020-06-05 11:37:41,404 INFO [routing.RoutingProfileManager] - ====> Initializing profiles from 'data/osm_file.pbf' (2 threads) ...
2020-06-05 11:37:41,405 INFO [routing.RoutingProfileManager] -
2020-06-05 11:37:41,410 INFO [routing.RoutingProfileManager] -
2020-06-05 11:37:41,423 INFO [routing.RoutingProfile] - [2] Profiles: 'driving-car', location: 'data/graphs/car'.
2020-06-05 11:37:41,423 INFO [routing.RoutingProfile] - [1] Profiles: 'cycling-regular', location: 'data/graphs/bike-regular'.
2020-06-05 11:37:45,393 ERROR [routing.RoutingProfileManager] - java.util.concurrent.ExecutionException: java.lang.RuntimeException: Couldn't process file data/osm_file.pbf, error: Index: 8094500, Size: 0
2020-06-05 11:37:45,394 ERROR [routing.RoutingProfileManager] - Failed to initialize RoutingProfileManager instance.
java.util.concurrent.ExecutionException: java.lang.RuntimeException: Couldn't process file data/osm_file.pbf, error: Index: 8094500, Size: 0
at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:1.8.0_252]
at java.util.concurrent.FutureTask.get(FutureTask.java:192) ~[?:1.8.0_252]
at org.heigit.ors.routing.RoutingProfileManager.initialize(RoutingProfileManager.java:162) ~[classes/:6.1.1]
at org.heigit.ors.routing.RoutingProfileManager.getInstance(RoutingProfileManager.java:57) ~[classes/:6.1.1]
at org.heigit.ors.servlet.listeners.ORSInitContextListener.lambda$contextInitialized$0(ORSInitContextListener.java:40) ~[classes/:6.1.1]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_252]
Caused by: java.lang.RuntimeException: Couldn't process file data/osm_file.pbf, error: Index: 8094500, Size: 0
at com.graphhopper.reader.osm.OSMReader.writeOsm2Graph(OSMReader.java:324) ~[graphhopper-reader-osm-v0.13.4.jar:?]
at com.graphhopper.reader.osm.OSMReader.readGraph(OSMReader.java:176) ~[graphhopper-reader-osm-v0.13.4.jar:?]
at com.graphhopper.GraphHopper.importData(GraphHopper.java:735) ~[graphhopper-core-v0.13.4.jar:?]
at com.graphhopper.GraphHopper.readData(GraphHopper.java:714) ~[graphhopper-core-v0.13.4.jar:?]
at com.graphhopper.GraphHopper.process(GraphHopper.java:701) ~[graphhopper-core-v0.13.4.jar:?]
at com.graphhopper.GraphHopper.importOrLoad(GraphHopper.java:680) ~[graphhopper-core-v0.13.4.jar:?]
at org.heigit.ors.routing.graphhopper.extensions.ORSGraphHopper.importOrLoad(ORSGraphHopper.java:131) ~[classes/:6.1.1]
at org.heigit.ors.routing.RoutingProfile.initGraphHopper(RoutingProfile.java:181) ~[classes/:6.1.1]
at org.heigit.ors.routing.RoutingProfile.<init>(RoutingProfile.java:127) ~[classes/:6.1.1]
at org.heigit.ors.routing.RoutingProfileLoader.call(RoutingProfileLoader.java:35) ~[classes/:6.1.1]
at org.heigit.ors.routing.RoutingProfileLoader.call(RoutingProfileLoader.java:21) ~[classes/:6.1.1]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_252]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_252]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_252]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:1.8.0_252]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:1.8.0_252]
... 1 more
Caused by: java.lang.IndexOutOfBoundsException: Index: 8094500, Size: 0
at java.util.ArrayList.rangeCheck(ArrayList.java:657) ~[?:1.8.0_252]
at java.util.ArrayList.get(ArrayList.java:433) ~[?:1.8.0_252]
at com.graphhopper.storage.MMapDataAccess.getShort(MMapDataAccess.java:367) ~[graphhopper-core-v0.13.4.jar:?]
at com.graphhopper.reader.dem.HeightTile.getHeight(HeightTile.java:100) ~[graphhopper-core-v0.13.4.jar:?]
at com.graphhopper.reader.dem.AbstractTiffElevationProvider.getEle(AbstractTiffElevationProvider.java:142) ~[graphhopper-core-v0.13.4.jar:?]
at com.graphhopper.reader.dem.MultiSourceElevationProvider.getEle(MultiSourceElevationProvider.java:52) ~[graphhopper-core-v0.13.4.jar:?]
at com.graphhopper.reader.osm.OSMReader.getElevation(OSMReader.java:683) ~[graphhopper-reader-osm-v0.13.4.jar:?]
at org.heigit.ors.routing.graphhopper.extensions.ORSOSMReader.getElevation(ORSOSMReader.java:432) ~[classes/:6.1.1]
at com.graphhopper.reader.osm.OSMReader.addNode(OSMReader.java:644) ~[graphhopper-reader-osm-v0.13.4.jar:?]
at com.graphhopper.reader.osm.OSMReader.processNode(OSMReader.java:609) ~[graphhopper-reader-osm-v0.13.4.jar:?]
at com.graphhopper.reader.osm.OSMReader.writeOsm2Graph(OSMReader.java:291) ~[graphhopper-reader-osm-v0.13.4.jar:?]
at com.graphhopper.reader.osm.OSMReader.readGraph(OSMReader.java:176) ~[graphhopper-reader-osm-v0.13.4.jar:?]
at com.graphhopper.GraphHopper.importData(GraphHopper.java:735) ~[graphhopper-core-v0.13.4.jar:?]
at com.graphhopper.GraphHopper.readData(GraphHopper.java:714) ~[graphhopper-core-v0.13.4.jar:?]
at com.graphhopper.GraphHopper.process(GraphHopper.java:701) ~[graphhopper-core-v0.13.4.jar:?]
at com.graphhopper.GraphHopper.importOrLoad(GraphHopper.java:680) ~[graphhopper-core-v0.13.4.jar:?]
at org.heigit.ors.routing.graphhopper.extensions.ORSGraphHopper.importOrLoad(ORSGraphHopper.java:131) ~[classes/:6.1.1]
at org.heigit.ors.routing.RoutingProfile.initGraphHopper(RoutingProfile.java:181) ~[classes/:6.1.1]
at org.heigit.ors.routing.RoutingProfile.<init>(RoutingProfile.java:127) ~[classes/:6.1.1]
at org.heigit.ors.routing.RoutingProfileLoader.call(RoutingProfileLoader.java:35) ~[classes/:6.1.1]
at org.heigit.ors.routing.RoutingProfileLoader.call(RoutingProfileLoader.java:21) ~[classes/:6.1.1]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_252]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_252]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_252]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:1.8.0_252]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:1.8.0_252]
... 1 more
2020-06-05 11:37:45,396 INFO [routing.RoutingProfileManager] - ====> Recycling garbage...
2020-06-05 11:37:45,396 INFO [routing.RoutingProfileManager] - Before: Total - 4.00 GB, Free - 3.82 GB, Max: 10.00 GB, Used - 180.52 MB
2020-06-05 11:37:45,573 INFO [routing.RoutingProfileManager] - After: Total - 4.00 GB, Free - 3.91 GB, Max: 10.00 GB, Used - 90.72 MB
2020-06-05 11:37:45,573 INFO [routing.RoutingProfileManager] - ========================================================================
2020-06-05 11:37:45,573 INFO [routing.RoutingProfileManager] - ====> Memory usage by profiles:
2020-06-05 11:37:45,574 INFO [routing.RoutingProfileManager] - Total: 0 B (0.0%)
2020-06-05 11:37:45,574 INFO [routing.RoutingProfileManager] - ========================================================================
Jo backend devs, feel free to join the discussion… Is that again some crap happening with the elevation tiles? Cc @takb@HendrikLeuschner@andrzej
Also @rki, do you already have elevation_tiles in the path specified in the app.config (usually ./elevation_tiles)? Or is this is so fresh that there’s no elevation data yet?
OK, so it’s a bit strange as the problem seems to only occur when using it in docker… But a way I managed to get it to work is to set "init_threads": 1 rather than the default 2 inside the app.config.sample file. Make sure you delete the elevation_cache and graphs folders from inside the docker folder though before you start it again just to make sure things are fresh
Not sure why setting the init threads to 1 makes it work, but it is a workaround until we can figure out more what is going on
It also “fixes” the init_threads: 1 issue. I think that’s mostly important when processing more than 1 profile for multi-threading (and then also doesn’t produce errors), but pretty sure @HendrikLeuschner can shed more light on this.
Thanks for your answering your awesome!
I’ve try on master branch to change the init_threads to 1, that didn’t work///
So i’ve checkout to your last PR (742-fix-docker) and type this :
build -t openrouteservice/openrouteservice:test_docker . without build args for try with the default city, in Germany. The build success but when i run, with this command : docker run --publish 8000:8080 --name test openrouteservice/openrouteservice:test_docker i get this
15 Jun 18:39:20 INFO [routing.RoutingProfileManager] - Total time: 94.371s.
15 Jun 18:39:20 INFO [routing.RoutingProfileManager] - ========================================================================
15 Jun 18:39:20 INFO [routing.RoutingProfileManager] - ====> Recycling garbage...
15 Jun 18:39:20 INFO [routing.RoutingProfileManager] - Before: Total - 1019 MB, Free - 636.49 MB, Max: 2.00 GB, Used - 382.51 MB
15 Jun 18:39:20 INFO [routing.RoutingProfileManager] - After: Total - 1019 MB, Free - 918.64 MB, Max: 2.00 GB, Used - 100.36 MB
15 Jun 18:39:20 INFO [routing.RoutingProfileManager] - ========================================================================
15 Jun 18:39:20 INFO [routing.RoutingProfileManager] - ====> Memory usage by profiles:
15 Jun 18:39:20 INFO [routing.RoutingProfileManager] - [1] 20.03 MB (19.8%)
15 Jun 18:39:20 INFO [routing.RoutingProfileManager] - Total: 20.03 MB (19.8%)
15 Jun 18:39:20 INFO [routing.RoutingProfileManager] - ========================================================================
And i get tomcat on localhost:8000 ! So it’s seem thats work !
But i don’t understand how that work after : what is the name_of_war_archive ? i’ve try localhost:8000/ors/routes return me and error “missing profile” but i didn’t get the route “geocode”, it is normal ?
The above shows that you are only building one profile (I don’t know which it is though) so the message is basically saying that you are trying to generate a route for profile that hasn’t been built.
We have some docs at https://openrouteservice.org/dev/#/api-docs which show you what the correct format for the queries should be. You should avoid using the v1 API version though as we will no long er be supporting that in upcoming versions, and instead use v2 where most of the content of a request is in the body of a post request.
To see what profiles are running you can use the http://localhost:8000/ors/v2/status endpoint and that will list the profiles that are running.
Profile is the travel method, e.g. car, pedestrian or bike. (http://localhost:8000/ors/v2/directions/driving-car - the driving-car is the profile)
When there is no information in the status about profiles, then that normally means that there was a problem in the build process, and so you would need to check the logs for any error messages.
Geocode is not part of the openrouteservice core code, and so you cannot call that endpoint without setting up your own geocoder on your system (we use Pelias for ours, and on their webpages they have information about setting it up). The endpoints that you have access to when you run openrouteservice locally are directions, matrix, and isochrones
rki@rki-osm:~/openrouteservice$ docker run --publish 8080:8080 --name test openrouteservice/openrouteservice:test_docker
cp: cannot create regular file ‘/ors-conf/app.config’: No such file or directory
and this one:
Caused by: java.net.SocketTimeoutException: Read timed out