Configuration issues

Where do I even start? I have been using this for over 6 months without any issues until yesterday when I tried to install for a colleague and I kept getting different kind of errors first of which was complaining about change in the docker-compose file and Github link that this particular error points to also returns a 404 not found. I copied the repo and followed everything to the letter but the errors keep coming, first it doesn’t build any graphs and the folders are still empty after docker compose. I tried sharing my exact folder containing all files related to ors (and already built graphs) with my colleague but issues persisted. Now, more pressingly, my own instances no longer works properly for some bizarre reason. While I appreciate what you guys are doing for the community, there seems to be loads of instructions and contributions on how to get things working, none of which works. A chunk of the traceback I get when I fire up the container is below:

### openrouteservice configuration ###
 ors-config.json exists in ors-conf folder. Copy config to /ors-core/openrouteservice/src/main/resources/ors-config.json
 ### Package openrouteservice and deploy to Tomcat ###
[ERROR] COMPILATION ERROR : 
[ERROR] error reading /ors-core/.m2/repository/com/github/GIScience/graphhopper/graphhopper-core/v0.13.21/graphhopper-core-v0.13.21.jar; zip file is empty
 [ERROR] error reading /ors-core/.m2/repository/com/github/GIScience/graphhopper/graphhopper-reader-osm/v0.13.21/graphhopper-reader-osm-v0.13.21.jar; zip file is empty
 [ERROR] error reading /ors-core/.m2/repository/com/github/GIScience/graphhopper/graphhopper-api/v0.13.21/graphhopper-api-v0.13.21.jar; zip file is empty
 [ERROR] /ors-core/openrouteservice/src/main/java/org/heigit/ors/routing/graphhopper/extensions/reader/osmfeatureprocessors/OSMAttachedSidewalkProcessor.java:[1,1] cannot access org.heigit.ors.routing.graphhopper.extensions.reader.osmfeatureprocessors
zip END header not found
[ERROR] /ors-core/openrouteservice/src/main/java/org/heigit/ors/services/isochrones/requestprocessors/json/JsonIsochronesRequestProcessor.java:[14,1] cannot access org.heigit.ors.services.isochrones.requestprocessors.json
 zip END header not found
 [ERROR] /ors-core/openrouteservice/src/main/java/org/heigit/ors/routing/graphhopper/extensions/flagencoders/bike/MountainBikeFlagEncoder.java:[18,1] cannot access org.heigit.ors.routing.graphhopper.extensions.flagencoders.bike
zip END header not found
 [ERROR] /ors-core/openrouteservice/src/main/java/org/json/HTTPTokener.java:[1,1] cannot access org.json
  zip END header not found
 [ERROR] /ors-core/openrouteservice/src/main/java/org/heigit/ors/fastisochrones/Eccentricity.java:[1,1] cannot access org.heigit.ors.fastisochrones
zip END header not found
[ERROR] /ors-core/openrouteservice/src/main/java/org/heigit/ors/routing/ProfileWeighting.java:[15,1] cannot access org.heigit.ors.routing
 zip END header not found
[ERROR] /ors-core/openrouteservice/src/main/java/org/heigit/ors/api/responses/routing/json/JSONStep.java:[16,1] cannot access org.heigit.ors.api.responses.routing.json
 zip END header not found
[ERROR] /ors-core/openrouteservice/src/main/java/org/heigit/ors/globalresponseprocessor/gpx/beans/EmailType.java:[27,1] cannot access org.heigit.ors.globalresponseprocessor.gpx.beans
zip END header not found
[ERROR] /ors-core/openrouteservice/src/main/java/org/opensphere/geometry/triangulation/model/Edge.java:[25,1] cannot access org.opensphere.geometry.triangulation.model
zip END header not found
[ERROR] /ors-core/openrouteservice/src/main/java/org/heigit/ors/servlet/filters/GZIPResponseWrapper.java:[14,1] cannot access org.heigit.ors.servlet.filters
zip END header not found
 [ERROR] /ors-core/openrouteservice/src/main/java/org/heigit/ors/routing/graphhopper/extensions/VehicleDimensionRestrictions.java:[14,1] cannot access org.heigit.ors.routing.graphhopper.extensions
zip END header not found
[ERROR] /ors-core/openrouteservice/src/main/java/org/heigit/ors/api/controllers/StatusAPI.java:[16,1] cannot access org.heigit.ors.api.controllers
 zip END header not found
 [ERROR] /ors-core/openrouteservice/src/main/java/org/heigit/ors/centrality/algorithms/AbstractCentralityAlgorithm.java:[1,1] cannot access org.heigit.ors.centrality.algorithms
2023-09-08 09:25:37   zip END header not found
2023-09-08 09:25:37 3764 [ERROR] /ors-core/openrouteservice/src/main/java/org/heigit/ors/routing/graphhopper/extensions/storages/builders/RoadAccessRestrictionsGraphStorageBuilder.java:[16,1] cannot access org.heigit.ors.routing.graphhopper.extensions.storages.builders
2023-09-08 09:25:37   zip END header not found
2023-09-08 09:25:37 3765 [ERROR] /ors-core/openrouteservice/src/main/java/org/heigit/ors/servlet/util/ServletUtility.java:[14,1] cannot access org.heigit.ors.servlet.util
2023-09-08 09:25:37   zip END header not found
2023-09-08 09:25:37 3766 [ERROR] /ors-core/openrouteservice/src/main/java/org/opensphere/geometry/algorithm/ConcaveHullOpenSphere.java:[25,1] cannot access org.opensphere.geometry.algorithm
2023-09-08 09:25:37   zip END header not found
2023-09-08 09:25:37 3767 [ERROR] /ors-core/openrouteservice/src/main/java/org/heigit/ors/services/shortenlink/ShortenLinkServiceSettings.java:[14,1] cannot access org.heigit.ors.services.shortenlink
2023-09-08 09:25:37   zip END header not found
2023-09-08 09:25:37 3768 [ERROR] /ors-core/openrouteservice/src/main/java/org/heigit/ors/api/responses/routing/gpx/GPXRoutePointExtensionElement.java:[16,1] cannot access org.heigit.ors.api.responses.routing.gpx
2023-09-08 09:25:37   zip END header not found
2023-09-08 09:25:37 3768 [ERROR] /ors-core/openrouteservice/src/main/java/org/heigit/ors/fastisochrones/partitioning/BiPartitionProjection.java:[1,1] cannot access org.heigit.ors.fastisochrones.partitioning
2023-09-08 09:25:37   zip END header not found
2023-09-08 09:25:37 3769 [ERROR] /ors-core/openrouteservice/src/main/java/org/heigit/ors/util/StreamUtility.java:[14,1] cannot access org.heigit.ors.util
2023-09-08 09:25:37   zip END header not found
2023-09-08 09:25:37 3770 [ERROR] /ors-core/openrouteservice/src/main/java/org/heigit/ors/routing/graphhopper/extensions/util/MultiSourceStoppingCriterion.java:[1,1] cannot access org.heigit.ors.routing.graphhopper.extensions.util
2023-09-08 09:25:37   zip END header not found
2023-09-08 09:25:37 3771 [ERROR] /ors-core/openrouteservice/src/main/java/org/heigit/ors/routing/graphhopper/extensions/flagencoders/HikingFlagEncoder.java:[16,1] cannot access org.heigit.ors.routing.graphhopper.extensions.flagencoders
2023-09-08 09:25:37   zip END header not found
2023-09-08 09:25:37 3772 [ERROR] /ors-core/openrouteservice/src/main/java/org/heigit/ors/routing/graphhopper/extensions/core/CoreMatrixFilter.java:[14,1] cannot access org.heigit.ors.routing.graphhopper.extensions.core
2023-09-08 09:25:37   zip END header not found
2023-09-08 09:25:37 3773 [ERROR] /ors-core/openrouteservice/src/main/java/org/heigit/ors/exceptions/ExportException.java:[1,1] cannot access org.heigit.ors.exceptions
2023-09-08 09:25:37   zip END header not found
2023-09-08 09:25:37 3774 [ERROR] /ors-core/openrouteservice/src/main/java/org/heigit/ors/isochrones/statistics/StatisticsProviderFactory.java:[21,1] cannot access org.heigit.ors.isochrones.statistics
2023-09-08 09:25:37   zip END header not found
2023-09-08 09:25:37 3775 [ERROR] /ors-core/openrouteservice/src/main/java/org/heigit/ors/services/routing/requestprocessors/RoutingRequestParser.java:[14,1] cannot access org.heigit.ors.services.routing.requestprocessors
2023-09-08 09:25:37   zip END header not found
2023-09-08 09:25:37 3776 [ERROR] /ors-core/openrouteservice/src/main/java/org/heigit/ors/common/Pair.java:[14,1] cannot access org.heigit.ors.common
2023-09-08 09:25:37   zip END header not found
2023-09-08 09:25:37 3777 [ERROR] /ors-core/openrouteservice/src/main/java/org/heigit/ors/isochrones/builders/concaveballs/ConcaveBallsIsochroneMapBuilder.java:[14,1] cannot access org.heigit.ors.isochrones.builders.concaveballs
2023-09-08 09:25:37   zip END header not found
2023-09-08 09:25:37 3778 [ERROR] /ors-core/openrouteservice/src/main/java/org/heigit/ors/routing/graphhopper/extensions/weighting/DistanceWeighting.java:[14,1] cannot access org.heigit.ors.routing.graphhopper.extensions.weighting
2023-09-08 09:25:37   zip END header not found
2023-09-08 09:25:37 3779 [ERROR] /ors-core/openrouteservice/src/main/java/org/heigit/ors/servlet/requests/StatusCodeCaptureWrapper.java:[14,1] cannot access org.heigit.ors.servlet.requests
2023-09-08 09:25:37   zip END header not found
2023-09-08 09:25:37 3780 [ERROR] /ors-core/openrouteservice/src/main/java/org/heigit/ors/globalresponseprocessor/GlobalResponseProcessor.java:[26,1] cannot access org.heigit.ors.globalresponseprocessor
2023-09-08 09:25:37   zip END header not found
2023-09-08 09:25:37 3780 [ERROR] /ors-core/openrouteservice/src/main/java/org/heigit/ors/isochrones/builders/grid/GridBasedIsochroneMapBuilder.java:[14,1] cannot access org.heigit.ors.isochrones.builders.grid

