Please help "unable to get appropriate route" i beg you need this asap

Running docker ors got it to work once then i deleted some direcories that werent in use and now it doesnt work again. Ive checked over everything over 20 times and it makes no scense why its not working. i have 2 sets of the config,files,grapsh… maps and i dont know why. I deleted the set of them that are in the surface folder after that it didnt work. When i ran the container it created them again but i still doesnt work. These maps i deleted arent even used by the docker-compose.yml its mapped towards the ones in /ors-docker wich actaully has stuff in it.
url: http://localhost:8080/ors/v2/directions/cycling-electric/json
also http://localhost:8080/ors/v2/health returns “status”: “not ready”
docker-compose.yml

# Docker Compose file for the openrouteservice (ORS) application
# Documentation and examples can be found on https://giscience.github.io/openrouteservice/run-instance/running-with-docker
#version: '3.8'

services:
  # ----------------- ORS application configuration ------------------- #
  ors-app:
    # Activate the following lines to build the container from the repository
    # You have to add --build to the docker compose command to do so
    build:
      context: ./
    container_name: ors-app
    ports:
      - "8080:8082"  # Expose the ORS API on port 8080
      - "9001:9001"  # Expose additional port for monitoring (optional)
    image: openrouteservice/openrouteservice:v8.0.0

    volumes:  # Mount relative directories. ONLY for local container runtime. To switch to docker managed volumes see 'Docker Volumes configuration' section below.
      - ./ors-docker:/home/ors
      - ./sweden-latest.osm.pbf:/home/ors/files/sweden-latest.osm.pbf

    environment:
      ors.engine.source_file: /home/ors/files/sweden-latest.osm.pbf
      # ors.engine.profiles.cycling-electric.enabled: true
      REBUILD_GRAPHS: True  # Set to True to rebuild graphs on container start.
      CONTAINER_LOG_LEVEL: INFO  # Log level for the container. Possible values: DEBUG, INFO, WARNING, ERROR, CRITICAL

      XMS: 1g  # start RAM assigned to java
      XMX: 3g  # max RAM assigned to java. Rule of Thumb: <PBF-size> * <profiles> * 2
      # Example: 1.5 GB pbf size, two profiles (car and foot-walking)
      # -> 1.5 * 2 * 2 = 6. Set xmx to be AT LEAST `-Xmx6g`
      ADDITIONAL_JAVA_OPTS: ""  # further options you want to pass to the java command


docker container output:

