No ors-config.json in ors-conf folder (Docker)

Hello. I use openrouteservice for my research, and I host it locally. As of a few weeks ago, I was able to successfully set up and use openrouteservice in docker on my Windows 10 Home machine (these are the steps I took).

However, today when I ran the command

docker run -dt --name ors-app -p 8080:8080 -e BUILD_GRAPHS=True -v /var/lib/docker/graphs:/ors-core/data/graphs -v /var/lib/docker/elevation_cache:/ors-core/data/elevation_cache -v /var/lib/docker/conf:/ors-conf -v C:/OSMFiles/north-dakota-latest.osm.pbf:/ors-core/data/osm_file.pbf -e "JAVA_OPTS=-Djava.awt.headless=true -server -XX:TargetSurvivorRatio=75 -XX:SurvivorRatio=64 -XX:MaxTenuringThreshold=3 -XX:+UseG1GC -XX:ParallelGCThreads=4 -Xms1g -Xmx2g" -e " -Djava.rmi.server.hostname=localhost" openrouteservice/openrouteservice:latest

as usual, docker suddenly gave me the following error immediately:

### openrouteservice configuration ###
No ors-config.json in ors-conf folder. Copy config from /ors-core/openrouteservice/src/main/resources/ors-config.json
cp: cannot create regular file '/ors-conf/ors-config.json': Permission denied

As a result, building the graphs seems to fail. Reading the docker logs, I seem to be getting other errors such as:

Failed to initialize RoutingProfileManager instance

Why am I getting this problem when everything was working fine just a few weeks ago? How can I put the ors-config.json file where it needs to be? I’ve tried running both the command prompt and Docker as administrator but it’s still giving me the same issue.

I see that some changes were made to the ors backend related to docker (here for example) a few days ago, but I don’t understand the details.

Some more links: my full Docker logs and another file that seems to have been updated recently

Hi @dipayan,

Hmm not sure why the image on dockerhub was updated already… That should have been with the next release.

It seems that docker has no write permission on the volume hosted in /var/lib/docker/conf.

It should be enough to rename the file /var/lib/docker/conf/app.config to /var/lib/docker/conf/ors-config.json, that was the main change .

Sorry for the inconvenience, this change was ment to be backwards compatible -.-

I’ve posted the announcement for the next release now already, in case more users run into the problem:

Best regards

Thank you for the response and the announcement! I’ll use the image of the earlier release for now.

Hi, @dipayan, did you manage to get this working with the image of an earlier release. I have tried to use an earlier release but it seems to overwrite and install the latest one? “Downloaded newer image for openrouteservice/openrouteservice:latest”

@amandus, apologies new to this process, how do you go about renaming the app.config to ors-config.json? Where exactly is this file stored?

How exactly do I navigate to Docker Root Dir: /var/lib/docker

Kind regards,

if you are using docker-compose from the docker folder of the repository, the file location would be:
{repo-root}/docker/conf/ors-config.json (make sure you create the needed folders in advance).

You can customize the volume paths to different folders though, so it depends on your specific setup.
If you run with the normal docker command e.g. with -v $PWD/conf:/ors-conf, the location of the config file should be $PWD/conf/ors-config.json.

If you previously had an app.config file there you would just rename it to ors-config.json and it will be the one used with the next run.
In case you didn’t provide a valid config in the first run, the sample config will be used and copied to the config folder.

@amandus, I am using docker run (see below)

The issue I have is that I can’t set the file sharing to set the volume paths as it is using WSL 2 backend (see image attached)

I therefore don’t know how to access the Docker Root Dir: /var/lib/docker and therefore the config file to check. Any idea how to do this or change it to be a local file?

Apologies for the lack of understanding, I am very new to programming. Appreciate your help.



docker run -dt --name ors-app -p 8080:8080 -e BUILD_GRAPHS=True -v /var/lib/docker/graphs:/ors-core/data/graphs -v /var/lib/docker/elevation_cache:/ors-core/data/elevation_cache -v /var/lib/docker/conf:/ors-conf -v C:/OSMFiles/north-dakota-latest.osm.pbf:/ors-core/data/osm_file.pbf -e “JAVA_OPTS=-Djava.awt.headless=true -server -XX:TargetSurvivorRatio=75 -XX:SurvivorRatio=64 -XX:MaxTenuringThreshold=3 -XX:+UseG1GC -XX:ParallelGCThreads=4 -Xms1g -Xmx2g” -e “ -Djava.rmi.server.hostname=localhost” openrouteservice/openrouteservice:latest

Instead of mapping the config folder to /var//lib/docker/conf you can use a different folder you have access to like for the osm file.
If you create a folder e.g. C:/ors-config where you place your ors-config.json, and adjust the docker run command to contain -v C:/ors-config:/ors-conf it should use that one.