/matrix endpoint not responding on self install

Hello,
First of all, thank you for this software, it is really helpful and also quite impressive how much you have built!

I do have a problem too, that I want to ask about :slight_smile:
I have self hosted the service, running it under docker. It is responding ok for routes and directions for example, but I cannot get it to respond for /matrix requests.

I am giving it a simple request with only 2 locations, with points that get resolved with the /routing service.
I make the request here:
http://88.198.32.75:8080/ors/matrix/driving-car
with this body: {“locations”:[[21.1753801,45.7237158], [21.1686924,45.7196113]] }
The response body comes back empty, tomcat access log says:
[24/Jun/2019:08:12:35 +0000] “POST /ors/matrix/driving-car HTTP/1.1” 404 5

The same request works when made on api.openrouteservice.org

I also noticed something else;
When I query http://:8080/ors/matrix I get a proper response that no profile is selected
But if I query on an invalid profile “x”, I get the empty page with 404
[24/Jun/2019:08:30:33 +0000] “POST /ors/matrix HTTP/1.1” 400 160
[24/Jun/2019:08:30:37 +0000] “POST /ors/matrix/x HTTP/1.1” 404 5

I have changed almost nothing in configurations, except to load my own .osm.pbf file

Any idea what could be wrong?
And/or, is there any way to increase logging on the application?

Thank you,
Radu

Two things:

  1. What’s the response message? Is there any?
  2. Are you sure you put in the coordinates in the right order, i.e. [lon, lat], not [lat, lon]?
  1. There is no response content at all, the request is answered though, with HTTP 404
  2. Yes, the coordinates are in the same order as I pass them to /routing, where the request produces results (which should also imply the .osm file is loaded correctly and the coordinates are correct)

See /matrix request snapshot

And /routes request snapshot

Also worth mentioning that there are no specific logs for the requests neither under the docker logs, nor under /docker/logs/ors/ors.log
If there are any other logs created, I’d be happy to look

Can you paste the app.config pls?

And no, there’s unfortunately no other log to look at…

Sorry, can’t seem to get the formatting right, you can also find the file here: https://we.tl/t-ku7VYjrKT5

{
   "ors":{
     "info": {
       "base_url": "https://openrouteservice.org/",
       "support_mail": "support@openrouteservice.org",
       "author_tag": "openrouteservice",
       "content_licence": "LGPL 3.0"
      },
      "services":{
         "matrix":{
            "enabled":true,
            "maximum_locations":2500,
            "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"
               ],
               "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
      }
   }
}

Fixed that for you. It’s plain markdown, just enclose multiline code with 3 backticks.

@adam, @timothy, any idea? Don’t see anything wrong with the setup…

uff, now I know why… Sorry, didn’t see that before:

you need to specify the API version, i.e. localhost/ors/v2/matrix/driving-car

Oh my, I have just figured this out, I was going to the old deprecated servlet access points instead of v2 :smiley
Thank you for your prompt answers and support!

I had to take the code and add some logging on it to investigate it myself.
About the logging, I’m not sure if this is the place to open a discussion, but you can get a lot with little work on this, using aspectJ, with a logging aspect on the entry and exit of every @Controller and @Service. It’s not very precise, but it is boilerplate code free and can get you a horde of logging in DEBUG mode.

But one downside is this only logs Spring Components and this does not do well with your Factory model for building the Handler and Manager classes, right now it would only work with the controllers.

I’ve created a fork where you can see the changes: https://github.com/radu-jakab/openrouteservice

Great, thanks @radu-jakab! I’ll point someone to it to have a look!