Trouble installing ORS on Ubuntu 20.04

I have the following ubuntu server

Distributor ID: Ubuntu
Description: Ubuntu 20.04.5 LTS
Release: 20.04
Codename: focal

I am trying to deploy the openrouteservice using docker on this server.

Here are the steps I followed

  1. git clone

  2. cd docker && mkdir -p conf elevation_cache graphs logs/ors logs/tomcat && docker-compose up

After a while, I got the following message

187560 [INFO] Replacing main artifact with repackaged archive
187560 [INFO]
187560 [INFO] --- spring-boot-maven-plugin:2.3.5.RELEASE:repackage (default) @ openrouteservice ---
187566 [INFO] Replacing main artifact with repackaged archive
187567 [INFO] ------------------------------------------------------------------------
187567 [INFO] ------------------------------------------------------------------------
187569 [INFO] Total time:  03:06 min
187570 [INFO] Finished at: 2023-02-21T14:36:48Z
187570 [INFO] ------------------------------------------------------------------------

After a little while,

Step 44/44 : CMD ["/home/ors"]
 ---> Running in f58393f06346
Removing intermediate container f58393f06346
 ---> 038fbf32964f

Successfully built 038fbf32964f
Successfully tagged openrouteservice/openrouteservice:latest
WARNING: Image for service ors-app was built because it did not already exist. To rebuild this image you must use `docker-compose build` or `docker-compose up --build`.
Creating ors-app ... done
Attaching to ors-app
ors-app    | Running container as user root with id 0
ors-app    | ORS Path: /home/ors
ors-app    | Catalina Path: /home/ors/tomcat
ors-app    | ### openrouteservice configuration ###
ors-app    | No ors-config.json in ors-conf folder. Copying config from /home/ors/ors-core/ors-config.json
ors-app    | ### Package openrouteservice and deploy to Tomcat ###
ors-app    | Error relocating /opt/java/openjdk/bin/../lib/jli/ __strdup: symbol not found
ors-app    | Error relocating /opt/java/openjdk/bin/../lib/jli/ __rawmemchr: symbol not found

I get the above error. I am just following in the instructions given in the readme

Hi @Rajesh_Sharma ,
this might be the the same issue with the /home/ors folder.
You could try the suggestion from this topic:

Best regards

Here is my docker-compose.yml. Still the same error

version: '2.4'
    container_name: ors-app
      - "8080:8080"
      - "9001:9001"
    image: openrouteservice/openrouteservice:latest
    user: "${UID:-0}:${GID:-0}"
      context: ../
        ORS_CONFIG: ./openrouteservice/src/main/resources/ors-config-sample.json
        OSM_FILE: ./openrouteservice/src/main/files/heidelberg.osm.gz
      - ./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
      #- ./your_osm.pbf:/home/ors/ors-core/data/osm_file.pbf
      - 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 -Xmx2g"
      - " -Djava.rmi.server.hostname=localhost"


the output from above

reads like you’re trying to build your own openrouteservice image, while the docker-compose-file

reads like you’re trying to use the latest openrouteservice image, which we’d recommend.

Try commenting or deleting everything below and including build, i.e. this part:

then prune all existing docker openrouteservice images and restart the container.

Best regards

1 Like

Thank you @jschnell . It’s building now.

1 Like