Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker compose ors-config.json not taken into account #1300

Closed
nicolnt opened this issue Mar 1, 2023 · 22 comments · Fixed by #1311
Closed

Docker compose ors-config.json not taken into account #1300

nicolnt opened this issue Mar 1, 2023 · 22 comments · Fixed by #1311
Assignees

Comments

@nicolnt
Copy link

nicolnt commented Mar 1, 2023

Here's what I did

Run docker-compose on the docker provided docker-compose.yml

conf/ors-config.json and aveyron-latest.osm.pbf are located in the same directory as the docker compose file so no need to change context for me

I edited ors-config.json to extend "maximum_snapping_radius" property from 350 to 1000.

version: '2.4'
services:
  ors-app:
    container_name: ors-app
    ports:
      - "8088:8080" # Not default 8080, already taken
      - "9001:9001"
    image: openrouteservice/openrouteservice:latest
    user: "${UID:-0}:${GID:-0}"
    build:
      # context: ./
      args:
        ORS_CONFIG: ./conf/ors-config.json
        OSM_FILE: ./aveyron-latest.osm.pbf
    volumes:
      - ./graphs:/home/ors/ors-core/data/graphs
      - ./elevation_cache:/home/ors/ors-core/data/elevation_cache
      - ./logs/ors:/home/ors/ors-core/logs/ors
      - ./logs/tomcat:/home/ors/tomcat/logs
      - ./conf:/home/ors/ors-conf
      - ./aveyron-latest.osm.pbf:/home/ors/ors-core/data/osm_file.pbf
    environment:
      - BUILD_GRAPHS=True  # Forces the container to rebuild the graphs, e.g. when PBF is changed
      - "JAVA_OPTS=-Djava.awt.headless=true -server -XX:TargetSurvivorRatio=75 -XX:SurvivorRatio=64 -XX:MaxTenuringThreshold=3 -XX:+UseG1GC -XX:+ScavengeBeforeFullGC -XX:ParallelGCThreads=4 -Xms1g -Xmx2g"
      - "CATALINA_OPTS=-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9001 -Dcom.sun.management.jmxremote.rmi.port=9001 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=localhost

Here's what I got

Got the following error in QGIS when calculating fastest path between input point to one end point:

Route from 1 to 1 caused a ApiError:
404 ({"error":{"code":2010,"message":"Could not find routable point within a radius of 350.0 meters of specified coordinate 0: 2.1656550 44.4736940."},"info":{"engine":{"version":"6.8.2","build_date":"2023-02-22T16:30:20Z"},"timestamp":1677697939299}})
Route from 2 to 1 caused a ApiError:
404 ({"error":{"code":2010,"message":"Could not find routable point within a radius of 350.0 meters of specified coordinate 0: 2.1673120 44.4743790."},"info":{"engine":{"version":"6.8.2","build_date":"2023-02-22T16:30:20Z"},"timestamp":1677697939405}})

Here's what I was expecting

No error, or at least a 1000 meters error, not 350


Here's what I think could be improved

The custom config file is not taken into account.

Here's some logs from the console when running

mkdir -p conf elevation_cache graphs logs/ors logs/tomcat && docker-compose up
ors-app  | ors-config.json exists in ors-conf folder. Copying config to /home/ors/ors-core/ors-config.json
[...]

ors-app  | 19:05:22.446 [localhost-startStop-1] INFO  org.heigit.ors.config.AppConfig - Default path of 'ors-config.json' used for configuration
ors-app  | 19:05:22.464 [localhost-startStop-1] INFO  org.heigit.ors.config.AppConfig - Loading configuration from /home/ors/tomcat/webapps/ors/WEB-INF/classes/ors-config.json

When inspecting the file /home/ors/tomcat/webapps/ors/WEB-INF/classes/ors-config.json using docker exec I can see that it's the default configuration with 350 meters

@nicolnt
Copy link
Author

nicolnt commented Mar 2, 2023

Probably linked to not accurate setup documentation #1298

@koebi
Copy link
Collaborator

koebi commented Mar 2, 2023

Hey,

I got a notification by mail that had the original issue text in it, and when creating this issue, you had the line that mounts the conf folder commented out from your docker-compose.yml.

Are you sure that this mount point is correctly applied and respected by your container?

Best regards

@nicolnt
Copy link
Author

nicolnt commented Mar 2, 2023

I got a notification by mail that had the original issue text in it, and when creating this issue, you had the line that mounts the conf folder commented out from your docker-compose.yml.

Are you sure that this mount point is correctly applied and respected by your container?

Yes I tried a bunch of things and the first version in the issue didn't reflect the documentation recommendations

I can confirm that it's not working even when this line is active. I've spent an entire day trying different things to make it work

The issue is that the container doesn't use /home/ors-conf/conf/ors-config.json file (either provided by volume or argument), but it uses /home/ors/tomcat/webapps/ors/WEB-INF/classes/ors-config.json

Would be great to be able to edit the file and recalculate graph but I couldn't find how.

The only workaround right now to edit config file is to run docker-compose up, then quickly access container's terminal with docker exec -t -i ors-app /bin/bash and edit /home/ors/tomcat/webapps/ors/WEB-INF/classes/ors-config.json with vi before the config gets loaded...

EDIT

Also tried mounting as a volume like this in docker-compose.yml:
./conf/ors-config.json:/home/ors/tomcat/webapps/ors/WEB-INF/classes/ors-config.json

Container won't launch, stuck at these lines in logs (graph doesn't get calculated and api throws 404 error):

