Running ors v8 as JAR - issues with profiles

Hi sascha,
I installed ors v8 on my pc using JAR. Then I changed some row in ors-config.yml and finally I run ors.jar.
All it seems is working, my health is ‘ready’ and the status too it is ok. But when I run:

http://localhost:8082/ors/v2/directions/driving-car?start=2.311967,48.880794&end=2.306175,48.883558

… I have a correct result, but if I change driving-car to cycling-regular I obtain:


“error”: {
“code”: 2099,
“message”: “Unable to get an appropriate route profile for RoutePreference = cycling-regular”
},
“info”: {
“engine”: {
“build_date”: “2024-03-21T14:11:19Z”,
“version”: “8.0.0”
},
“timestamp”: 1712149808723
}

Following you find the related settings in ors-config.yml:

What it’s mean? What I’m forgetting?

It seems your config is not used for your instance…
How are you starting the jar?
And how are you passing the config file?

Please also provide the Logs of the ORS instance.

Hi amandus, I run the jar with a ‘bat’ containing:

C:/“Program Files”/Java/jdk-21.0.2.13/bin/java -jar ors.jar

In the same folder of ors.jar I have the ors-config.yml ( which it’s correctly used, because I used it to change the map file)

I have the log file, but I don’t know how attach it in this post…

You could just copy paste the contents in a code block here.
But i think you just removed more than the # in the lines that you uncommented for the bike-regular profile.

Make sure it’s on the same indentation level as the car profile.
you can als move it up and just use:

ors:
  engine:
    profiles:
      car:
        enabled: true
      bike-regular:
        enabled: true

plus the changed osm file entry (the profile names you use are the defaults so they can be ommited)

Now this is my profiles setting:

image

This is my log:

2024-04-03 16:49:06 INFO [o.h.o.a.Application ] - Starting Application v8.0.0 using Java 21.0.2 with PID 12408 (C:\Users\agocu\OneDrive\Desktop\ors\ors.jar started by agocu in C:\Users\agocu\OneDrive\Desktop\ors)
2024-04-03 16:49:06 INFO [o.h.o.a.Application ] - The following 1 profile is active: “default”
2024-04-03 16:49:06 INFO [o.h.o.a.ORSEnvironmentPostProcessor ] -
2024-04-03 16:49:06 INFO [o.h.o.a.ORSEnvironmentPostProcessor ] - Configuration lookup started.
2024-04-03 16:49:06 INFO [o.h.o.a.ORSEnvironmentPostProcessor ] - Configuration file set by program argument.
2024-04-03 16:49:06 INFO [o.h.o.a.ORSEnvironmentPostProcessor ] - Loaded file ‘C:/Users/agocu/OneDrive/Desktop/ors/ors-config.yml’
2024-04-03 16:49:06 INFO [o.h.o.a.ORSEnvironmentPostProcessor ] -
2024-04-03 16:49:06 INFO [o.h.o.a.ORSEnvironmentPostProcessor ] - Environment variables overriding openrouteservice configuration parameters detected:
2024-04-03 16:49:06 INFO [o.h.o.a.ORSEnvironmentPostProcessor ] - ors.config.location=C:/Users/agocu/OneDrive/Desktop/ors/ors-config.yml
2024-04-03 16:49:06 INFO [o.h.o.a.ORSEnvironmentPostProcessor ] - Configuration lookup finished.
2024-04-03 16:49:06 INFO [o.h.o.a.ORSEnvironmentPostProcessor ] -
2024-04-03 16:49:08 INFO [o.h.o.a.s.l.ORSInitContextListener ] - Initializing ORS…
2024-04-03 16:49:08 INFO [o.h.o.r.RoutingProfileManager ] - Total - 80 MB, Free - 34,06 MB, Max: 3,95 GB, Used - 45,94 MB
2024-04-03 16:49:08 INFO [o.h.o.r.RoutingProfileManager ] - ====> Initializing profiles from ‘C:\Users\agocu\OneDrive\Desktop\ors\maps\nord-ovest-italy.osm.pbf’ (1 threads) …
2024-04-03 16:49:08 INFO [o.h.o.r.RoutingProfileManager ] - 2 profile configurations submitted as tasks.
2024-04-03 16:49:08 INFO [o.h.o.r.RoutingProfile ] - [1] Profiles: ‘driving-car’, location: ‘C:\Users\agocu\OneDrive\Desktop\ors.\graphs\car’.
2024-04-03 16:49:09 INFO [o.h.o.r.g.e.c.CoreLMPreparationHandler ] - Loaded landmark splitting collection from
2024-04-03 16:49:10 INFO [o.h.o.r.g.e.c.CorePreparationHandler ] - Creating CH preparations, totalMB:1276, usedMB:754
2024-04-03 16:49:10 INFO [o.h.o.r.g.e.c.CoreLMPreparationHandler ] - Creating LM preparations, totalMB:1276, usedMB:757
2024-04-03 16:49:10 INFO [o.h.o.r.g.e.c.CoreLandmarkStorage ] - Created core node ID map for car_ors_fastest_with_turn_costs_highways of size 103118
2024-04-03 16:49:10 INFO [o.h.o.r.g.e.c.CoreLandmarkStorage ] - Created core node ID map for car_ors_fastest_with_turn_costs_allow_all of size 103118
2024-04-03 16:49:10 INFO [o.h.o.r.g.e.c.CoreLandmarkStorage ] - Created core node ID map for car_ors_shortest_with_turn_costs_highways of size 103118
2024-04-03 16:49:10 INFO [o.h.o.a.Application ] - Started Application in 5.167 seconds (process running for 6.625)
2024-04-03 16:49:10 INFO [o.h.o.a.Application ] - openrouteservice {“build_date”:“2024-03-21T14:11:19Z”,“version”:“8.0.0”}
2024-04-03 16:49:10 INFO [o.h.o.r.g.e.c.CoreLandmarkStorage ] - Created core node ID map for car_ors_shortest_with_turn_costs_allow_all of size 103118
2024-04-03 16:49:10 INFO [o.h.o.r.g.e.c.CoreLMPreparationHandler ] - Finished LM preparation, totalMB:1280, usedMB:1022
2024-04-03 16:49:10 INFO [o.h.o.r.g.e.ORSGraphHopper ] - version v4.9.1|2024-01-17T09:08:46Z (7,20,5,4,5,7)
2024-04-03 16:49:10 INFO [o.h.o.r.g.e.ORSGraphHopper ] - graph CH|car_ors|RAM_STORE|3D|turn_cost|7,20,5,4,5, details:edges:1 809 025(63MB), nodes:1 512 303(29MB), name:(9MB), geo:14 571 966(56MB), bounds:-5.5189891,13.3637585,35.8769122,46.6533788,-14.0,3364.0, shortcuts:1 359 886 (26MB), nodesCH:1 512 303 (12MB), shortcuts:1 631 999 (50MB), nodesCH:1 512 303 (12MB), shortcuts:1 826 915 (56MB), nodesCH:1 512 303 (12MB)
2024-04-03 16:49:10 INFO [o.h.o.r.RoutingProfile ] - [1] Edges: 1809025 - Nodes: 1512303.
2024-04-03 16:49:10 INFO [o.h.o.r.RoutingProfile ] - [1] Total time: 2.233s.
2024-04-03 16:49:10 INFO [o.h.o.r.RoutingProfile ] - [1] Finished at: 2024-04-03 16:49:10.
2024-04-03 16:49:10 INFO [o.h.o.r.RoutingProfile ] - [2] Profiles: ‘cycling-regular’, location: ‘C:\Users\agocu\OneDrive\Desktop\ors.\graphs\bike-regular’.
2024-04-03 16:49:10 INFO [o.h.o.r.g.e.ORSGraphHopper ] - version v4.9.1|2024-01-17T09:08:46Z (7,20,5,4,5,7)
2024-04-03 16:49:10 INFO [o.h.o.r.g.e.ORSGraphHopper ] - graph bike_ors|RAM_STORE|3D|turn_cost|, details:edges:0(0MB), nodes:0(0MB), name:(0MB), geo:0(0MB), bounds:1.7976931348623157E308,-1.7976931348623157E308,1.7976931348623157E308,-1.7976931348623157E308,1.7976931348623157E308,-1.7976931348623157E308
2024-04-03 16:49:11 INFO [o.h.o.r.g.e.ORSGraphHopper ] - No custom areas are used, custom_areas.directory not given
2024-04-03 16:49:11 INFO [o.h.o.r.g.e.ORSGraphHopper ] - start creating graph from C:\Users\agocu\OneDrive\Desktop\ors\maps\nord-ovest-italy.osm.pbf
2024-04-03 16:49:11 INFO [o.h.o.r.g.e.ORSGraphHopper ] - using bike_ors|RAM_STORE|3D|turn_cost|, memory:totalMB:1280, usedMB:1071
2024-04-03 16:50:17 INFO [o.h.o.r.g.e.ORSGraphHopper ] - call cleanUp for ‘C:\Users\agocu\OneDrive\Desktop\ors.\graphs\bike-regular’
2024-04-03 16:50:17 INFO [o.h.o.r.g.e.ORSGraphHopper ] - graph bike_ors|RAM_STORE|3D|turn_cost|7,20,5,4,5, details:edges:2 696 778(93MB), nodes:2 126 028(41MB), name:(9MB), geo:21 676 385(83MB), bounds:2.177096,13.1909249,32.9037764,46.6395787,-14.0,3799.0
2024-04-03 16:50:30 INFO [o.h.o.r.g.e.ORSGraphHopper ] - nodes: 2 126 028, edges: 2 696 778
2024-04-03 16:50:31 INFO [o.h.o.r.g.e.ORSGraphHopper ] - Bridge interpolation 0s, tunnel interpolation 0s, ferry interpolation 0s

But I continue to have:

I download from scratch the config file. Now it’s the following:

image

I seems to be similar to previous one, but now it works! Calling the gpx method I obtain the following tail:

I think I need to be very delicate editing the yml file… :wink:

Anyway, thanks for your support!