Unable to Run sample in Docker - AWS Ubuntu 18.04

I’m trying to build a routing server for the entire United States. Initially, I was building from source, but when I could not get the graphs to build, I went the docker route. I left it building over the weekend, but apparently it failed. Thinking maybe I should go back to the sample data to build the much smaller dataset, I gave that a go, only to be plagued with a number of errors. The only thing changed in here is the Java memory in the docker config file. Nothing was changed in app.config.sample and the docker file is still pointing to the sample. Below is the log output from docker. I should add, I am able to access the api and get the status of “not ready”

    ors-app    |   .   ____          _            __ _ _
ors-app    |  /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
ors-app    | ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
ors-app    |  \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
ors-app    |   '  |____| .__|_| |_|_| |_\__, | / / / /
ors-app    |  =========|_|==============|___/=/_/_/_/
ors-app    |  :: Spring Boot ::        (v2.0.4.RELEASE)
ors-app    |
ors-app    | 08 Jun 20:05:23 INFO [ors.Application] - Starting Application v6.1.1 on e91e0c30f476 with PID 9 (/usr/local/tomcat/webapps/ors/WEB-INF/classes started by root in /ors-core)
ors-app    | 08 Jun 20:05:23 DEBUG [ors.Application] - Running with Spring Boot v2.0.4.RELEASE, Spring v5.0.8.RELEASE
ors-app    | 08 Jun 20:05:23 INFO [ors.Application] - No active profile set, falling back to default profiles: default
ors-app    | SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
ors-app    | SLF4J: Defaulting to no-operation (NOP) logger implementation
ors-app    | SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
ors-app    | 08 Jun 20:05:27 INFO [ors.Application] - Started Application in 4.488 seconds (JVM running for 9.192)
ors-app    | <?xml version="1.0" ?>
ors-app    | <Configuration>
ors-app    |   <Properties>
ors-app    |     <Property name="filename">/var/log/ors/ors-logs.log</Property>
ors-app    |   </Properties>
ors-app    | </Configuration>
ors-app    | 08 Jun 20:05:27 INFO [routing.RoutingProfileManager] -  Total - 30.00 GB, Free - 29.73 GB, Max: 30.00 GB, Used - 269.66 MB
ors-app    | 08 Jun 20:05:27 INFO [routing.RoutingProfileManager] -
ors-app    | 08 Jun 20:05:27 INFO [routing.RoutingProfileManager] - ====> Initializing profiles from 'data/osm_file.pbf' (2 threads) ...
ors-app    | 08 Jun 20:05:27 INFO [routing.RoutingProfileManager] -
ors-app    | 08 Jun 20:05:27 INFO [routing.RoutingProfileManager] -
ors-app    | 08 Jun 20:05:27 INFO [routing.RoutingProfile] - [1] Profiles: 'cycling-regular', location: 'data/graphs/bike-regular'.
ors-app    | 08 Jun 20:05:27 INFO [routing.RoutingProfile] - [2] Profiles: 'driving-car', location: 'data/graphs/car'.
ors-app    | 08-Jun-2020 20:05:27.563 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive /usr/local/tomcat/webapps/ors.war has finished in 8,095 ms
ors-app    | 08-Jun-2020 20:05:27.563 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /usr/local/tomcat/webapps/docs
ors-app    | 08-Jun-2020 20:05:27.580 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /usr/local/tomcat/webapps/docs has finished in 16 ms
ors-app    | 08-Jun-2020 20:05:27.580 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /usr/local/tomcat/webapps/examples
ors-app    | 08-Jun-2020 20:05:27.798 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /usr/local/tomcat/webapps/examples has finished in 217 ms
ors-app    | 08-Jun-2020 20:05:27.798 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /usr/local/tomcat/webapps/ROOT
ors-app    | 08-Jun-2020 20:05:27.810 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /usr/local/tomcat/webapps/ROOT has finished in 12 ms
ors-app    | 08-Jun-2020 20:05:27.810 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /usr/local/tomcat/webapps/manager
ors-app    | 08-Jun-2020 20:05:27.829 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /usr/local/tomcat/webapps/manager has finished in 19 ms
ors-app    | 08-Jun-2020 20:05:27.829 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /usr/local/tomcat/webapps/host-manager
ors-app    | 08-Jun-2020 20:05:27.843 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /usr/local/tomcat/webapps/host-manager has finished in 13 ms
ors-app    | 08-Jun-2020 20:05:27.850 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
ors-app    | 08-Jun-2020 20:05:27.856 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
ors-app    | 08-Jun-2020 20:05:27.856 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 8432 ms
ors-app    | 08 Jun 20:05:31 ERROR [routing.RoutingProfileManager] - java.util.concurrent.ExecutionException: java.lang.RuntimeException: Couldn't process file data/osm_file.pbf, error: Index: 8094500, Size: 0
ors-app    | 08 Jun 20:05:31 ERROR [routing.RoutingProfileManager] - Failed to initialize RoutingProfileManager instance.
ors-app    | java.util.concurrent.ExecutionException: java.lang.RuntimeException: Couldn't process file data/osm_file.pbf, error: Index: 8094500, Size: 0
ors-app    |    at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:1.8.0_252]
ors-app    |    at java.util.concurrent.FutureTask.get(FutureTask.java:192) ~[?:1.8.0_252]
ors-app    |    at org.heigit.ors.routing.RoutingProfileManager.initialize(RoutingProfileManager.java:162) ~[classes/:6.1.1]
ors-app    |    at org.heigit.ors.routing.RoutingProfileManager.getInstance(RoutingProfileManager.java:57) ~[classes/:6.1.1]
ors-app    |    at org.heigit.ors.servlet.listeners.ORSInitContextListener.lambda$contextInitialized$0(ORSInitContextListener.java:40) ~[classes/:6.1.1]
ors-app    |    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_252]
ors-app    | Caused by: java.lang.RuntimeException: Couldn't process file data/osm_file.pbf, error: Index: 8094500, Size: 0
ors-app    |    at com.graphhopper.reader.osm.OSMReader.writeOsm2Graph(OSMReader.java:324) ~[graphhopper-reader-osm-v0.13.4.jar:?]
ors-app    |    at com.graphhopper.reader.osm.OSMReader.readGraph(OSMReader.java:176) ~[graphhopper-reader-osm-v0.13.4.jar:?]
ors-app    |    at com.graphhopper.GraphHopper.importData(GraphHopper.java:735) ~[graphhopper-core-v0.13.4.jar:?]
ors-app    |    at com.graphhopper.GraphHopper.readData(GraphHopper.java:714) ~[graphhopper-core-v0.13.4.jar:?]
ors-app    |    at com.graphhopper.GraphHopper.process(GraphHopper.java:701) ~[graphhopper-core-v0.13.4.jar:?]
ors-app    |    at com.graphhopper.GraphHopper.importOrLoad(GraphHopper.java:680) ~[graphhopper-core-v0.13.4.jar:?]
ors-app    |    at org.heigit.ors.routing.graphhopper.extensions.ORSGraphHopper.importOrLoad(ORSGraphHopper.java:131) ~[classes/:6.1.1]
ors-app    |    at org.heigit.ors.routing.RoutingProfile.initGraphHopper(RoutingProfile.java:181) ~[classes/:6.1.1]
ors-app    |    at org.heigit.ors.routing.RoutingProfile.<init>(RoutingProfile.java:127) ~[classes/:6.1.1]
ors-app    |    at org.heigit.ors.routing.RoutingProfileLoader.call(RoutingProfileLoader.java:35) ~[classes/:6.1.1]
ors-app    |    at org.heigit.ors.routing.RoutingProfileLoader.call(RoutingProfileLoader.java:21) ~[classes/:6.1.1]
ors-app    |    at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_252]
ors-app    |    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_252]
ors-app    |    at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_252]
ors-app    |    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:1.8.0_252]
ors-app    |    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:1.8.0_252]
ors-app    |    ... 1 more
ors-app    | Caused by: java.lang.IndexOutOfBoundsException: Index: 8094500, Size: 0
ors-app    |    at java.util.ArrayList.rangeCheck(ArrayList.java:657) ~[?:1.8.0_252]
ors-app    |    at java.util.ArrayList.get(ArrayList.java:433) ~[?:1.8.0_252]
ors-app    |    at com.graphhopper.storage.MMapDataAccess.getShort(MMapDataAccess.java:367) ~[graphhopper-core-v0.13.4.jar:?]
ors-app    |    at com.graphhopper.reader.dem.HeightTile.getHeight(HeightTile.java:100) ~[graphhopper-core-v0.13.4.jar:?]
ors-app    |    at com.graphhopper.reader.dem.AbstractTiffElevationProvider.getEle(AbstractTiffElevationProvider.java:142) ~[graphhopper-core-v0.13.4.jar:?]
ors-app    |    at com.graphhopper.reader.dem.MultiSourceElevationProvider.getEle(MultiSourceElevationProvider.java:52) ~[graphhopper-core-v0.13.4.jar:?]
ors-app    |    at com.graphhopper.reader.osm.OSMReader.getElevation(OSMReader.java:683) ~[graphhopper-reader-osm-v0.13.4.jar:?]
ors-app    |    at org.heigit.ors.routing.graphhopper.extensions.ORSOSMReader.getElevation(ORSOSMReader.java:432) ~[classes/:6.1.1]
ors-app    |    at com.graphhopper.reader.osm.OSMReader.addNode(OSMReader.java:644) ~[graphhopper-reader-osm-v0.13.4.jar:?]
ors-app    |    at com.graphhopper.reader.osm.OSMReader.processNode(OSMReader.java:609) ~[graphhopper-reader-osm-v0.13.4.jar:?]
ors-app    |    at com.graphhopper.reader.osm.OSMReader.writeOsm2Graph(OSMReader.java:291) ~[graphhopper-reader-osm-v0.13.4.jar:?]
ors-app    |    at com.graphhopper.reader.osm.OSMReader.readGraph(OSMReader.java:176) ~[graphhopper-reader-osm-v0.13.4.jar:?]
ors-app    |    at com.graphhopper.GraphHopper.importData(GraphHopper.java:735) ~[graphhopper-core-v0.13.4.jar:?]
ors-app    |    at com.graphhopper.GraphHopper.readData(GraphHopper.java:714) ~[graphhopper-core-v0.13.4.jar:?]
ors-app    |    at com.graphhopper.GraphHopper.process(GraphHopper.java:701) ~[graphhopper-core-v0.13.4.jar:?]
ors-app    |    at com.graphhopper.GraphHopper.importOrLoad(GraphHopper.java:680) ~[graphhopper-core-v0.13.4.jar:?]
ors-app    |    at org.heigit.ors.routing.graphhopper.extensions.ORSGraphHopper.importOrLoad(ORSGraphHopper.java:131) ~[classes/:6.1.1]
ors-app    |    at org.heigit.ors.routing.RoutingProfile.initGraphHopper(RoutingProfile.java:181) ~[classes/:6.1.1]
ors-app    |    at org.heigit.ors.routing.RoutingProfile.<init>(RoutingProfile.java:127) ~[classes/:6.1.1]
ors-app    |    at org.heigit.ors.routing.RoutingProfileLoader.call(RoutingProfileLoader.java:35) ~[classes/:6.1.1]
ors-app    |    at org.heigit.ors.routing.RoutingProfileLoader.call(RoutingProfileLoader.java:21) ~[classes/:6.1.1]
ors-app    |    at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_252]
ors-app    |    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_252]
ors-app    |    at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_252]
ors-app    |    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:1.8.0_252]
ors-app    |    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:1.8.0_252]
ors-app    |    ... 1 more
ors-app    | 08 Jun 20:05:31 INFO [routing.RoutingProfileManager] - ====> Recycling garbage...
ors-app    | 08 Jun 20:05:31 INFO [routing.RoutingProfileManager] - Before:  Total - 30.00 GB, Free - 29.68 GB, Max: 30.00 GB, Used - 320.18 MB
ors-app    | 08 Jun 20:05:31 INFO [routing.RoutingProfileManager] - After:  Total - 30.00 GB, Free - 29.91 GB, Max: 30.00 GB, Used - 87.80 MB
ors-app    | 08 Jun 20:05:31 INFO [routing.RoutingProfileManager] - ========================================================================
ors-app    | 08 Jun 20:05:31 INFO [routing.RoutingProfileManager] - ====> Memory usage by profiles:
ors-app    | 08 Jun 20:05:31 INFO [routing.RoutingProfileManager] - Total: 0 B (0.0%)
ors-app    | 08 Jun 20:05:31 INFO [routing.RoutingProfileManager] - ========================================================================
ors-app    | 08 Jun 20:06:24 INFO [routing.RoutingProfile] - [1] FlagEncoders: 1, bits used [UNKNOWN]/64.
ors-app    | 08 Jun 20:06:24 INFO [routing.RoutingProfile] - [1] Capacity: [UNKNOWN]. (edges - 39723, nodes - 28820)
ors-app    | 08 Jun 20:06:24 INFO [routing.RoutingProfile] - [1] Total time: 56.621s.
ors-app    | 08 Jun 20:06:24 INFO [routing.RoutingProfile] - [1] Finished at: 2020-06-08 20:06:24.
ors-app    | 08 Jun 20:06:24 INFO [routing.RoutingProfile] -

As an update @nils, I found the following thread and checked out your fix and it seems to be working again… Did this not make it into the latest release?

1 Like

Hm, that’s weird… That’s merged in the newest release, 6.1.1, and should be on dockerhub as openrouteservice/openrouterservice:v6.1.1.

However, there’s clearly a problem with the default Heidelberg file. My guess is corrupt elevation. Will have to be looked into.