Docker Problems

Hi guys,
i got a Problem i set up docker. Following the instructions and replacing the .osm file with the germany-latest.osm.pbf from Geofabrik. Now here is my Problem tomcat is running i get an answer at http://localhost:8080/ but at http://localhost:8080/health i get “not ready”.

It seems like the service can’t start cause it can’t read the pbf

Exception in thread “PBF Reader” java.lang.RuntimeException: Unable to read PBF file.
ors-app | at com.graphhopper.reader.osm.pbf.PbfReader.run(PbfReader.java:50)
ors-app | at java.lang.Thread.run(Thread.java:748)

Any ideas what did I do wrong?
Greetings
Kevin

Nevermind think i found the Problem was .osm.pbf missread that the osm data have to be only pbf then , my bad :sweat_smile:

Huh? Was that the only thing you changed? That shouldn’t be… .osm.pbf is not a file type, just an additional slug without any meaning, the format is still pbf. All my local stuff works on .osm.pbf. As long as you specify the correct file name in app.config, it should work.

No i didn’t tested it right now. Was just thinking and looking up what the problem could be. But I’m trying with a pure .osm file as soon as the .bz2 file is unzipped. Hopefully it’ll work with it.

version: '3'

services:
ors-app:
container_name: ors-app
ports:
- 8080:8080
build:
context: …/
args:
APP_CONFIG: ./docker/conf/app.config.sample
OSM_FILE: ./docker/data/germany-latest.osm.pbf
volumes:
- ./graphs:/ors-core/data/graphs
- ./elevation_cache:/ors-core/data/elevation_cache
- ./logs/ors/:/var/log/ors/
- ./logs/tomcat/:/usr/local/tomcat/logs
environment:
- JAVA_OPTS=-Djava.awt.headless=true -server -XX:TargetSurvivorRatio=75 -XX:SurvivorRatio=64 -XX:MaxTenuringThreshold=3 -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:ParallelGCThreads=4 -Xms4g -Xmx8g
- 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

is the whole config with resized Xmx and Xms values.

How could i force docker to reinstall the .jar files? I just did a clean git pull and changed nothing. I got the same error again health says not ready.

Germany takes a while to build, at least a few hours I’d guess. Please paste your app.config.

I was just testing with the heidelberg.osm fresh clone right now. Now it works jus fine. Seems like some JAR File or other dependency were corrputed on first download. But thanks for the help anyways :smiley:.

Edit I just did a rebuild to get the right dependencies.

Yeah seems like i was just to impatient. I’ll wait now, heidelberg.osm was there within minutes but. Now I know, that the config data is correct.
But one question left did it just take so long to build the graphs? Or did it take everytime I’ll start the docker several hours?

No, it’s just when you build the graphs. They’re cached and re-used once they are built, so just restarting Docker will take the amount of time it needs to load them into RAM. But you have to delete the graphs folder every time you change the OSM file.