Container is running but trying to check the status via the ors/v2/health endpoint returns a 404. How can I fix this?

Hi @DerKaiser7

looking at the output it looks like for some reason when maven tried downloading the packages from the repo something went wrong. I would suggest clearing your maven cache / docker images and then trying to build again. If it still fails, then it might be a proxy within your organisation that is interfering with the download problem - I have seen it before with other things where organisations have virus checkers on files being downloaded which don’t play nicely and don’t indicate to the requesting process that they should wait for a while. If it couldn’t get the files at all, then the Maven build process should fail when it attempts to download them rather than when trying to read the packages.

Also, it would be helpful to know which version of openrouteservice you are trying to run. I am also assuming that you are running through docker but building the image locally (the build area in the compose file is not commented out)

Hope that helps

Thank you very much @adam. Here’s an update: After some fiddling, I no longer get this error but now for some bizarre reason, it can’t see my osm_file despite the fact that it exists exactly where I specified it. I now get this error in the middle of the logs.

ERROR [routing.RoutingProfileManager] - java.util.concurrent.ExecutionException: java.lang.IllegalStateException: Your specified OSM file does not exist:/home/ors/data/osm_file.pbf.
ERROR [routing.RoutingProfileManager] - Failed to initialize RoutingProfileManager instance.

Here’s my docker compose file for context:

version: '2.4'
services:
  ors-app:
    container_name: ors-app
    ports:
      - 8080:8080
      - 9001:9001
    image: openrouteservice/openrouteservice:latest
    #build:
     #context: ../
     # args:
        #ORS_CONFIG: ./data/ors-config-sample.json
       # OSM_FILE: ./data/great-britain-latest.osm.pbf
    user: "${ORS_UID:-0}:${ORS_GID:-0}"
    volumes:
      - ./graphs:/home/ors/ors-core/data/graphs
      - ./elevation_cache:/home/ors/ors-core/data/elevation_cache
      - ./logs/ors:/home/ors/ors-core/logs/ors
      - ./logs/tomcat:/home/ors/usr/tomcat/logs
      - ./conf:/home/ors/ors-conf
      - ./data/great-britain-latest.osm.pbf:/home/ors/ors-core/data/osm_file.pbf
    environment:
      - BUILD_GRAPHS=False  # 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 -Xms4g -Xmx8g"
      - "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"```

That part of the compose file is putting the osm file at /home/ors/ors-core/data/osm_file.pbf whereas the log is saying it is looking at /home/ors/data/osm_file.pbf (defined by the app config file). So either you need to modify the compose file to point to that location, or modify the ors config file.

2 Likes

Thanks a lot @adam. Massive oversight there, I guess it’s one of those things when you’re tweaking relentlessly trying to get something fixed. Having changed that and docker-compose down followed by “(docker-compose up -d); docker-compose logs -ft” everything seems to just about be working fine again without errors in the logs with health status showing ready. This was most likely caused by the fact that the initial container I had up until yesterday used an old docker compose file and blew up when I tried using the updated docker-compose on main branch. I would suggest looking at lines 17 and 18 of that file because the current setup of that file did not work for a new installation for some reason as well. Also, my current docker-compose differs from what is currently on those lines. For the new installation, the first error was related to mounting old paths which I did find confusing as I expected it to just work out of the box. Let me also add that the link that takes you to the docker-compose when the error shows up is broken so that may be worth looking to. Thanks again.

1 Like

Hi, I’m having the same problem, I’m getting a compilation error, could you please send me your new docker and the settings made.

Hey @zuazo99, here’s my dockerfile that worked for me.

version: ‘2.4’
services:
ors-app:
container_name: ors-app
ports:
- 8080:8080
- 9001:9001
image: openrouteservice/openrouteservice:latest
# build:
# context: …/
# args:
# #ORS_CONFIG: ./data/ors-config-sample.json
# OSM_FILE: ./data/great-britain-latest.osm.pbf
user: “${ORS_UID:-0}:${ORS_GID:-0}”
volumes:
- ./graphs:/home/ors/ors-core/data/graphs
- ./elevation_cache:/home/ors/ors-core/data/elevation_cache
- ./logs/ors:/home/ors/logs
- ./logs/tomcat:/home/ors/tomcat/logs
- ./conf:/home/ors/ors-conf
- ./data/great-britain-latest.osm.pbf:/home/ors/data/osm_file.pbf
environment:
- BUILD_GRAPHS=False # 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 -Xms4g -Xmx8g”
- “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”

Didn’t really change the config.json, only building profiles for driving-car.

1 Like

I had the same problems after a maven issue let me to rebuild the image.
After cloning new from github I had to change the docker compose file as adam suggested.
But then I had the problem that my graphs didnt rebuild correctly or didnt replace the former ones.
I solved this by a change in the config file unter docker/conf where I deleted the “/ors-core” part from the directory given under “sources:”.

I work on Ubuntu. This seems like an issue with the new paths after an update… maybe worth to look into it.

1 Like

Ihave the same problem. I tried to re-install docker image. but it did not work. How did you solve the problem? @DerKaiser7

 5669 [ERROR] COMPILATION ERROR :
ors    | 5674 [ERROR] error reading /ors-core/.m2/repository/com/github/GIScience/graphhopper/graphhopper-core/v0.13.23/graphhopper-core-v0.13.23.jar; zip file is empty
ors    | 5677 [ERROR] error reading /ors-core/.m2/repository/com/github/GIScience/graphhopper/graphhopper-reader-osm/v0.13.23/graphhopper-reader-osm-v0.13.23.jar; zip file is empty
ors    | 5682 [ERROR] error reading /ors-core/.m2/repository/com/github/GIScience/graphhopper/graphhopper-api/v0.13.23/graphhopper-api-v0.13.23.jar; zip file is empty