ors-app  | 02-Mar-2023 12:59:30.891 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 3467 ms

@koebi
Copy link
Collaborator

koebi commented Mar 2, 2023

Hey,

are you running the latest image, i.e. did you execute docker image pull openrouteservice/openrouteservice recently? The image build has been changed recently…
You can check in /home/ors/ors-core/docker-entrypoint.sh from where to where the config is being copied before being picked up from /home/ors/tomcat/…

Best regards

@nicolnt
Copy link
Author

nicolnt commented Mar 2, 2023

are you running the latest image, i.e. did you execute docker image pull openrouteservice/openrouteservice recently? The image build has been changed recently…

Yes I pulled it yesterday, when has it changed?

You can check in /home/ors/ors-core/docker-entrypoint.sh from where to where the config is being copied before being picked up from /home/ors/tomcat/…

Here is the file:

#!/usr/bin/env bash

echo "Running container as user $(whoami) with id $(id -u)"

ors_base=${1}
catalina_base=${ors_base}/tomcat
echo "ORS Path: ${ors_base}"
echo "Catalina Path: ${catalina_base}"

graphs=${ors_base}/ors-core/data/graphs
tomcat_ors_config=${catalina_base}/webapps/ors/WEB-INF/classes/ors-config.json
source_ors_config=${ors_base}/ors-core/ors-config.json
public_ors_config=${ors_base}/ors-conf/ors-config.json

if [ -z "${CATALINA_OPTS}" ]; then
  export CATALINA_OPTS="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9001 -Dcom.sun.management.jmxremote.rmi.port=9001 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=localhost"
fi

if [ -z "${JAVA_OPTS}" ]; then
  export JAVA_OPTS="-Djava.awt.headless=true -server -XX:TargetSurvivorRatio=75 -XX:SurvivorRatio=64 -XX:MaxTenuringThreshold=3 -XX:+UseG1GC -XX:+ScavengeBeforeFullGC -XX:ParallelGCThreads=4 -Xms1g -Xmx2g"
fi

{
  echo "CATALINA_BASE=\"${catalina_base}\""
  echo "CATALINA_HOME=\"${catalina_base}\""
  echo "CATALINA_PID=\"${catalina_base}/temp/tomcat.pid\""
  echo "CATALINA_OPTS=\"${CATALINA_OPTS}\""
  echo "JAVA_OPTS=\"${JAVA_OPTS}\""
} >"${catalina_base}"/bin/setenv.sh

