Using a private instance with the openrouteservice.org example


#1

Hello, I am a student attempting to use a private instance of openrouteservice to run a slightly modified version of the example on the openrouteservice.org website here:(actual link deleted due to new user limitation)/disaster-optimization/

I can run the example in a jupyter notebook just fine accessing the openrouterservice.org servers with my API key.
(this means I installed the python version just fine)

I also installed the docker instance just fine and can do these basic tests to see that it is running:
(actual link deleted due to new user limitation)localhost:8080/ors/routes?profile=foot-walking&coordinates=8.676581,49.418204|8.692803,49.409465
(and get an appropriate response)

In the disaster example, I changed this line here:

ors_client = ors.Client(key='KEY DELETED FOR SECUIRTY') #with my actual key

to:

ors_client = ors.Client(base_url='(actual link deleted due to new user limitation)localhost:8080/ors')

When I run this I get an error messages that appear to come from client.py that suggest a file cannot be read.
based on my objective above what are my next steps? Do I need my own OSM dataset for this to work?

Thank you.
I have listed the error messages for reference.

---------------------------------------------------------------------------
JSONDecodeError                           Traceback (most recent call last)
C:\ProgramData\Anaconda3\lib\site-packages\openrouteservice\client.py in _get_body(response)
    231         try:
--> 232             body = response.json()
    233         except json.JSONDecodeError:

C:\ProgramData\Anaconda3\lib\site-packages\requests\models.py in json(self, **kwargs)
    896                     pass
--> 897         return complexjson.loads(self.text, **kwargs)
    898 

C:\ProgramData\Anaconda3\lib\json\__init__.py in loads(s, encoding, cls, object_hook, parse_float, parse_int, parse_constant, object_pairs_hook, **kw)
    347             parse_constant is None and object_pairs_hook is None and not kw):
--> 348         return _default_decoder.decode(s)
    349     if cls is None:

C:\ProgramData\Anaconda3\lib\json\decoder.py in decode(self, s, _w)
    336         """
--> 337         obj, end = self.raw_decode(s, idx=_w(s, 0).end())
    338         end = _w(s, end).end()

C:\ProgramData\Anaconda3\lib\json\decoder.py in raw_decode(self, s, idx)
    354         except StopIteration as err:
--> 355             raise JSONDecodeError("Expecting value", s, err.value) from None
    356         return obj, end

JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

HTTPError                                 Traceback (most recent call last)
<ipython-input-4-4a86ac2b3699> in <module>
      4     jobs=deliveries,
      5     vehicles=vehicles,
----> 6     geometry=True
      7 )
      8 

C:\ProgramData\Anaconda3\lib\site-packages\openrouteservice\client.py in wrapper(*args, **kwargs)
    295     def wrapper(*args, **kwargs):
    296         args[0]._extra_params = kwargs.pop("extra_params", None)
--> 297         result = func(*args, **kwargs)
    298         try:
    299             del args[0]._extra_params

C:\ProgramData\Anaconda3\lib\site-packages\openrouteservice\optimization.py in optimization(client, jobs, vehicles, matrix, geometry, dry_run)
     72         params['matrix'] = matrix
     73 
---> 74     return client.request("/optimization", {}, post_json=params, dry_run=dry_run)
     75 
     76 

C:\ProgramData\Anaconda3\lib\site-packages\openrouteservice\client.py in request(self, url, get_params, first_request_time, retry_counter, requests_kwargs, post_json, dry_run)
    202 
    203         try:
--> 204             result = self._get_body(response)
    205 
    206             return result

C:\ProgramData\Anaconda3\lib\site-packages\openrouteservice\client.py in _get_body(response)
    232             body = response.json()
    233         except json.JSONDecodeError:
--> 234             raise exceptions.HTTPError(status_code)
    235 
    236         if status_code == 429:

HTTPError: HTTP Error: 404

#2

Moving this to the Python section as it doesn’t seem to be an issue with the openrouteservice itself but with how the interaction takes place.

@nils - any thoughts?


#3

Hm, can you pls use proper code formatting? I can’t see the full URLs. I can say it’s not a SDK issue, but a usage error, but not sure what’s wrong until you fix the formatting.


#4

Thank you for your reply. As a new user, this forum rejects my post if I put in more that one URL.
That is why there are not full URLs. Your forum application does not permit it.
If you can lift that restriction on me as a user I would be happy to repost.
Thank you,


#5

Yes, I can see that.

My point is, it’s maybe possible if you format properly. This is markdown, formatting code works with backticks, blocks of code with multiple backticks:


#6

Or exclude the http(s) or whatever. There should be a million ways to trick the restriction;)


#7

I guess I am confused then because when I read my own post the links are formatted fine, but they have content redacted to not look like a link.

No matter what method I use to defeat the restriction it still won’t be a functioning URL, otherwise why have the restriction.

There are two links that have been modified in my post.
One is my API key which I think you can agree should not be posted. That link is a reference to code in your example that I changed so it is not in use.
The other is the default url which I will post here as I can post one link.
http://localhost:8080/ors/
All the URLs in the error message appear unaltered.
What else is there that you cannot read?


#8

So, nothing changed for you now that I edited your original post? That’d be really weird.

Anyways, the HTTP error code 404 tells you that the URL wasn’t found. Please stick to the documentation:

I think you’re using one slash too much, you need http://localhost:8080/ors, not http://localhost:8080/ors/.


#9

nils,
That is not the complete link. only the part redacted. There is more content after the /
here is the full URL
ors_client = ors.Client(base_url=’(http://localhost:8080/ors’)

Yes I am falmilar with http error codes and that 404 means file not found but it is unclear what file it is looking for .
Thank you for the link to the documentation, I have read much of it. That is how I was able to run the application without a private instance in the first place. My difficulties revolve around getting the application to run accessing a private instance. This is were the documentation falls short. I was able to load the docker image and get to respond to the samples in the readme… Howsoever the examples here: (again link changed) do not work.
https://openrouteservice-py.readthedocs.io/en/latest/readme_link.html#


#10

I really don’t know what you’re doing, but it all works. Here with default Heidelberg extent:

(.venv) (base)  ~/dev/python/openrouteservice-py  curl localhost:8085/ors/health
{"status":"ready"}%                                             
Python 3.7.3 (default, Mar 27 2019, 22:11:17) 
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import openrouteservice as ors
>>> print(ors.__version__)
2.2.3
>>> clnt = ors.Client(base_url='http://localhost:8085/ors')
>>> route = clnt.directions([[8.6795, 49.418204],[8.680787, 49.414407]])
>>> print(route['routes'][0]['summary'])
{'distance': 563.2, 'duration': 135.2}

Look into the docker logs, I guess ORS is not running properly.


#11

I am not sure if the image below will display but it is a screen shot of the reply of the request providing in the readme file.

http://localhost:8080/ors/routes?profile=foot-walking&coordinates=8.676581,49.418204|8.692803,49.409465

It is the only test provided to determine if the ors is running properly. The response looks fine as shown in the screen shot(provided the image is displaying)

The local instance example in the documentation does not work given the instructions provided.
I have no doubt it works for you but for someone from the outside, following the documentation provided, it does not.


#12

Ok, so it’s a ORS Docker problem.

Please do the following and paste the output (and please format as code with three backticks)

  • docker logs ors-app

  • cat ./docker/conf/app.config.sample

  • http://localhost:8080/ors/health


#13

I am on a pc so the cat command is not available but I listed the file contents.
I added the backticks but it I don’t think I did it correctly as the format looks unchanged.

12-Nov-2019 14:19:40.168 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version:        Apache Tomcat/8.0.32
12-Nov-2019 14:19:40.171 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built:          Feb 2 2016 19:34:53 UTC
12-Nov-2019 14:19:40.171 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number:         8.0.32.0
12-Nov-2019 14:19:40.172 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name:               Linux
12-Nov-2019 14:19:40.172 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version:            4.9.184-linuxkit
12-Nov-2019 14:19:40.172 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture:          amd64
12-Nov-2019 14:19:40.173 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home:             /usr/local/openjdk-8/jre
12-Nov-2019 14:19:40.173 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version:           1.8.0_222-b10
12-Nov-2019 14:19:40.174 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor:            Oracle Corporation
12-Nov-2019 14:19:40.174 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:         /usr/local/tomcat
12-Nov-2019 14:19:40.174 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:         /usr/local/tomcat
12-Nov-2019 14:19:40.175 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/usr/local/tomcat/conf/logging.properties
12-Nov-2019 14:19:40.175 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
12-Nov-2019 14:19:40.176 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.endorsed.dirs=/usr/local/tomcat/endorsed
12-Nov-2019 14:19:40.176 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/usr/local/tomcat
12-Nov-2019 14:19:40.177 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/usr/local/tomcat
12-Nov-2019 14:19:40.177 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/usr/local/tomcat/temp
12-Nov-2019 14:19:40.177 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
12-Nov-2019 14:19:40.288 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
12-Nov-2019 14:19:40.306 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
12-Nov-2019 14:19:40.309 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
12-Nov-2019 14:19:40.312 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
12-Nov-2019 14:19:40.313 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 647 ms
12-Nov-2019 14:19:40.349 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
12-Nov-2019 14:19:40.350 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.0.32
12-Nov-2019 14:19:40.383 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive /usr/local/tomcat/webapps/ors.war
12-Nov-2019 14:19:44.726 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v2.0.4.RELEASE)

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
<?xml version="1.0" ?>
<Configuration>
  <Properties>
    <Property name="filename">/var/log/ors/ors-logs.log</Property>
  </Properties>
</Configuration>
12-Nov-2019 14:19:52.504 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive /usr/local/tomcat/webapps/ors.war has finished in 12,114 ms
12-Nov-2019 14:19:52.505 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /usr/local/tomcat/webapps/ROOT
12-Nov-2019 14:19:52.560 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /usr/local/tomcat/webapps/ROOT has finished in 55 ms
12-Nov-2019 14:19:52.560 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /usr/local/tomcat/webapps/examples
12-Nov-2019 14:19:52.858 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /usr/local/tomcat/webapps/examples has finished in 298 ms
12-Nov-2019 14:19:52.859 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /usr/local/tomcat/webapps/host-manager
12-Nov-2019 14:19:52.893 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /usr/local/tomcat/webapps/host-manager has finished in 34 ms
12-Nov-2019 14:19:52.895 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /usr/local/tomcat/webapps/manager
12-Nov-2019 14:19:52.939 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /usr/local/tomcat/webapps/manager has finished in 44 ms
12-Nov-2019 14:19:52.939 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /usr/local/tomcat/webapps/docs
12-Nov-2019 14:19:52.971 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /usr/local/tomcat/webapps/docs has finished in 32 ms
12-Nov-2019 14:19:52.989 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
12-Nov-2019 14:19:52.999 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
12-Nov-2019 14:19:53.001 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 12687 ms
12 Nov 14:27:43 ERROR [errors.CommonResponseEntityExceptionHandler] - heigit.ors.exceptions.StatusCodeException
12 Nov 14:32:22 ERROR [errors.CommonResponseEntityExceptionHandler] - heigit.ors.exceptions.StatusCodeException
12 Nov 16:59:14 ERROR [errors.CommonResponseEntityExceptionHandler] - heigit.ors.exceptions.StatusCodeException
12 Nov 17:02:07 ERROR [errors.CommonResponseEntityExceptionHandler] - heigit.ors.exceptions.StatusCodeException
12 Nov 17:02:21 ERROR [errors.CommonResponseEntityExceptionHandler] - heigit.ors.exceptions.StatusCodeException
13-Nov-2019 04:30:03.970 INFO [Thread-8] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-8080"]
14-Nov-2019 02:37:40.018 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version:        Apache Tomcat/8.0.32
14-Nov-2019 02:37:40.019 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built:          Feb 2 2016 19:34:53 UTC
14-Nov-2019 02:37:40.019 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number:         8.0.32.0
14-Nov-2019 02:37:40.019 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name:               Linux
14-Nov-2019 02:37:40.020 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version:            4.9.184-linuxkit
14-Nov-2019 02:37:40.020 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture:          amd64
14-Nov-2019 02:37:40.020 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home:             /usr/local/openjdk-8/jre
14-Nov-2019 02:37:40.020 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version:           1.8.0_222-b10
14-Nov-2019 02:37:40.020 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor:            Oracle Corporation
14-Nov-2019 02:37:40.020 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:         /usr/local/tomcat
14-Nov-2019 02:37:40.020 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:         /usr/local/tomcat
14-Nov-2019 02:37:40.021 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/usr/local/tomcat/conf/logging.properties
14-Nov-2019 02:37:40.021 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
14-Nov-2019 02:37:40.021 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.endorsed.dirs=/usr/local/tomcat/endorsed
14-Nov-2019 02:37:40.022 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/usr/local/tomcat
14-Nov-2019 02:37:40.023 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/usr/local/tomcat
14-Nov-2019 02:37:40.024 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/usr/local/tomcat/temp
14-Nov-2019 02:37:40.024 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
14-Nov-2019 02:37:40.220 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
14-Nov-2019 02:37:40.242 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
14-Nov-2019 02:37:40.245 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
14-Nov-2019 02:37:40.246 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
14-Nov-2019 02:37:40.247 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 853 ms
14-Nov-2019 02:37:40.272 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
14-Nov-2019 02:37:40.272 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.0.32
14-Nov-2019 02:37:40.304 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive /usr/local/tomcat/webapps/ors.war
14-Nov-2019 02:37:44.643 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v2.0.4.RELEASE)

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
<?xml version="1.0" ?>
<Configuration>
  <Properties>
    <Property name="filename">/var/log/ors/ors-logs.log</Property>
  </Properties>
</Configuration>
14-Nov-2019 02:37:51.139 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive /usr/local/tomcat/webapps/ors.war has finished in 10,834 ms
14-Nov-2019 02:37:51.140 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /usr/local/tomcat/webapps/ROOT
14-Nov-2019 02:37:51.184 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /usr/local/tomcat/webapps/ROOT has finished in 44 ms
14-Nov-2019 02:37:51.185 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /usr/local/tomcat/webapps/examples
14-Nov-2019 02:37:51.569 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /usr/local/tomcat/webapps/examples has finished in 384 ms
14-Nov-2019 02:37:51.570 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /usr/local/tomcat/webapps/host-manager
14-Nov-2019 02:37:51.625 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /usr/local/tomcat/webapps/host-manager has finished in 54 ms
14-Nov-2019 02:37:51.625 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /usr/local/tomcat/webapps/manager
14-Nov-2019 02:37:51.671 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /usr/local/tomcat/webapps/manager has finished in 46 ms
14-Nov-2019 02:37:51.671 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /usr/local/tomcat/webapps/docs
14-Nov-2019 02:37:51.686 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /usr/local/tomcat/webapps/docs has finished in 15 ms
14-Nov-2019 02:37:51.696 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
14-Nov-2019 02:37:51.708 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
14-Nov-2019 02:37:51.716 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 11468 ms

```{
   "ors":{
     "info": {
       "base_url": "http://localhost:8080/ors/",
       "support_mail": "support@openrouteservice.org",
       "author_tag": "openrouteservice",
       "content_licence": "LGPL 3.0"
      },
      "services":{
         "matrix":{
            "enabled":true,
            "maximum_locations":200,
            "maximum_visited_nodes":100000,
            "allow_resolve_locations":true,
            "attribution":"openrouteservice.org, OpenStreetMap contributors"
         },
         "isochrones":{
            "enabled":true,
            "maximum_range_distance":[
               {
                  "profiles":"any",
                  "value":50000
               },
               {
                  "profiles":"driving-car, driving-hgv, cycling-regular, foot-walking",
                  "value":100000
               }
            ],
            "maximum_range_time":[
               {
                  "profiles":"any",
                  "value":18000
               },
               {
                  "profiles":"driving-car, driving-hgv, cycling-regular, foot-walking",
                  "value":3600
               }
            ],
            "maximum_intervals":10,
            "maximum_locations":2,
            "allow_compute_area":true,
            "attribution":"openrouteservice.org, OpenStreetMap contributors"
         },
         "routing":{
            "enabled":true,
            "mode":"normal",
            "sources":[
               "data/osm_file.pbf"
            ],
            "init_threads":1,
            "attribution":"openrouteservice.org, OpenStreetMap contributors",
            "distance_approximation":true,
            "profiles":{
               "active":[
                   "vehicles-car",
                   "vehicles-hgv",
                   "bike",
                   "pedestrian-walk"
               ],
               "default_params": {
                   "encoder_flags_size": 8,
                   "graphs_root_path": "data/graphs",
                   "elevation_provider": "multi",
                       "elevation_cache_path": "data/elevation_cache",
                   "elevation_clear_cache": true,
                   "instructions": true,
                   "maximum_distance": 100000,
                   "maximum_segment_distance_with_dynamic_weights": 100000,
                   "maximum_waypoints": 50
               },
               "profile-vehicles-car":{
                  "profiles":"driving-car",
                  "parameters":{
                     "encoder_options":"consider_elevation=true|turn_costs=true|block_fords=false|use_acceleration=true",
                     "elevation":true,
                     "preparation":{
                        "min_network_size":200,
                        "min_one_way_network_size":200,
                        "methods":{
                           "ch":{
                              "enabled":true,
                              "threads":8,
                              "weightings":"fastest"
                           },
                           "lm":{
                              "enabled":true,
                              "threads":8,
                              "weightings":"fastest,shortest",
                              "landmarks":24
                           }
                        }
                     },
                     "execution":{
                        "methods":{
                           "astar":{
                              "approximation":"BeelineSimplification",
                              "epsilon":1
                           },
                           "ch":{
                              "disabling_allowed":true
                           },
                           "lm":{
                              "disabling_allowed":true,
                              "active_landmarks":6
                           }
                        }
                     },
                     "ext_storages":{
                        "WayCategory":{

                        },
                        "WaySurfaceType":{

                        },
                        "Tollways":{

                        }
                     }
                  }
               },
               "profile-vehicles-hgv":{
                  "profiles":"driving-hgv",
                  "parameters":{
                     "encoder_options":"consider_elevation=true|turn_costs=true|block_fords=false|use_acceleration=true",
                     "elevation":true,
                     "preparation":{
                        "min_network_size":200,
                        "min_one_way_network_size":200,
                        "methods":{
                           "ch":{
                              "enabled":true,
                              "threads":8,
                              "weightings":"fastest"
                           },
                           "lm":{
                              "enabled":true,
                              "threads":8,
                              "weightings":"fastest,shortest",
                              "landmarks":24
                           }
                        }
                     },
                     "execution":{
                        "methods":{
                           "astar":{
                              "approximation":"BeelineSimplification",
                              "epsilon":1
                           },
                           "ch":{
                              "disabling_allowed":true
                           },
                           "lm":{
                              "disabling_allowed":true,
                              "active_landmarks":6
                           }
                        }
                     },
                     "ext_storages":{
                        "WayCategory":{

                        },
                        "HeavyVehicle":{
                           "restrictions":true
                        },
                        "WaySurfaceType":{

                        },
                        "Tollways":{

                        }
                     }
                  }
               },
               "profile-bike":{
                  "profiles":"cycling-regular",
                  "parameters":{
                     "encoder_options":"consider_elevation=true|turn_costs=true|block_fords=false",
                     "elevation":true,
                     "preparation":{
                        "min_network_size":200,
                        "min_one_way_network_size":200,
                        "methods":{
                           "ch":{
                              "enabled":true,
                              "threads":8,
                              "weightings":"fastest"
                           },
                           "lm":{
                              "enabled":true,
                              "threads":8,
                              "weightings":"fastest,shortest",
                              "landmarks":24
                           }
                        }
                     },
                     "execution":{
                        "methods":{
                           "astar":{
                              "approximation":"BeelineSimplification",
                              "epsilon":1
                           },
                           "ch":{
                              "disabling_allowed":true
                           },
                           "lm":{
                              "disabling_allowed":true,
                              "active_landmarks":6
                           }
                        }
                     },
                     "ext_storages":{
                        "WayCategory":{

                        },
                        "WaySurfaceType":{

                        },
                        "HillIndex":{

                        },
                        "TrailDifficulty":{

                        }
                     }
                  }
               },
               "profile-pedestrian-walk":{
                  "profiles":"foot-walking",
                  "parameters":{
                     "encoder_options":"consider_elevation=true|turn_costs=true|block_fords=false",
                     "elevation":true,
                     "preparation":{
                        "min_network_size":200,
                        "min_one_way_network_size":200,
                        "methods":{
                           "ch":{
                              "enabled":true,
                              "threads":8,
                              "weightings":"fastest"
                           },
                           "lm":{
                              "enabled":true,
                              "threads":8,
                              "weightings":"fastest,shortest",
                              "landmarks":24
                           }
                        }
                     },
                     "execution":{
                        "methods":{
                           "astar":{
                              "approximation":"BeelineSimplification",
                              "epsilon":1
                           },
                           "ch":{
                              "disabling_allowed":true
                           },
                           "lm":{
                              "disabling_allowed":true,
                              "active_landmarks":6
                           }
                        }
                     },
                     "ext_storages":{
                        "WayCategory":{

                        },
                        "WaySurfaceType":{

                        },
                        "HillIndex":{

                        },
                        "TrailDifficulty":{

                        }
                     }
                  }
               }
            }
         }
      },
      "logging": {
          "enabled": true,
          "level_file": "PRODUCTION_LOGGING.json",
          "location": "/var/log/ors",
          "stdout": true
      }
   }
}


```{"status":"ready"}

#14

Oh jeez, now I see the problem.

You were not really clear what you’re trying to do. In your original post you should’ve mentioned that you’re trying to run optimization! That is not part of ORS. If you need that, you need to install Vroom next to ORS. Likely you’ll have to write a Dockerfile for it (and the accompanying HTTP API vroom-express), to avoid Windows issues when building it.

EDIT:
If you’re not using PowerShell yet, I’d recommend that one. cat, among many other UNIX commands, is aliased in powershell.


#15

Since the application runs accessing openrouteservice can I conclude that the openrouteservice service that you hosts does have Vroom installed “next to it?”

What do you mean by install Vroom “next to ORS”? How do they communicate?

Thank you.


#16

Correct, we run Vroom for optimization, Pelias for geocoding, openpoiservice for POIs and openelevationservice for elevation queries. Those are all separate from the openrouteservice repository.

They communicate via HTTP, just like your Python client communicates with our ORS server. It’s a bit mind-bending sometimes, but what happens is this:

  • you send a HTTP POST request to a server running vroom-express (that’s the light-weight HTTP wrapper for vroom)
  • vroom-express receives the request, parses it and hands it down to vroom (really just an executable run on command line)
  • vroom is configurable to be able to HTTP request a matrix from a ORS server to solve the vehicle routing problem. The ORS installation is ideally local (with reference to vroom), or you’ll have to alter some code in vroom
  • with the duration matrix from ORS, vroom solves the problem and returns the JSON to vroom-express, which in turn returns it to your client

The rest you’ll have to figure out by yourself :slight_smile:


#17

Thank you for your comprehensive reply. I do appreciate it.