Help with openrouteservice via docker

Hi guys, newbie here and I really would like to know how to install osr with docker. I know that there are different guides but I’m stuck after the docker installation: no images and containers yet. I really would like to set up theese programs properly in order to work on vehicle routing problems and other stuff?
Thank you very much guys.

PS: I don’t know if this is off topic but I’ve read that osr can work with vroom: is it good to use it for routing optimization toghether with openrouteservice? How can I install it in a correct way with docker once I’ve installed openrouteservice?

1 Like

I could really use a step by step guide or Youtube video as well.

1 Like

The documentation in the ORS Github repo should generally be enough (provided you learn docker(-compose) a little bit). If not, things could probably be improved in the documentation, but then you’ll have to give the exact pain points,

Vroom is here:

1 Like

Thanks but I’ve decided to go for OSR tools on Qgis because, if I’m not mistaken, it includes something about Vroom (sorry for my bad English). Anyway, I’ll open a New topic about osr tools usage because I need some help and explanations.

Hello all!
Here is another newbie :slightly_smiling_face:
I’ve cloned the repo then did docker-compose … nothing else.
then I wanted to see if it works with http://localhost:8080/ors/v2/health endpoint.
but it gives ‘not ready’ as response since yesterday :roll_eyes:
can you please help me to understand if I missed a step?

Thanks in advance.

your best bet is to look at the docker logs as that would tell you if there was an error (docker logs ors-app I believe)

ok Adam, will do. thanks!

Hello again, unfortunately I could not solve the problem. As I said before I don’t have too much experience with docker. I will share the docker log and other changes I made. Can you please take a look and let me know how I can fix it?

ors.log:

    2020-12-21 12:45:50,671 INFO [ors.Application] - Starting Application v6.3.2 on 836e93d891f9 with PID 112 (/usr/local/tomcat/webapps/ors/WEB-INF/classes started by root in /ors-core)
2020-12-21 12:45:50,676 DEBUG [ors.Application] - Running with Spring Boot v2.3.5.RELEASE, Spring v5.2.10.RELEASE
2020-12-21 12:45:50,680 INFO [ors.Application] - No active profile set, falling back to default profiles: default
2020-12-21 12:45:53,435 INFO [ors.Application] - Started Application in 3.724 seconds (JVM running for 7.957)
2020-12-21 12:45:53,561 INFO [routing.RoutingProfileManager] -  Total - 1024 MB, Free - 657.92 MB, Max: 4 GB, Used - 366.08 MB
2020-12-21 12:45:53,563 INFO [routing.RoutingProfileManager] -       
2020-12-21 12:45:53,605 INFO [routing.RoutingProfileManager] - ====> Initializing profiles from 'data/osm_file.pbf' (1 threads) ...
2020-12-21 12:45:53,608 INFO [routing.RoutingProfileManager] -                               
2020-12-21 12:45:53,618 INFO [routing.RoutingProfileManager] -                
2020-12-21 12:45:53,653 INFO [routing.RoutingProfile] - [1] Profiles: 'driving-car', location: 'data/graphs/car'.
2020-12-21 12:46:40,972 ERROR [routing.RoutingProfileManager] - java.util.concurrent.ExecutionException: java.lang.RuntimeException: Couldn't process file data/osm_file.pbf, error: Can't decode srtm_37_02.tif
2020-12-21 12:46:40,973 ERROR [routing.RoutingProfileManager] - Failed to initialize RoutingProfileManager instance.
java.util.concurrent.ExecutionException: java.lang.RuntimeException: Couldn't process file data/osm_file.pbf, error: Can't decode srtm_37_02.tif
	at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:?]
	at java.util.concurrent.FutureTask.get(FutureTask.java:191) ~[?:?]
	at org.heigit.ors.routing.RoutingProfileManager.initialize(RoutingProfileManager.java:164) ~[classes/:6.3.2]
	at org.heigit.ors.routing.RoutingProfileManager.getInstance(RoutingProfileManager.java:59) ~[classes/:6.3.2]
	at org.heigit.ors.servlet.listeners.ORSInitContextListener.lambda$contextInitialized$0(ORSInitContextListener.java:40) ~[classes/:6.3.2]
	at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: java.lang.RuntimeException: Couldn't process file data/osm_file.pbf, error: Can't decode srtm_37_02.tif
	at com.graphhopper.reader.osm.OSMReader.writeOsm2Graph(OSMReader.java:326) ~[graphhopper-reader-osm-v0.13.9.jar:?]
	at com.graphhopper.reader.osm.OSMReader.readGraph(OSMReader.java:178) ~[graphhopper-reader-osm-v0.13.9.jar:?]
	at com.graphhopper.GraphHopper.importData(GraphHopper.java:735) ~[graphhopper-core-v0.13.9.jar:?]
	at com.graphhopper.GraphHopper.readData(GraphHopper.java:714) ~[graphhopper-core-v0.13.9.jar:?]
	at com.graphhopper.GraphHopper.process(GraphHopper.java:701) ~[graphhopper-core-v0.13.9.jar:?]
	at com.graphhopper.GraphHopper.importOrLoad(GraphHopper.java:680) ~[graphhopper-core-v0.13.9.jar:?]
	at org.heigit.ors.routing.graphhopper.extensions.ORSGraphHopper.importOrLoad(ORSGraphHopper.java:159) ~[classes/:6.3.2]
	at org.heigit.ors.routing.RoutingProfile.initGraphHopper(RoutingProfile.java:191) ~[classes/:6.3.2]
	at org.heigit.ors.routing.RoutingProfile.<init>(RoutingProfile.java:135) ~[classes/:6.3.2]
	at org.heigit.ors.routing.RoutingProfileLoader.call(RoutingProfileLoader.java:35) ~[classes/:6.3.2]
	at org.heigit.ors.routing.RoutingProfileLoader.call(RoutingProfileLoader.java:21) ~[classes/:6.3.2]
	at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ~[?:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[?:?]
	... 1 more
Caused by: java.lang.RuntimeException: Can't decode srtm_37_02.tif
	at com.graphhopper.reader.dem.CGIARProvider.generateRasterFromFile(CGIARProvider.java:112) ~[graphhopper-core-v0.13.9.jar:?]
	at com.graphhopper.reader.dem.AbstractTiffElevationProvider.getEle(AbstractTiffElevationProvider.java:133) ~[graphhopper-core-v0.13.9.jar:?]
	at com.graphhopper.reader.dem.MultiSourceElevationProvider.getEle(MultiSourceElevationProvider.java:52) ~[graphhopper-core-v0.13.9.jar:?]
	at com.graphhopper.reader.osm.OSMReader.getElevation(OSMReader.java:715) ~[graphhopper-reader-osm-v0.13.9.jar:?]
	at org.heigit.ors.routing.graphhopper.extensions.ORSOSMReader.getElevation(ORSOSMReader.java:433) ~[classes/:6.3.2]
	at com.graphhopper.reader.osm.OSMReader.addNode(OSMReader.java:676) ~[graphhopper-reader-osm-v0.13.9.jar:?]
	at com.graphhopper.reader.osm.OSMReader.processNode(OSMReader.java:641) ~[graphhopper-reader-osm-v0.13.9.jar:?]
	at com.graphhopper.reader.osm.OSMReader.writeOsm2Graph(OSMReader.java:293) ~[graphhopper-reader-osm-v0.13.9.jar:?]
	at com.graphhopper.reader.osm.OSMReader.readGraph(OSMReader.java:178) ~[graphhopper-reader-osm-v0.13.9.jar:?]
	at com.graphhopper.GraphHopper.importData(GraphHopper.java:735) ~[graphhopper-core-v0.13.9.jar:?]
	at com.graphhopper.GraphHopper.readData(GraphHopper.java:714) ~[graphhopper-core-v0.13.9.jar:?]
	at com.graphhopper.GraphHopper.process(GraphHopper.java:701) ~[graphhopper-core-v0.13.9.jar:?]
	at com.graphhopper.GraphHopper.importOrLoad(GraphHopper.java:680) ~[graphhopper-core-v0.13.9.jar:?]
	at org.heigit.ors.routing.graphhopper.extensions.ORSGraphHopper.importOrLoad(ORSGraphHopper.java:159) ~[classes/:6.3.2]
	at org.heigit.ors.routing.RoutingProfile.initGraphHopper(RoutingProfile.java:191) ~[classes/:6.3.2]
	at org.heigit.ors.routing.RoutingProfile.<init>(RoutingProfile.java:135) ~[classes/:6.3.2]
	at org.heigit.ors.routing.RoutingProfileLoader.call(RoutingProfileLoader.java:35) ~[classes/:6.3.2]
	at org.heigit.ors.routing.RoutingProfileLoader.call(RoutingProfileLoader.java:21) ~[classes/:6.3.2]
	at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ~[?:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[?:?]
	... 1 more
Caused by: java.io.EOFException
	at org.apache.xmlgraphics.image.codec.util.SeekableStream.readUnsignedShort(SeekableStream.java:483) ~[xmlgraphics-commons-2.3.jar:2.3]
	at org.apache.xmlgraphics.image.codec.tiff.TIFFDirectory.getNumDirectories(TIFFDirectory.java:590) ~[xmlgraphics-commons-2.3.jar:2.3]
	at org.apache.xmlgraphics.image.codec.tiff.TIFFImageDecoder.getNumPages(TIFFImageDecoder.java:81) ~[xmlgraphics-commons-2.3.jar:2.3]
	at org.apache.xmlgraphics.image.codec.tiff.TIFFImageDecoder.decodeAsRenderedImage(TIFFImageDecoder.java:85) ~[xmlgraphics-commons-2.3.jar:2.3]
	at org.apache.xmlgraphics.image.codec.util.ImageDecoderImpl.decodeAsRaster(ImageDecoderImpl.java:136) ~[xmlgraphics-commons-2.3.jar:2.3]
	at org.apache.xmlgraphics.image.codec.util.ImageDecoderImpl.decodeAsRaster(ImageDecoderImpl.java:122) ~[xmlgraphics-commons-2.3.jar:2.3]
	at com.graphhopper.reader.dem.CGIARProvider.generateRasterFromFile(CGIARProvider.java:110) ~[graphhopper-core-v0.13.9.jar:?]
	at com.graphhopper.reader.dem.AbstractTiffElevationProvider.getEle(AbstractTiffElevationProvider.java:133) ~[graphhopper-core-v0.13.9.jar:?]
	at com.graphhopper.reader.dem.MultiSourceElevationProvider.getEle(MultiSourceElevationProvider.java:52) ~[graphhopper-core-v0.13.9.jar:?]
	at com.graphhopper.reader.osm.OSMReader.getElevation(OSMReader.java:715) ~[graphhopper-reader-osm-v0.13.9.jar:?]
	at org.heigit.ors.routing.graphhopper.extensions.ORSOSMReader.getElevation(ORSOSMReader.java:433) ~[classes/:6.3.2]
	at com.graphhopper.reader.osm.OSMReader.addNode(OSMReader.java:676) ~[graphhopper-reader-osm-v0.13.9.jar:?]
	at com.graphhopper.reader.osm.OSMReader.processNode(OSMReader.java:641) ~[graphhopper-reader-osm-v0.13.9.jar:?]
	at com.graphhopper.reader.osm.OSMReader.writeOsm2Graph(OSMReader.java:293) ~[graphhopper-reader-osm-v0.13.9.jar:?]
	at com.graphhopper.reader.osm.OSMReader.readGraph(OSMReader.java:178) ~[graphhopper-reader-osm-v0.13.9.jar:?]
	at com.graphhopper.GraphHopper.importData(GraphHopper.java:735) ~[graphhopper-core-v0.13.9.jar:?]
	at com.graphhopper.GraphHopper.readData(GraphHopper.java:714) ~[graphhopper-core-v0.13.9.jar:?]
	at com.graphhopper.GraphHopper.process(GraphHopper.java:701) ~[graphhopper-core-v0.13.9.jar:?]
	at com.graphhopper.GraphHopper.importOrLoad(GraphHopper.java:680) ~[graphhopper-core-v0.13.9.jar:?]
	at org.heigit.ors.routing.graphhopper.extensions.ORSGraphHopper.importOrLoad(ORSGraphHopper.java:159) ~[classes/:6.3.2]
	at org.heigit.ors.routing.RoutingProfile.initGraphHopper(RoutingProfile.java:191) ~[classes/:6.3.2]
	at org.heigit.ors.routing.RoutingProfile.<init>(RoutingProfile.java:135) ~[classes/:6.3.2]
	at org.heigit.ors.routing.RoutingProfileLoader.call(RoutingProfileLoader.java:35) ~[classes/:6.3.2]
	at org.heigit.ors.routing.RoutingProfileLoader.call(RoutingProfileLoader.java:21) ~[classes/:6.3.2]
	at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ~[?:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[?:?]
	... 1 more
2020-12-21 12:46:40,983 INFO [routing.RoutingProfileManager] - ====> Recycling garbage...
2020-12-21 12:46:40,984 INFO [routing.RoutingProfileManager] - Before:  Total - 1.38 GB, Free - 925.34 MB, Max: 4 GB, Used - 492.66 MB
2020-12-21 12:46:41,096 INFO [routing.RoutingProfileManager] - After:  Total - 1024 MB, Free - 995.84 MB, Max: 4 GB, Used - 28.16 MB
2020-12-21 12:46:41,098 INFO [routing.RoutingProfileManager] - ========================================================================
2020-12-21 12:46:41,099 INFO [routing.RoutingProfileManager] - ====> Memory usage by profiles:
2020-12-21 12:46:41,103 INFO [routing.RoutingProfileManager] - Total: 0 B (0.0%)
2020-12-21 12:46:41,104 INFO [routing.RoutingProfileManager] - ========================================================================

docker-compose.yml:

version: '2.4'
services:
  ors-app:
    container_name: ors-app
    ports:
      - 8080:8080
      - 9001:9001
    image: openrouteservice/openrouteservice:latest
    build:
     context: ../
     args:
       APP_CONFIG: ./openrouteservice/src/main/resources/app.config.sample
       OSM_FILE: ./openrouteservice/src/main/files/netherlands-latest.osm.pbf
    volumes:
      - ./graphs:/ors-core/data/graphs
      - ./elevation_cache:/ors-core/data/elevation_cache
      - ./logs/ors:/var/log/ors
      - ./logs/tomcat:/usr/local/tomcat/logs
      - ./conf:/ors-conf
      - ../openrouteservice/src/main/files/netherlands-latest.osm.pbf:/ors-core/data/osm_file.pbf
    environment:
      - BUILD_GRAPHS=True  # Forces the container to rebuild the graphs, e.g. when PBF is changed
      - "JAVA_OPTS=-Djava.awt.headless=true -server -XX:TargetSurvivorRatio=75 -XX:SurvivorRatio=64 -XX:MaxTenuringThreshold=3 -XX:+UseG1GC -XX:+ScavengeBeforeFullGC -XX:ParallelGCThreads=4 -Xms1g -Xmx4g"
      - "CATALINA_OPTS=-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9001 -Dcom.sun.management.jmxremote.rmi.port=9001 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=localhost"

Screenshot 2020-12-21 at 14.02.20

Definitely necroposting but just in case anyone has this issue, I had an error similar to “Can’t decode srtm_37_02.tif” and the fix was to turn off elevation parsing. If you need elevation maps, consider changing the plugin used for elevation mapping. Both these things can be done in the app.config.

Here’s an excerpt from my app.config:

{
  "ors": {
    "services": {
      "routing": {
        "enabled": true,
        "elevation_preprocessed": false,
        "profiles": {
          "active": [
            "car",
          ],
          "default_params": {
            "elevation_provider": "multi",
            "elevation_cache_path": "cgiar_provider",
            "elevation_cache_clear": false
          },
          "profile-car": {
            "parameters": {
              "elevation": false

In particular, note the elevation: false and elevation_provider. The provider settings can be amended in line with what provider you wish to use. As for what the acceptable values are there, I’ve no idea.