ors-app  | ✓ Removed graphs at /home/ors/graphs/*.
ors-app  | ✓ Container file system preparation complete. For details set CONTAINER_LOG_LEVEL=DEBUG.
ors-app  | #######################################
ors-app  | # Prepare CATALINA_OPTS and JAVA_OPTS #
ors-app  | #######################################
ors-app  | ✓ CATALINA_OPTS and JAVA_OPTS ready. For details set CONTAINER_LOG_LEVEL=DEBUG.
ors-app  | #####################
ors-app  | # ORS startup phase #
ors-app  | #####################
ors-app  | ✓ 🙭 Ready to start the ORS application 🙭
ors-app  |
ors-app  |   .   ____          _            __ _ _
ors-app  |  /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
ors-app  | ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
ors-app  |  \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
ors-app  |   '  |____| .__|_| |_|_| |_\__, | / / / /
ors-app  |  =========|_|==============|___/=/_/_/_/
ors-app  |  :: Spring Boot ::                (v3.1.6)
ors-app  |
ors-app  | 2025-01-03 01:17:35 INFO                                                  main [ o.h.o.a.Application                      ]   Starting Application v8.0.0 using Java 21.0.2 with PID 1 (/ors.jar started by root in /home/ors)
ors-app  | 2025-01-03 01:17:35 INFO                                                  main [ o.h.o.a.Application                      ]   The following 1 profile is active: "default"
ors-app  | 2025-01-03 01:17:35 INFO                                                  main [ o.h.o.a.ORSEnvironmentPostProcessor      ]
ors-app  | 2025-01-03 01:17:35 INFO                                                  main [ o.h.o.a.ORSEnvironmentPostProcessor      ]   Configuration lookup started.
ors-app  | 2025-01-03 01:17:35 INFO                                                  main [ o.h.o.a.ORSEnvironmentPostProcessor      ]   Configuration file set by environment variable.
ors-app  | 2025-01-03 01:17:35 INFO                                                  main [ o.h.o.a.ORSEnvironmentPostProcessor      ]   Loaded file '/home/ors/config/ors-config.yml'
ors-app  | 2025-01-03 01:17:35 INFO                                                  main [ o.h.o.a.ORSEnvironmentPostProcessor      ]   Configuration lookup finished.
ors-app  | 2025-01-03 01:17:35 INFO                                                  main [ o.h.o.a.ORSEnvironmentPostProcessor      ]
ors-app  | 2025-01-03 01:17:37 INFO                                              ORS-Init [ o.h.o.a.s.l.ORSInitContextListener       ]   Initializing ORS...
ors-app  | 2025-01-03 01:17:37 INFO                                              ORS-Init [ o.h.o.r.RoutingProfileManager            ]   Total - 1024 MB, Free - 966.57 MB, Max: 3 GB, Used - 57.43 MB
ors-app  | 2025-01-03 01:17:37 INFO                                              ORS-Init [ o.h.o.r.RoutingProfileManager            ]   ====> Initializing profiles from '/home/ors/files/sweden-latest.osm.pbf' (1 threads) ...
ors-app  | 2025-01-03 01:17:37 INFO                                              ORS-Init [ o.h.o.r.RoutingProfileManager            ]   1 profile configurations submitted as tasks.
ors-app  | 2025-01-03 01:17:37 INFO                               ORS-pl-cycling-electric [ o.h.o.r.RoutingProfile                   ]   [1] Profiles: 'cycling-electric', location: '/home/ors/./graphs/cycling-electric'.
ors-app  | 2025-01-03 01:17:37 INFO                               ORS-pl-cycling-electric [ o.h.o.r.g.e.ORSGraphHopper               ]   version v4.9.1|2024-01-17T09:08:46Z (7,20,5,4,5,7)
ors-app  | 2025-01-03 01:17:37 INFO                               ORS-pl-cycling-electric [ o.h.o.r.g.e.ORSGraphHopper               ]   graph electrobike|RAM_STORE|2D|turn_cost|,,,,, details:edges:0(0MB), nodes:0(0MB), name:(0MB), geo:0(0MB), bounds:1.7976931348623157E308,-1.7976931348623157E308,1.7976931348623157E308,-1.7976931348623157E308ors-app  | 2025-01-03 01:17:37 INFO                               ORS-pl-cycling-electric [ o.h.o.r.g.e.ORSGraphHopper               ]   No custom areas are used, custom_areas.directory not given
ors-app  | 2025-01-03 01:17:37 INFO                               ORS-pl-cycling-electric [ o.h.o.r.g.e.ORSGraphHopper               ]   start creating graph from /home/ors/files/sweden-latest.osm.pbf
ors-app  | 2025-01-03 01:17:37 INFO                               ORS-pl-cycling-electric [ o.h.o.r.g.e.ORSGraphHopper               ]   using electrobike|RAM_STORE|2D|turn_cost|,,,,, memory:totalMB:1024, usedMB:254
ors-app  | 2025-01-03 01:17:38 INFO                                                  main [ o.h.o.a.Application                      ]   Started Application in 4.129 seconds (process running for 5.258)
ors-app  | 2025-01-03 01:17:38 INFO                                                  main [ o.h.o.a.Application                      ]   openrouteservice {"build_date":"2024-03-21T13:55:54Z","version":"8.0.0"}


v View in Docker Desktop   o View Config   w Enable Watch






ors-config.yml

ors:
  engine:
    source_file: /home/ors/files/sweden-latest.osm.pbf
    elevation:
      preprocessed: false
      cache_clear: true
      provider: multi
      cache_path: /home/ors/elevation_cache
    profiles:
      cycling-electric:
        enabled: true
        profile: cycling-electric
        elevation: false
        encoder_options:
          consider_elevation: false
          turn_costs: true
          block_fords: false

tree .

mikel@DESKTOP-7845F9L:/mnt/c/Users/minec/Desktop/gits/vteam2/backend/simulation/ors-docker$ tree .
.
├── config
├── docker-compose.yml
├── elevation_cache
├── files
├── graphs
├── logs
├── ors-docker
│   ├── config
│   │   ├── example-ors-config.env
│   │   ├── example-ors-config.yml
│   │   └── ors-config.yml
│   ├── elevation_cache
│   ├── files
│   │   ├── example-heidelberg.osm.gz
│   │   └── sweden-latest.osm.pbf
│   ├── graphs
│   │   └── cycling-electric
│   │       ├── conditional_access
│   │       ├── conditional_access_electrobike
│   │       ├── edges
│   │       ├── geometry
│   │       ├── landmarks_electrobike_recommended_with_turn_costs
│   │       ├── landmarks_electrobike_shortest_with_turn_costs
│   │       ├── location_index
│   │       ├── nodes
│   │       ├── properties
│   │       ├── stamp.txt
│   │       ├── string_index_keys
│   │       ├── string_index_vals
│   │       ├── subnetwork_landmarks_electrobike_recommended_with_turn_costs
│   │       ├── subnetwork_landmarks_electrobike_shortest_with_turn_costs
│   │       └── turn_costs
│   └── logs
│       └── ors.log
└── sweden-latest.osm.pbf

13 directories, 23 files
mikel@DESKTOP-7845F9L:/mnt/c/Users/minec/Desktop/gits/vteam2/backend/simulation/ors-docker$

result:

{
    "error": {
        "code": 2099,
        "message": "Unable to get an appropriate route profile for RoutePreference = cycling-electric"
    },
    "info": {
        "engine": {
            "build_date": "2024-03-21T13:55:54Z",
            "version": "8.0.0"
        },
        "timestamp": 1735860171508
    }
}

Hi @mikel_yoloson ,

I don’t see anything obviously wrong, but looking at the logs, it seems that it hasn’t loaded/created the graphs fully. The normal first thing to try would be to delete the contents of the graphs folder and then restart the container and see if it manages to complete the build process or the same thing happens.

Unfortunately the downloads area of geofabrik is currently down so I can’t get a pbf file for sweden to try it out…

You can also try checking CPU usage when you start the container to make sure that it is actually doing something. You could also try increasing the amount of RAM available (the Java opts part of the compose file) as that can also cause problems if it is too low.