Errors in Docker Setup

Hi. I am relatively new to open route service. I am trying to configure it on my local using docker. I have followed the instructions and successfully configures it (with default osm file). However, whenever i am trying to make an API call using driving-car or any other profile i am not getting back the results. rather i am getting back the message “Unable to get an appropriate route profile for RoutePreference = driving-car”. This is the message with all profiles types. So i want to know about the reason and also what is the default area in the osm file used by the official docker image. Moving ahead, when I am trying to use my local osm file, its created successfully and its again giving the same message as above. However, when i inspected the logs file for the local osm file its showing an error saying “cp: cannot create regular file ‘/ors-conf/ors-config.json’: Permission denied”. and after that is showning some warning and in the end server started successfuly. But, in both cases I am unable to get the route. Thanks in advance.

Hey,

as this is not related to the topic it was in before, I’ve taken the liberty to move it to a separate topic.

The default area in the osm file used is roughly Heidelberg, Germany. Generating routes inside the “main” town should work. Have a look at the examples from the api docs if you need coordinates.

Without knowing what you actually did, this is rather hard to debug. Could you therefore please provide the following:

  • the request that yielded the error you describe
  • your docker-compose file or the docker command you’re using
  • the full log of the container when you encounter the error

Best regards

Hello jschnell. Thank you for the quick guide. I am using the docker run -p 4444:8080 --name ors openrouteservice/openrouteservice. the container was compiled successfully without any error but when i tried to make a call to direction api it was saying unable to get an appropriate route profile for RoutePrefrence = “driving-car”. I have changed it to different profiles but get same message. However, from your reply I got the idea about docker-compose and clone the repo from github and compile it using docker compose. Its now working fine with both the default OSM file and with custom OSM file. Thanks again for the quick help it appreciated.

1 Like

Hello. I encountered with another problem. When i setup the docker instance on my local its worked. But when i tried to setup this on ubuntu server, i am getting error. Screenshot of my error is attached below. any help is appreciated. Thanks

Hey,

the error says that you are trying to mount /home/…/docker/data/stockholam-planet.osm.pbf to /ors-core/data/osm_file.pbf, which fails.

It further states that you should

Check if the specified host path exists and is the expected type.

where host path is the path on your local machine, i.e. /home/…/stockholam-planet.osm.pbf.

I’d assume there is a typo in your file name.

Best regards

I figured it out. its was because the file are nested inside a directory names ors. its not related to the open route service rather a docker level configuration. the files should be the root and not nested inside the directories in case we need to setup the docker container on remote ubuntu server. Thanks

1 Like

Hello. Is there any way to set the maximum od matrix limit to infinite? currently its working upto 100,000,000,0 (returning routes). If I am trying to set it more than that its break the code. And its only takes in the number. I want to set the limit to infinite and allow the capability to get OD_Matrix for any area. Thanks

Hey,

the maximum matrix routes get parsed into an integer, thus the maximum value is 2’147’483’647, which is in the same order of magnitute as the 1’000’000’000 you reported.

Assuming every route request takes only 0.1 ms, the max value would amount in a query running over 2 days. Your response would have a size of roughly 16 GB, since you’d be getting back a double (i.e., 8 byte of data) per request.

In my humble opinion, this justifies using an integer and thus allowing only 2 billion routes in a matrix request

If you still want to go higher, you’ll have to adjust the code yourself. The method you’re looking for is MatrixServiceSettings.getMaximumRoutes().

Best regards