if [ "${BUILD_GRAPHS}" = "True" ]; then
  rm -rf "${graphs:?}"/*
fi
echo "### openrouteservice configuration ###"
# if Tomcat built before, copy the mounted ors-config.json to the Tomcat webapp ors-config.json, else copy it from the source
if [ -d "${catalina_base}/webapps/ors" ]; then
  echo "Tomcat already built: Copying ${ors_base}/ors-conf/ors-config.json to tomcat webapp folder"
  cp -f "${public_ors_config}" "${tomcat_ors_config}"
else
  if [ ! -f "$public_ors_config" ]; then
    echo "No ors-config.json in ors-conf folder. Copying config from ${source_ors_config}"
    mkdir -p "${ors_base}"/ors-conf
    cp -f "${source_ors_config}" "${public_ors_config}"
  else
    echo "ors-config.json exists in ors-conf folder. Copying config to ${source_ors_config}"
    cp -f "${public_ors_config}" "${source_ors_config}"
  fi
  echo "### Package openrouteservice and deploy to Tomcat ###"
  cp -f "${ors_base}"/ors-core/ors.war "${catalina_base}"/webapps/ors.war
fi

# so docker can stop the process gracefully
exec "${catalina_base}"/bin/catalina.sh run

Thanks for your help!

@koebi
Copy link
Collaborator

koebi commented Mar 2, 2023

Could you add the first dozen lines or so of a docker logs ors-app?
That should show all the "echo"-lines from this entrypoint script and should give us a good idea on what needs to be fixed where :)

@nicolnt
Copy link
Author

nicolnt commented Mar 2, 2023

Sure thing, see below

❯ docker logs ors-app | head -n 15
NOTE: Picked up JDK_JAVA_OPTIONS:  --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
02-Mar-2023 14:18:46.897 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version name:   Apache Tomcat/8.5.69
02-Mar-2023 14:18:46.904 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built:          Jun 30 2021 18:00:00 UTC
Running container as user root with id 0
02-Mar-2023 14:18:46.904 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version number: 8.5.69.0
ORS Path: /home/ors
Catalina Path: /home/ors/tomcat
02-Mar-2023 14:18:46.904 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name:               Linux
### openrouteservice configuration ###
ors-config.json exists in ors-conf folder. Copying config to /home/ors/ors-core/ors-config.json
### Package openrouteservice and deploy to Tomcat ###
02-Mar-2023 14:18:46.905 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version:            5.15.49-linuxkit
02-Mar-2023 14:18:46.906 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture:          amd64
02-Mar-2023 14:18:46.906 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home:             /opt/java/openjdk
02-Mar-2023 14:18:46.907 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version:           11.0.18+10
02-Mar-2023 14:18:46.907 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor:            Eclipse Adoptium
02-Mar-2023 14:18:46.907 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:         /home/ors/tomcat
02-Mar-2023 14:18:46.908 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:         /home/ors/tomcat
02-Mar-2023 14:18:46.923 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.lang=ALL-UNNAMED
02-Mar-2023 14:18:46.925 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.io=ALL-UNNAMED
02-Mar-2023 14:18:46.926 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.util=ALL-UNNAMED
02-Mar-2023 14:18:46.926 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.util.concurrent=ALL-UNNAMED
02-Mar-2023 14:18:46.926 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
02-Mar-2023 14:18:46.926 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/home/ors/tomcat/conf/logging.properties
02-Mar-2023 14:18:46.927 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
02-Mar-2023 14:18:46.927 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.awt.headless=true
02-Mar-2023 14:18:46.927 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:TargetSurvivorRatio=75
02-Mar-2023 14:18:46.928 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:SurvivorRatio=64
02-Mar-2023 14:18:46.928 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:MaxTenuringThreshold=3
02-Mar-2023 14:18:46.928 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:+UseG1GC
02-Mar-2023 14:18:46.928 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:+ScavengeBeforeFullGC
02-Mar-2023 14:18:46.928 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:ParallelGCThreads=4
02-Mar-2023 14:18:46.929 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xms1g
02-Mar-2023 14:18:46.929 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xmx2g
02-Mar-2023 14:18:46.929 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
02-Mar-2023 14:18:46.929 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
02-Mar-2023 14:18:46.929 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dorg.apache.catalina.security.SecurityListener.UMASK=0027
02-Mar-2023 14:18:46.930 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote
02-Mar-2023 14:18:46.930 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.port=9001
02-Mar-2023 14:18:46.931 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.rmi.port=9001
02-Mar-2023 14:18:46.932 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.authenticate=false
02-Mar-2023 14:18:46.932 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.ssl=false
02-Mar-2023 14:18:46.932 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.rmi.server.hostname=localhost
02-Mar-2023 14:18:46.933 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=
02-Mar-2023 14:18:46.933 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/home/ors/tomcat
02-Mar-2023 14:18:46.933 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/home/ors/tomcat
02-Mar-2023 14:18:46.934 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/home/ors/tomcat/temp
02-Mar-2023 14:18:46.934 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The Apache Tomcat Native library which allows using OpenSSL was not found on the java.library.path: [/usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib]
02-Mar-2023 14:18:47.073 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
02-Mar-2023 14:18:47.110 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
02-Mar-2023 14:18:47.166 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 1515 ms
02-Mar-2023 14:18:47.400 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
02-Mar-2023 14:18:47.401 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/8.5.69]
02-Mar-2023 14:18:47.492 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive [/home/ors/tomcat/webapps/ors.war]
02-Mar-2023 14:19:01.114 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.
14:19:03.730 [localhost-startStop-1] INFO  org.heigit.ors.config.AppConfig - Default path of 'ors-config.json' used for configuration
14:19:03.748 [localhost-startStop-1] INFO  org.heigit.ors.config.AppConfig - Loading configuration from /home/ors/tomcat/webapps/ors/WEB-INF/classes/ors-config.json

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
SLF4J: No SLF4J providers were found.
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See https://www.slf4j.org/codes.html#noProviders for further details.

@jeremiebdn
Copy link

+1
I've had the same experience in the past few days. The conf/ors-config.json file is ignored, as a result I only have access to the car profile.
Does it have anything to do with the build block in docker-compose.yml, that is initially uncommented despite what the documentation says? https://giscience.github.io/openrouteservice/installation/Advanced-Docker-Setup.html
I tried setting ORS_CONFIG and OSM_FILE, tried commenting the block as well, to no avail.
Is there any workaround to force using a specific config file?

@augustin-grv
Copy link

+1
Same problem here, the config file is ignored which makes it impossible to change the maximum distance for routing service. I am stuck.

@puniker
Copy link

puniker commented Mar 6, 2023

+1
I'm having the same problem. Configuration file ignored...

MichaelsJP added a commit that referenced this issue Mar 6, 2023
The user config file is now used when the container is restarted or recreated.
Fixes #1300
@MichaelsJP MichaelsJP linked a pull request Mar 6, 2023 that will close this issue
@MichaelsJP
Copy link
Member

@nicolnt I pushed a fix that should take the config files into consideration now. We'll slowly introduce that to the affected versions tomorrow and also make a new release for latest. Thanks for pointing that out.

@MichaelsJP MichaelsJP self-assigned this Mar 6, 2023
@takb takb closed this as completed in #1311 Mar 7, 2023
@nicolnt
Copy link
Author

nicolnt commented Mar 15, 2023

Hey @MichaelsJP ,
I'm still having this issue, I just pulled from nightly

In the file ors-config-sample.jsonI changed the maximum snapping distance from 350 to 5 meters. Then run docker-compose up

// ...
          "profile-car": {
            "profiles": "driving-car",
            "parameters": {
// ...
              "maximum_snapping_radius": 5,
// ...

I still get the following error which shows that my settings are not considered (should say 5 meters instead of 350 meters):

Route from 1 to 1 caused a ApiError:
404 ({"error":{"code":2010,"message":"Could not find routable point within a radius of 350.0 meters of specified coordinate 0: -0.9518520 43.8787400."},"info":{"engine":{"version":"7.0.1","build_date":"2023-03-15T15:58:51Z"},"timestamp":1678896608352}})

Here's my docker-compose.yml file:

version: '2.4'
services:
  ors-app:
    platform: linux/amd64
    container_name: ors-app
    ports:
      - "8888:8080"
      - "9001:9001"
    image: openrouteservice/openrouteservice:nightly
    user: "${UID:-0}:${GID:-0}"
    build:
      context: ../
      args:
        ORS_CONFIG: ./openrouteservice/src/main/resources/ors-config-sample.json
        OSM_FILE: ./extractions_OSM/230315_landes.osm.pbf
    volumes:
      - ./graphs:/home/ors/ors-core/data/graphs
      - ./elevation_cache:/home/ors/ors-core/data/elevation_cache
      - ./logs/ors:/home/ors/ors-core/logs/ors
      - ./logs/tomcat:/home/ors/tomcat/logs
      - ./conf:/home/ors/ors-conf
    environment:
      - BUILD_GRAPHS=True  # Forces the container to rebuild the graphs, e.g. when PBF is changed
      - "JAVA_OPTS=-Djava.awt.headless=true -server -XX:TargetSurvivorRatio=75 -XX:SurvivorRatio=64 -XX:MaxTenuringThreshold=3 -XX:+UseG1GC -XX:+ScavengeBeforeFullGC -XX:ParallelGCThreads=4 -Xms1g -Xmx2g"
      - "CATALINA_OPTS=-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9001 -Dcom.sun.management.jmxremote.rmi.port=9001 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=localhost"

EDIT

API status (the build used is nightly)

{"engine":{"version":"7.0.1","build_date":"2023-03-15T15:58:51Z"}}

@MichaelsJP
Copy link
Member

MichaelsJP commented Mar 15, 2023

@nicolnt Thanks for getting back on this. Please do not use nightly but latest at least.

Try the following docker-compose.yml with the commands:

docker-compose.yml

version: '2.4'
services:
  ors-app:
    container_name: ors-app
    ports:
      - "8080:8080"
      - "9001:9001"
    image: openrouteservice/openrouteservice:latest
    user: "${UID:-0}:${GID:-0}"
    volumes:
      - ./graphs:/home/ors/ors-core/data/graphs
      - ./elevation_cache:/home/ors/ors-core/data/elevation_cache
      - ./logs/ors:/home/ors/ors-core/logs/ors
      - ./logs/tomcat:/home/ors/tomcat/logs
      - ./conf:/home/ors/ors-conf
      - ./extractions_OSM/230315_landes.osm.pbf:/home/ors/ors-core/data/osm_file.pbf
    environment:
      - BUILD_GRAPHS=True  # Forces the container to rebuild the graphs, e.g. when PBF is changed
      - "JAVA_OPTS=-Djava.awt.headless=true -server -XX:TargetSurvivorRatio=75 -XX:SurvivorRatio=64 -XX:MaxTenuringThreshold=3 -XX:+UseG1GC -XX:+ScavengeBeforeFullGC -XX:ParallelGCThreads=4 -Xms1g -Xmx2g"
      - "CATALINA_OPTS=-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9001 -Dcom.sun.management.jmxremote.rmi.port=9001 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=localhost"

commands

docker-compose pull
docker-compose up -d && docker-compose logs -ft

@MichaelsJP MichaelsJP reopened this Mar 15, 2023
@nicolnt
Copy link
Author

nicolnt commented Mar 15, 2023

Thanks

I get some errors with the graphhopper:

...
ors-app  | 2023-03-15T17:02:44.310044423Z 15 Mar 17:02:44 INFO [extensions.ORSGraphHopper] - graph CH|car_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, shortcuts:0 (0MB), nodesCH:-1 (0MB), shortcuts:0 (0MB), nodesCH:-1 (0MB), shortcuts:0 (0MB), nodesCH:-1 (0MB)
ors-app  | 2023-03-15T17:02:44.864565465Z 15 Mar 17:02:44 INFO [extensions.ORSGraphHopper] - No custom areas are used, custom_areas.directory not given
ors-app  | 2023-03-15T17:02:44.897560423Z 15 Mar 17:02:44 INFO [extensions.ORSGraphHopper] - start creating graph from /home/ors/ors-core/data/osm_file.pbf
ors-app  | 2023-03-15T17:02:44.986463090Z 15 Mar 17:02:44 INFO [extensions.ORSGraphHopper] - using CH|car_ors|RAM_STORE|3D|turn_cost|,,,,, memory:totalMB:1024, usedMB:162
ors-app  | 2023-03-15T17:02:58.595900179Z 15 Mar 17:02:58 ERROR [osm.OSMReader] - Couldn't properly add edge with osm ids:[2810821407, 2810821406, 6804127478, 2810821405, 2810821404, 2810821403, 2810821422, 410375472, 6805868205, 6805868171, 6804127479, 410375475]
ors-app  | 2023-03-15T17:02:58.596287179Z java.lang.IllegalStateException: Suspicious distance for edge: 5156 99021-3837 255.159 vs. 408.49538894896665, difference: -153.33638894896666
ors-app  | 2023-03-15T17:02:58.596361388Z 	at com.graphhopper.reader.osm.OSMReader.checkDistance(OSMReader.java:923) ~[graphhopper-core-v4.0.jar:?]
ors-app  | 2023-03-15T17:02:58.596420888Z 	at com.graphhopper.reader.osm.OSMReader.addEdge(OSMReader.java:905) ~[graphhopper-core-v4.0.jar:?]
ors-app  | 2023-03-15T17:02:58.596457471Z 	at com.graphhopper.reader.osm.OSMReader.addOSMWay(OSMReader.java:840) ~[graphhopper-core-v4.0.jar:?]
ors-app  | 2023-03-15T17:02:58.596478763Z 	at com.graphhopper.reader.osm.OSMReader.processWay(OSMReader.java:476) ~[graphhopper-core-v4.0.jar:?]
ors-app  | 2023-03-15T17:02:58.596499096Z 	at org.heigit.ors.routing.graphhopper.extensions.ORSOSMReader.processWay(ORSOSMReader.java:163) ~[classes/:7.0.1]
ors-app  | 2023-03-15T17:02:58.596524846Z 	at com.graphhopper.reader.osm.OSMReader.writeOsmToGraph(OSMReader.java:310) ~[graphhopper-core-v4.0.jar:?]
ors-app  | 2023-03-15T17:02:58.596546179Z 	at com.graphhopper.reader.osm.OSMReader.readGraph(OSMReader.java:185) ~[graphhopper-core-v4.0.jar:?]
ors-app  | 2023-03-15T17:02:58.596587929Z 	at com.graphhopper.GraphHopper.importOSM(GraphHopper.java:743) ~[graphhopper-core-v4.0.jar:?]
ors-app  | 2023-03-15T17:02:58.596626304Z 	at com.graphhopper.GraphHopper.process(GraphHopper.java:707) ~[graphhopper-core-v4.0.jar:?]
ors-app  | 2023-03-15T17:02:58.596660638Z 	at com.graphhopper.GraphHopper.importOrLoad(GraphHopper.java:670) ~[graphhopper-core-v4.0.jar:?]
ors-app  | 2023-03-15T17:02:58.596681596Z 	at org.heigit.ors.routing.graphhopper.extensions.ORSGraphHopper.importOrLoad(ORSGraphHopper.java:161) ~[classes/:7.0.1]
ors-app  | 2023-03-15T17:02:58.596713929Z 	at org.heigit.ors.routing.RoutingProfile.initGraphHopper(RoutingProfile.java:186) ~[classes/:7.0.1]
ors-app  | 2023-03-15T17:02:58.596740221Z 	at org.heigit.ors.routing.RoutingProfile.<init>(RoutingProfile.java:134) ~[classes/:7.0.1]
ors-app  | 2023-03-15T17:02:58.596771971Z 	at org.heigit.ors.routing.RoutingProfileLoader.call(RoutingProfileLoader.java:39) ~[classes/:7.0.1]
ors-app  | 2023-03-15T17:02:58.596795013Z 	at org.heigit.ors.routing.RoutingProfileLoader.call(RoutingProfileLoader.java:25) ~[classes/:7.0.1]
ors-app  | 2023-03-15T17:02:58.596814638Z 	at java.util.concurrent.FutureTask.run(Unknown Source) ~[?:?]
ors-app  | 2023-03-15T17:02:58.596842596Z 	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) ~[?:?]
ors-app  | 2023-03-15T17:02:58.596882471Z 	at java.util.concurrent.FutureTask.run(Unknown Source) ~[?:?]
ors-app  | 2023-03-15T17:02:58.596917221Z 	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) ~[?:?]
ors-app  | 2023-03-15T17:02:58.596948096Z 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ~[?:?]
ors-app  | 2023-03-15T17:02:58.596973513Z 	at java.lang.Thread.run(Unknown Source) ~[?:?]
ors-app  | 2023-03-15T17:02:58.608014346Z 15 Mar 17:02:58 ERROR [routing.RoutingProfileManager] - java.util.concurrent.ExecutionException: java.lang.RuntimeException: Couldn't process file /home/ors/ors-core/data/osm_file.pbf, error: Suspicious distance for edge: 5156 99021-3837 255.159 vs. 408.49538894896665, difference: -153.33638894896666
ors-app  | 2023-03-15T17:02:58.612453138Z 15 Mar 17:02:58 ERROR [routing.RoutingProfileManager] - Failed to initialize RoutingProfileManager instance.
ors-app  | 2023-03-15T17:02:58.612469888Z java.util.concurrent.ExecutionException: java.lang.RuntimeException: Couldn't process file /home/ors/ors-core/data/osm_file.pbf, error: Suspicious distance for edge: 5156 99021-3837 255.159 vs. 408.49538894896665, difference: -153.33638894896666
ors-app  | 2023-03-15T17:02:58.612483679Z 	at java.util.concurrent.FutureTask.report(Unknown Source) ~[?:?]
ors-app  | 2023-03-15T17:02:58.612486971Z 	at java.util.concurrent.FutureTask.get(Unknown Source) ~[?:?]
ors-app  | 2023-03-15T17:02:58.612488971Z 	at org.heigit.ors.routing.RoutingProfileManager.initialize(RoutingProfileManager.java:180) ~[classes/:7.0.1]
ors-app  | 2023-03-15T17:02:58.612493138Z 	at org.heigit.ors.routing.RoutingProfileManager.getInstance(RoutingProfileManager.java:71) ~[classes/:7.0.1]
ors-app  | 2023-03-15T17:02:58.612496013Z 	at org.heigit.ors.routing.RoutingProfileManager.isInitComplete(RoutingProfileManager.java:681) ~[classes/:7.0.1]
ors-app  | 2023-03-15T17:02:58.612497888Z 	at org.heigit.ors.servlet.listeners.ORSKafkaConsumerInitContextListener.lambda$contextInitialized$0(ORSKafkaConsumerInitContextListener.java:47) ~[classes/:7.0.1]
ors-app  | 2023-03-15T17:02:58.612499888Z 	at java.lang.Thread.run(Unknown Source) ~[?:?]
ors-app  | 2023-03-15T17:02:58.612501888Z Caused by: java.lang.RuntimeException: Couldn't process file /home/ors/ors-core/data/osm_file.pbf, error: Suspicious distance for edge: 5156 99021-3837 255.159 vs. 408.49538894896665, difference: -153.33638894896666
ors-app  | 2023-03-15T17:02:58.612504763Z 	at com.graphhopper.reader.osm.OSMReader.writeOsmToGraph(OSMReader.java:334) ~[graphhopper-core-v4.0.jar:?]
ors-app  | 2023-03-15T17:02:58.612508679Z 	at com.graphhopper.reader.osm.OSMReader.readGraph(OSMReader.java:185) ~[graphhopper-core-v4.0.jar:?]
ors-app  | 2023-03-15T17:02:58.612510638Z 	at com.graphhopper.GraphHopper.importOSM(GraphHopper.java:743) ~[graphhopper-core-v4.0.jar:?]
ors-app  | 2023-03-15T17:02:58.612512638Z 	at com.graphhopper.GraphHopper.process(GraphHopper.java:707) ~[graphhopper-core-v4.0.jar:?]
ors-app  | 2023-03-15T17:02:58.612514471Z 	at com.graphhopper.GraphHopper.importOrLoad(GraphHopper.java:670) ~[graphhopper-core-v4.0.jar:?]
ors-app  | 2023-03-15T17:02:58.612516304Z 	at org.heigit.ors.routing.graphhopper.extensions.ORSGraphHopper.importOrLoad(ORSGraphHopper.java:161) ~[classes/:7.0.1]
ors-app  | 2023-03-15T17:02:58.612518138Z 	at org.heigit.ors.routing.RoutingProfile.initGraphHopper(RoutingProfile.java:186) ~[classes/:7.0.1]
ors-app  | 2023-03-15T17:02:58.612520596Z 	at org.heigit.ors.routing.RoutingProfile.<init>(RoutingProfile.java:134) ~[classes/:7.0.1]
ors-app  | 2023-03-15T17:02:58.612522513Z 	at org.heigit.ors.routing.RoutingProfileLoader.call(RoutingProfileLoader.java:39) ~[classes/:7.0.1]
ors-app  | 2023-03-15T17:02:58.612524346Z 	at org.heigit.ors.routing.RoutingProfileLoader.call(RoutingProfileLoader.java:25) ~[classes/:7.0.1]
ors-app  | 2023-03-15T17:02:58.612526679Z 	at java.util.concurrent.FutureTask.run(Unknown Source) ~[?:?]
ors-app  | 2023-03-15T17:02:58.612528471Z 	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) ~[?:?]
ors-app  | 2023-03-15T17:02:58.612530263Z 	at java.util.concurrent.FutureTask.run(Unknown Source) ~[?:?]
ors-app  | 2023-03-15T17:02:58.612534179Z 	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) ~[?:?]
ors-app  | 2023-03-15T17:02:58.612538429Z 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ~[?:?]
ors-app  | 2023-03-15T17:02:58.612547179Z 	... 1 more
ors-app  | 2023-03-15T17:02:58.612552763Z Caused by: java.lang.IllegalStateException: Suspicious distance for edge: 5156 99021-3837 255.159 vs. 408.49538894896665, difference: -153.33638894896666
ors-app  | 2023-03-15T17:02:58.612556471Z 	at com.graphhopper.reader.osm.OSMReader.checkDistance(OSMReader.java:923) ~[graphhopper-core-v4.0.jar:?]
ors-app  | 2023-03-15T17:02:58.612560596Z 	at com.graphhopper.reader.osm.OSMReader.addEdge(OSMReader.java:905) ~[graphhopper-core-v4.0.jar:?]
ors-app  | 2023-03-15T17:02:58.612563263Z 	at com.graphhopper.reader.osm.OSMReader.addOSMWay(OSMReader.java:840) ~[graphhopper-core-v4.0.jar:?]
ors-app  | 2023-03-15T17:02:58.612569221Z 	at com.graphhopper.reader.osm.OSMReader.processWay(OSMReader.java:476) ~[graphhopper-core-v4.0.jar:?]
ors-app  | 2023-03-15T17:02:58.612572138Z 	at org.heigit.ors.routing.graphhopper.extensions.ORSOSMReader.processWay(ORSOSMReader.java:163) ~[classes/:7.0.1]
ors-app  | 2023-03-15T17:02:58.612573971Z 	at com.graphhopper.reader.osm.OSMReader.writeOsmToGraph(OSMReader.java:310) ~[graphhopper-core-v4.0.jar:?]
ors-app  | 2023-03-15T17:02:58.612575721Z 	at com.graphhopper.reader.osm.OSMReader.readGraph(OSMReader.java:185) ~[graphhopper-core-v4.0.jar:?]
ors-app  | 2023-03-15T17:02:58.612577513Z 	at com.graphhopper.GraphHopper.importOSM(GraphHopper.java:743) ~[graphhopper-core-v4.0.jar:?]
ors-app  | 2023-03-15T17:02:58.612579346Z 	at com.graphhopper.GraphHopper.process(GraphHopper.java:707) ~[graphhopper-core-v4.0.jar:?]
ors-app  | 2023-03-15T17:02:58.612584013Z 	at com.graphhopper.GraphHopper.importOrLoad(GraphHopper.java:670) ~[graphhopper-core-v4.0.jar:?]
ors-app  | 2023-03-15T17:02:58.612586013Z 	at org.heigit.ors.routing.graphhopper.extensions.ORSGraphHopper.importOrLoad(ORSGraphHopper.java:161) ~[classes/:7.0.1]
ors-app  | 2023-03-15T17:02:58.612587763Z 	at org.heigit.ors.routing.RoutingProfile.initGraphHopper(RoutingProfile.java:186) ~[classes/:7.0.1]
ors-app  | 2023-03-15T17:02:58.612590054Z 	at org.heigit.ors.routing.RoutingProfile.<init>(RoutingProfile.java:134) ~[classes/:7.0.1]
ors-app  | 2023-03-15T17:02:58.612591929Z 	at org.heigit.ors.routing.RoutingProfileLoader.call(RoutingProfileLoader.java:39) ~[classes/:7.0.1]
ors-app  | 2023-03-15T17:02:58.612593763Z 	at org.heigit.ors.routing.RoutingProfileLoader.call(RoutingProfileLoader.java:25) ~[classes/:7.0.1]
ors-app  | 2023-03-15T17:02:58.612595596Z 	at java.util.concurrent.FutureTask.run(Unknown Source) ~[?:?]
ors-app  | 2023-03-15T17:02:58.612599138Z 	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) ~[?:?]
ors-app  | 2023-03-15T17:02:58.612603096Z 	at java.util.concurrent.FutureTask.run(Unknown Source) ~[?:?]
ors-app  | 2023-03-15T17:02:58.612607096Z 	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) ~[?:?]
ors-app  | 2023-03-15T17:02:58.612609804Z 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ~[?:?]
ors-app  | 2023-03-15T17:02:58.612611638Z 	... 1 more
ors-app  | 2023-03-15T17:02:58.613234013Z 15 Mar 17:02:58 INFO [routing.RoutingProfileManager] - ====> Recycling garbage...
ors-app  | 2023-03-15T17:02:58.614879721Z 15 Mar 17:02:58 INFO [routing.RoutingProfileManager] - Before:  Total - 1024 MB, Free - 670.79 MB, Max: 2 GB, Used - 353.21 MB
ors-app  | 2023-03-15T17:02:58.829395471Z 15 Mar 17:02:58 INFO [routing.RoutingProfileManager] - After:  Total - 1024 MB, Free - 989.25 MB, Max: 2 GB, Used - 34.75 MB
ors-app  | 2023-03-15T17:02:58.831560596Z 15 Mar 17:02:58 INFO [routing.RoutingProfileManager] - ========================================================================
ors-app  | 2023-03-15T17:02:58.832435388Z 15 Mar 17:02:58 INFO [routing.RoutingProfileManager] - ====> Memory usage by profiles:
ors-app  | 2023-03-15T17:02:58.856555971Z 15 Mar 17:02:58 INFO [routing.RoutingProfileManager] - Total: 0 B (0.0%)
ors-app  | 2023-03-15T17:02:58.857819680Z 15 Mar 17:02:58 INFO [routing.RoutingProfileManager] - ========================================================================

EDIT

I can edit config file and pbf via the docker volume method, build parameters ORS_CONFIG and OSM_FILE seem to be no longer supported

Tried with another PBF file for a different region, same issue with graphhopper.

This bug seems to be related to graphhopper or osm files, not openrouteservice. Couldn't find how to fix it...

@nicolnt
Copy link
Author

nicolnt commented Mar 16, 2023

I'll keep this issue open because there still is confusion as build parameters are still present in the template docker-compose.yml. Even being commented out, it looks like it's a way to change config where it should actually be done via Docker volume mounting. Also mentioned in documentation Running-with-Docker.md and Advanced-Docker-Setup.md

Should I open a new issue for the graphhopper thing?

@MichaelsJP
Copy link
Member

MichaelsJP commented Mar 16, 2023

@nicolnt Nope, it's fine. No need for another issue. If it works for you, we can try to find out what's happening in this issue.
I'll try to reproduce the errors locally. If you can, please post the full log file. I'd like to investigate what happened before this point.

ORS_CONFIG and OSM_FILE are build arguments, not env arguments. They're only relevant at the time of building the image and not expected to do anything while purely starting the container.

Additionally:

@MichaelsJP
Copy link
Member

MichaelsJP commented Mar 16, 2023

@nicolnt I could reproduce the error with dordogne.osm.pbf. On it!
Until it's fixed, just change latest to v6.8.3. It should work.

@nicolnt
Copy link
Author

nicolnt commented Mar 16, 2023

Thanks for your help!

ORS_CONFIG and OSM_FILE are build arguments, not env arguments. They're only relevant at the time of building the image and not expected to do anything while purely starting the container.

Running docker-compose up instead of start doesn't build the container? It's what I'm doing (after a docker-compose down, I'm still a noob with Docker

what OS are you running on?

macOS Monterey 12.6 on MacBook Pro M2 chip

What pbf did you download exactly from http://download.openstreetmap.fr/extracts/europe/france/aquitaine/ ?

Any, other departments suffer from the same issue at the moment

@MichaelsJP
Copy link
Member

MichaelsJP commented Mar 16, 2023

Thanks for your patience!

Any, other departments suffer from the same issue at the moment

Yup. I could reproduce it in version 7.x. Please downgrade to v6.8.3, this bug doesn't affect that version. This will solve it for you until it's fixed.

Running docker-compose up instead of start doesn't build the container? It's what I'm doing (after a docker-compose down, I'm still a noob with Docker

No prob. In docker, you generally deal with images and containers. Containers are created from images and are the instances you deal with when they're running. Images themselves are created from Dockerfiles.

So, you have two steps: 1. build image from Dockerfile and 2. build container from image.

Build arguments only apply to step 1, Environment variables only to 2.
When you run docker-compose up step 2 is executed.
When you run docker-compose up --build step 1 is executed first and then step 2.

BUT ->
Step 1 is only executed with the --build flag, if this part in your docker-compose.yml is not commented out:

    build:
      context: ../
      args:
        ORS_CONFIG: ./openrouteservice/src/main/resources/ors-config-sample.json
        OSM_FILE: ./openrouteservice/src/main/files/heidelberg.osm.gz

I don't recommend you to do this since it would build the image on the latest master code. Better stick with a release version with either latest or one of the other versions Docker hub versions.
As mentioned before, for the moment, please consider using version v6.8.3.

@nicolnt
Copy link
Author

nicolnt commented Apr 4, 2023

@MichaelsJP

Just tried with v6.8.3, docker-compose.yml

It is still ignoring my ors-config.json provided by volume mounting. Sorry I feel lost, I can't get it to work and spent countless hours.

version: '2.4'
services:
  ors-app:
    container_name: ors-app
    ports:
      - "8088:8080"
      - "9001:9001"
    image: openrouteservice/openrouteservice:v6.8.3
    user: "${UID:-0}:${GID:-0}"
    platform: linux/amd64
    volumes:
      - ./graphs:/home/ors/ors-core/data/graphs
      - ./elevation_cache:/home/ors/ors-core/data/elevation_cache
      - ./logs/ors:/home/ors/ors-core/logs/ors
      - ./logs/tomcat:/home/ors/tomcat/logs
      - ./conf:/home/ors/ors-conf
      - ./aquitaine.osm.pbf:/home/ors/ors-core/data/osm_file.pbf
    environment:
      - BUILD_GRAPHS=True  # Forces the container to rebuild the graphs, e.g. when PBF is changed
      - "JAVA_OPTS=-Djava.awt.headless=true -server -XX:TargetSurvivorRatio=75 -XX:SurvivorRatio=64 -XX:MaxTenuringThreshold=3 -XX:+UseG1GC -XX:+ScavengeBeforeFullGC -XX:ParallelGCThreads=4 -Xms1g -Xmx2g"
      - "CATALINA_OPTS=-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9001 -Dcom.sun.management.jmxremote.rmi.port=9001 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=localhost
[...]
ors-app  | 2023-04-04T08:36:41.713111918Z 08:36:41.703 [localhost-startStop-1] INFO  org.heigit.ors.config.AppConfig - Default path of 'ors-config.json' used for configuration
ors-app  | 2023-04-04T08:36:41.721769710Z 08:36:41.721 [localhost-startStop-1] INFO  org.heigit.ors.config.AppConfig - Loading configuration from /home/ors/tomcat/webapps/ors/WEB-INF/classes/ors-config.json
[...]

EDIT : Another problem I'm encountering

It's maybe linked, I have no idea.

Very often, it often doesn't want to build graph and ors get stuck at this point:

[...]
ors-app  | 2023-04-04T09:03:02.511031636Z 04-Apr-2023 09:03:02.510 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
ors-app  | 2023-04-04T09:03:02.662984845Z 04-Apr-2023 09:03:02.662 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 38889 ms

And http://localhost:8088/ors/v2/health is replying status: "not ready"

What I do is:

docker-compose down
# Then
rm -r graphs elevation_cache && mkdir graphs elevation_cache && docker-compose up -d && docker-compose logs -ft

It could also be expected behavior and it just takes a long time before initializing graph

@nicolnt
Copy link
Author

nicolnt commented Apr 4, 2023

It's actually working. I was confused and instead of waiting for 15 min I was thinking there was a bug. I don't understand why it was not using my config file at first and now it does. If I can reproduce I'll let you now, I don't get what happened

Here are my thoughts to reduce confusion:

  • Show that elevation cache is being built, otherwise I thought that ORS was stuck. Like graph user should be noticed.
    Stayed several minutes at this stage. It was doing stuff with elevation cache:
ors-app  | 2023-04-04T09:03:02.662984845Z 04-Apr-2023 09:03:02.662 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 38889 ms

When graph is being built, user is noticed with messages like that in logs:

ors-app  | 2023-04-04T11:56:12.934990379Z 04 Apr 11:56:12 INFO [core.PrepareCore] - 0, updates:0, nodes: 263 714, shortcuts:0, dijkstras:975 349, t(dijk):1.74, t(period):0.0, t(lazy):0.0, t(neighbor):0.0, meanDegree:1, algo:4MB, totalMB:1024, usedMB:378
[...]
  • Confusing message, it's like user specified ors-config.json was ignored :
[...]
ors-app  | 2023-04-04T08:36:41.713111918Z 08:36:41.703 [localhost-startStop-1] INFO  org.heigit.ors.config.AppConfig - Default path of 'ors-config.json' used for configuration
ors-app  | 2023-04-04T08:36:41.721769710Z 08:36:41.721 [localhost-startStop-1] INFO  org.heigit.ors.config.AppConfig - Loading configuration from /home/ors/tomcat/webapps/ors/WEB-INF/classes/ors-config.json
[...]

@MichaelsJP
Copy link
Member

MichaelsJP commented Apr 4, 2023

Hi @nicolnt , glad it worked out for you and thanks for the suggestions.
You're absolutely right about the logging. It should be more clear what's happening with the default logging.

For the individual graph building steps, a short notice would indeed be helpful. I'll open issues for that.

#1387

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants