Openrouteservice docker-compose hanging

Hello,

I am new to this project and I was trying to set up Openrouteservice through docker-compose. I simply ran the command mentioned in the github readme- cd docker && mkdir -p conf elevation_cache graphs logs/ors logs/tomcat && docker-compose up.

The docker process hangs after printing these logs-

[+] Running 1/0
 ⠿ Container ors-app  Created                                                                                                                                                                                                          0.0s
Attaching to ors-app
ors-app  | ### openrouteservice configuration ###
ors-app  | ors-config.json exists in ors-conf folder. Copy config to /ors-core/openrouteservice/src/main/resources/ors-config.json
ors-app  | ### Package openrouteservice and deploy to Tomcat ###

I waited for over 20 mins and nothing was happening. The docker process was neither downloading anything from the network nor using any CPU. Not sure what’s happening. I would appreciate any help.
Thanks!

Hey,

getting stuck at this point suggests that the ors didn’t build successfully in the container. To check this, do the following:

  • enter the container (docker exec -it ors-app bash)
  • check whether /ors-core/openrouteservice/target/ors.war and /usr/local/tomcat/webapp/ors.war exist
  • if not, run mvn -f /ors-core/openrouteservice/pom.xml package -DskipTests and check/post the output

Best regards

1 Like

Hey @jschnell, I’m not the original poster but I was having the exact same problem as they do. I’m on an M1 Mac, and I think I’ve solved the problem for me, so I’m sharing in case other M1 Mac users bump into this.

First, after getting the same issue as the original poster, I followed your instructions and:

  • The two files you mentioned, /ors-core/openrouteservice/target/ors.war and /usr/local/tomcat/webapp/ors.war, do not exist
  • I therefore ran mvn -f /ors-core/openrouteservice/pom.xml package -DskipTests as you suggested, here’s the output.
root@6860889de9e0:/ors-core# mvn -f /ors-core/openrouteservice/pom.xml package -DskipTests
5214 [INFO] Scanning for projects...
7294 [WARNING] The project org.heigit.ors:openrouteservice:war:6.7.0 uses prerequisites which is only intended for maven-plugin projects but not for non maven-plugin projects. For such purposes you should use the maven-enforcer-plugin. See https://maven.apache.org/enforcer/enforcer-rules/requireMavenVersion.html
7365 [INFO]
7368 [INFO] ------------------< org.heigit.ors:openrouteservice >-------------------
7374 [INFO] Building openrouteservice 6.7.0
7379 [INFO] --------------------------------[ war ]---------------------------------
12194 [INFO]
12217 [INFO] --- jacoco-maven-plugin:0.8.5:prepare-agent (prepare-unit-tests) @ openrouteservice ---
14720 [INFO] surefireArgLine set to -javaagent:/ors-core/.m2/repository/org/jacoco/org.jacoco.agent/0.8.5/org.jacoco.agent-0.8.5-runtime.jar=destfile=/ors-core/openrouteservice/target/jacoco.exec
14726 [INFO]
14726 [INFO] --- maven-resources-plugin:3.1.0:resources (default-resources) @ openrouteservice ---
15249 [INFO] Using 'UTF-8' encoding to copy filtered resources.
15284 [INFO] Copying 34 resources
15531 [INFO]
15534 [INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ openrouteservice ---
16690 [INFO] Changes detected - recompiling the module!
16750 [INFO] Compiling 556 source files to /ors-core/openrouteservice/target/classes

I’m a Python guy, so Maven is not something I understand, but I’m used to Docker and I remember lots of hiccups when I got this M1 Mac. In a nutshell, docker generally assumes an AMD64 platform (what Intel/AMD computers use), not an ARM64 platform (what M1 Macs use). So I tried this: How to make docker-compose work on M1 chip? - Stack Overflow

Seems to have worked for me - the terminal now shows ORS building a graph with lines such as
ors-app | 24 Nov 15:39:45 INFO [core.PrepareCore] - took:12, new shortcuts: 11 540, prepare|shortest|car-ors, dijkstras:464038, t(dijk):11.07, t(period):6.7, t(lazy):0.12, t(neighbor):4.05, meanDegree:5, initSize:15462, periodic:10, lazy:10, neighbor:90, totalMB:1026, usedMB:277
which I remember are normal on the first ORS run (I’ve previously run it under WSL on a Win11 machine).

1 Like