Error with another OSM file using docker install

Hi guys.

Since yesterday, I haven’t been able to correctly process/use another OSM data file, thing that I had managed to achieve before. The only thing I can think of that has changed is that I removed the existing docker images (docker rmi ...) and started from scratch.

My master branch is up-to-date and currently pointing to:

Author: nilsnolde <>
Date:   Wed May 29 16:51:59 2019 +0300

    upgrade GH to v0.10.1.15, fixes #394

The new OSM file is rather small and I had previously managed to use it. Here it is in case it helps:
~57M us-pacific-latest.osm.pbf

This is the error message I’m getting:

07-Jun-2019 22:16:10.243 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
07-Jun-2019 22:16:10.251 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
07-Jun-2019 22:16:10.252 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 7889 ms
Exception in thread "PBF Reader" java.lang.RuntimeException: Unable to read PBF file.
Caused by: java.lang.RuntimeException: java.lang.InterruptedException
	at com.graphhopper.reader.osm.OSMInputFile.process(
	at com.graphhopper.reader.osm.pbf.PbfDecoder.sendResultsToSink(
	at com.graphhopper.reader.osm.pbf.PbfDecoder.processBlobs(
	... 1 more
Caused by: java.lang.InterruptedException
	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.reportInterruptAfterWait(
	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(
	at java.util.concurrent.LinkedBlockingQueue.put(
	at com.graphhopper.reader.osm.OSMInputFile.process(
	... 5 more
07 Jun 22:17:25 ERROR [routing.RoutingProfileManager] - java.util.concurrent.ExecutionException: java.lang.RuntimeException: Couldn't process file /ors-core/data/us-pacific-latest.osm.pbf, error: Can't decode srtm_12_03.tif
java.util.concurrent.ExecutionException: java.lang.RuntimeException: Couldn't process file /ors-core/data/us-pacific-latest.osm.pbf, error: Can't decode srtm_12_03.tif
	at java.util.concurrent.FutureTask.get(
	at heigit.ors.routing.RoutingProfileManager.initialize(
	at heigit.ors.routing.RoutingProfileManager.getInstance(
	at heigit.ors.servlet.listeners.ORSInitContextListener.lambda$contextInitialized$0(
Caused by: java.lang.RuntimeException: Couldn't process file /ors-core/data/us-pacific-latest.osm.pbf, error: Can't decode srtm_12_03.tif
	at com.graphhopper.reader.osm.OSMReader.writeOsm2Graph(
	at com.graphhopper.reader.osm.OSMReader.readGraph(
	at com.graphhopper.GraphHopper.importData(
	at com.graphhopper.GraphHopper.process(
	at com.graphhopper.GraphHopper.importOrLoad(
	at heigit.ors.routing.graphhopper.extensions.ORSGraphHopper.importOrLoad(
	at heigit.ors.routing.RoutingProfile.initGraphHopper(
	at heigit.ors.routing.RoutingProfile.<init>(
	at java.util.concurrent.Executors$
	at java.util.concurrent.ThreadPoolExecutor.runWorker(
	at java.util.concurrent.ThreadPoolExecutor$
	... 1 more
Caused by: java.lang.RuntimeException: Can't decode srtm_12_03.tif
	at com.graphhopper.reader.dem.CGIARProvider.generateRasterFromFile(
	at com.graphhopper.reader.dem.AbstractTiffElevationProvider.getEle(
	at com.graphhopper.reader.dem.MultiSourceElevationProvider.getEle(
	at com.graphhopper.reader.osm.OSMReader.getElevation(
	at com.graphhopper.reader.osm.OSMReader.addNode(
	at com.graphhopper.reader.osm.OSMReader.processNode(
	at com.graphhopper.reader.osm.OSMReader.writeOsm2Graph(
	... 15 more
Caused by: invalid stored block lengths
	at org.apache.xmlgraphics.image.codec.util.FileCacheSeekableStream.readUntil(
	at org.apache.xmlgraphics.image.codec.util.SeekableStream.readUnsignedShortLE(
	at org.apache.xmlgraphics.image.codec.tiff.TIFFDirectory.readUnsignedShort(
	at org.apache.xmlgraphics.image.codec.tiff.TIFFDirectory.getNumDirectories(
	at org.apache.xmlgraphics.image.codec.tiff.TIFFImageDecoder.getNumPages(
	at org.apache.xmlgraphics.image.codec.tiff.TIFFImageDecoder.decodeAsRenderedImage(
	at org.apache.xmlgraphics.image.codec.util.ImageDecoderImpl.decodeAsRaster(
	at org.apache.xmlgraphics.image.codec.util.ImageDecoderImpl.decodeAsRaster(
	at com.graphhopper.reader.dem.CGIARProvider.generateRasterFromFile(
	... 21 more

Any suggestion is very welcomed.
Thanks in advance.

Yeah, I get the same error on the Pacific dataset… It seems like the SRTM elevation tiles might be corrupted. If you’re not particularly interested in elevation, you could turn it off in the app.config or just use gmted as elevation_provider instead of multi (less accurate, but still elevation).

Please let us know if that works.

You can also see if there’s a problem with the SRTM grid:

Yes, we noticed this problem the other day whilst doing some testing - it seems that there are a few tiles in that area that are corrupt for some reason. Currently waiting to hear back from the guys who do the srtm website to see whether they know of it being a problem

Hi Nils, I´m having the same issue with the PBF for Toronto and Miami (I joined the BB osm that covers both cities using osmium and then converted it to a pbf using osm convert cli)
I have used successfully the ors app to route trips in other cities using the same method on files from the same source.
Is elevation data used for calculating route distances and/or travel times (on any or some profiles, I’m currently only using the default car profile)? Or is it only used for the elevation API
Also, (sorry for the noob question), what field should I modify in te app.config file to not use elevation data? is it the elevation bool in each profile (in that case, I´m assuming its enabled based on the toggle and what profiles are active?)

PS: the gmted solution you posted worked for me for another pair of cities, but not on these particular pair :confused:
Thanks in advance :smiley: