Docker run error (latest.osm.pbf)

Hello! I try run Graphhopper from docker by https://github.com/graphhopper/graphhopper/pull/849
And get some error in download *-latest.osm.pbf:

## using java  (64bit) from /usr/lib/jvm/java-8-openjdk-amd64
./graphhopper.sh: line 89: mvn: command not found
File not found 'russia/far-eastern-fed-district-latest.osm.pbf'. Press ENTER to get it from: http://download.geofabrik.de/russia/far-eastern-fed-district-latest.osm-latest.osm.pbf
Press CTRL+C if you do not have enough disc space or you don't want to download several MB.

## now downloading OSM file from http://download.geofabrik.de/russia/far-eastern-fed-district-latest.osm-latest.osm.pbf and extracting to russia/far-eastern-fed-district-latest.osm.pbf
russia/far-eastern-fed-district-latest.osm.pbf: No such file or directory
root@franceDev:~# docker run -it -p 8989:8989 -v /home/username/graphhopper-maps/:/data graphhopper:master ./graphhopper.sh web russia/far-eastern-fed-district
## using java  (64bit) from /usr/lib/jvm/java-8-openjdk-amd64
./graphhopper.sh: line 89: mvn: command not found
## existing jar found tools/target/graphhopper-tools-0.9-SNAPSHOT-jar-with-dependencies.jar
## now web. JAVA_OPTS=-Xmx1000m -Xms1000m -server
2016-12-03 23:21:24,531 [main] INFO  com.graphhopper.reader.osm.GraphHopperOSM - version 0.9|2016-12-03T22:34:56Z (5,14,4,3,3,2)
2016-12-03 23:21:24,555 [main] INFO  com.graphhopper.reader.osm.GraphHopperOSM - graph CH|car|RAM_STORE|2D|NoExt|,,,,, details:edges:0(0MB), nodes:0(0MB), name:(0MB), geo:0(0MB), bounds:1.7976931348623157E308,-1.7976931348623157E308,1.7976931348623157E308,-1.7976931348623157E308, CHGraph|fastest|car, shortcuts:0, nodesCH:(0MB)
Dec 03, 2016 11:21:24 PM com.google.inject.internal.MessageProcessor visit
INFO: An exception was caught and reported. Message: java.lang.IllegalStateException: Couldn't load from existing folder: russia/far-eastern-fed-district-gh but also cannot use file for DataReader as it wasn't specified!
java.lang.IllegalStateException: Couldn't load graph
        at com.graphhopper.http.DefaultModule.configure(DefaultModule.java:76)
        at com.google.inject.AbstractModule.configure(AbstractModule.java:62)
        at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:340)
        at com.google.inject.AbstractModule.install(AbstractModule.java:122)
        at com.graphhopper.http.GHServer$1.configure(GHServer.java:119)
        at com.google.inject.AbstractModule.configure(AbstractModule.java:62)
        at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:340)
        at com.google.inject.spi.Elements.getElements(Elements.java:110)
        at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:138)
        at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:104)
        at com.google.inject.Guice.createInjector(Guice.java:96)
        at com.google.inject.Guice.createInjector(Guice.java:73)
        at com.google.inject.Guice.createInjector(Guice.java:62)
        at com.graphhopper.http.GHServer.start(GHServer.java:59)
        at com.graphhopper.http.GHServer.main(GHServer.java:55)
Caused by: java.lang.IllegalStateException: Couldn't load from existing folder: russia/far-eastern-fed-district-gh but also cannot use file for DataReader as it wasn't specified!
        at com.graphhopper.GraphHopper.importData(GraphHopper.java:709)
        at com.graphhopper.GraphHopper.process(GraphHopper.java:685)
        at com.graphhopper.GraphHopper.importOrLoad(GraphHopper.java:663)
        at com.graphhopper.http.DefaultModule.createGraphHopper(DefaultModule.java:53)
        at com.graphhopper.http.DefaultModule.configure(DefaultModule.java:64)
        ... 14 more

Exception in thread "main" com.google.inject.CreationException: Unable to create injector, see the following errors:

1) Explicit bindings are required and java.lang.Boolean annotated with @com.google.inject.name.Named(value=jsonp_allowed) is not explicitly bound.
  while locating java.lang.Boolean annotated with @com.google.inject.name.Named(value=jsonp_allowed)
    for field at com.graphhopper.http.GHBaseServlet.jsonpAllowed(GHBaseServlet.java:41)
  at com.graphhopper.http.GHServletModule.configureServlets(GHServletModule.java:60) (via modules: com.graphhopper.http.GHServer$1 -> com.graphhopper.http.GHServletModule)

2) Explicit bindings are required and java.lang.Boolean annotated with @com.google.inject.name.Named(value=jsonp_allowed) is not explicitly bound.
  while locating java.lang.Boolean annotated with @com.google.inject.name.Named(value=jsonp_allowed)
    for field at com.graphhopper.http.GHBaseServlet.jsonpAllowed(GHBaseServlet.java:41)
  at com.graphhopper.http.GHServletModule.configureServlets(GHServletModule.java:63) (via modules: com.graphhopper.http.GHServer$1 -> com.graphhopper.http.GHServletModule)

3) Explicit bindings are required and java.lang.Boolean annotated with @com.google.inject.name.Named(value=jsonp_allowed) is not explicitly bound.
  while locating java.lang.Boolean annotated with @com.google.inject.name.Named(value=jsonp_allowed)
    for field at com.graphhopper.http.GHBaseServlet.jsonpAllowed(GHBaseServlet.java:41)
  at com.graphhopper.http.GHServletModule.configureServlets(GHServletModule.java:66) (via modules: com.graphhopper.http.GHServer$1 -> com.graphhopper.http.GHServletModule)

4) Explicit bindings are required and java.lang.Boolean annotated with @com.google.inject.name.Named(value=jsonp_allowed) is not explicitly bound.
  while locating java.lang.Boolean annotated with @com.google.inject.name.Named(value=jsonp_allowed)
    for field at com.graphhopper.http.GHBaseServlet.jsonpAllowed(GHBaseServlet.java:41)
  at com.graphhopper.http.GHServletModule.configureServlets(GHServletModule.java:69) (via modules: com.graphhopper.http.GHServer$1 -> com.graphhopper.http.GHServletModule)

5) An exception was caught and reported. Message: Couldn't load graph
  at com.graphhopper.http.GHServer$1.configure(GHServer.java:119) (via modules: com.graphhopper.http.GHServer$1 -> com.graphhopper.http.DefaultModule)

6) Explicit bindings are required and com.graphhopper.GraphHopper is not explicitly bound.
  while locating com.graphhopper.GraphHopper
    for field at com.graphhopper.http.GraphHopperServlet.hopper(GraphHopperServlet.java:57)
  at com.graphhopper.http.GHServletModule.configureServlets(GHServletModule.java:66) (via modules: com.graphhopper.http.GHServer$1 -> com.graphhopper.http.GHServletModule)

7) Explicit bindings are required and com.graphhopper.http.RouteSerializer is not explicitly bound.
  while locating com.graphhopper.http.RouteSerializer
    for field at com.graphhopper.http.GraphHopperServlet.routeSerializer(GraphHopperServlet.java:57)
  at com.graphhopper.http.GHServletModule.configureServlets(GHServletModule.java:66) (via modules: com.graphhopper.http.GHServer$1 -> com.graphhopper.http.GHServletModule)

8) Explicit bindings are required and com.graphhopper.util.TranslationMap is not explicitly bound.
  while locating com.graphhopper.util.TranslationMap
    for field at com.graphhopper.http.I18NServlet.map(I18NServlet.java:35)
  at com.graphhopper.http.GHServletModule.configureServlets(GHServletModule.java:60) (via modules: com.graphhopper.http.GHServer$1 -> com.graphhopper.http.GHServletModule)

9) Explicit bindings are required and com.graphhopper.GraphHopper is not explicitly bound.
  while locating com.graphhopper.GraphHopper
    for field at com.graphhopper.http.InfoServlet.hopper(InfoServlet.java:38)
  at com.graphhopper.http.GHServletModule.configureServlets(GHServletModule.java:63) (via modules: com.graphhopper.http.GHServer$1 -> com.graphhopper.http.GHServletModule)

10) Explicit bindings are required and com.graphhopper.GraphHopper is not explicitly bound.
  while locating com.graphhopper.GraphHopper
    for field at com.graphhopper.http.NearestServlet.hopper(NearestServlet.java:40)
  at com.graphhopper.http.GHServletModule.configureServlets(GHServletModule.java:69) (via modules: com.graphhopper.http.GHServer$1 -> com.graphhopper.http.GHServletModule)

10 errors
        at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:466)
        at com.google.inject.internal.InternalInjectorCreator.initializeStatically(InternalInjectorCreator.java:155)
        at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:107)
        at com.google.inject.Guice.createInjector(Guice.java:96)
        at com.google.inject.Guice.createInjector(Guice.java:73)
        at com.google.inject.Guice.createInjector(Guice.java:62)
        at com.graphhopper.http.GHServer.start(GHServer.java:59)
        at com.graphhopper.http.GHServer.main(GHServer.java:55)
Caused by: java.lang.IllegalStateException: Couldn't load graph
        at com.graphhopper.http.DefaultModule.configure(DefaultModule.java:76)
        at com.google.inject.AbstractModule.configure(AbstractModule.java:62)
        at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:340)
        at com.google.inject.AbstractModule.install(AbstractModule.java:122)
        at com.graphhopper.http.GHServer$1.configure(GHServer.java:119)
        at com.google.inject.AbstractModule.configure(AbstractModule.java:62)
        at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:340)
        at com.google.inject.spi.Elements.getElements(Elements.java:110)
        at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:138)
        at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:104)
        ... 5 more
Caused by: java.lang.IllegalStateException: Couldn't load from existing folder: russia/far-eastern-fed-district-gh but also cannot use file for DataReader as it wasn't specified!
        at com.graphhopper.GraphHopper.importData(GraphHopper.java:709)
        at com.graphhopper.GraphHopper.process(GraphHopper.java:685)
        at com.graphhopper.GraphHopper.importOrLoad(GraphHopper.java:663)
        at com.graphhopper.http.DefaultModule.createGraphHopper(DefaultModule.java:53)
        at com.graphhopper.http.DefaultModule.configure(DefaultModule.java:64)
        ... 14 more

but all tests are passed:

[INFO]
[INFO] GraphHopper Parent Project ......................... SUCCESS [  3.382 s]
[INFO] GraphHopper Core ................................... SUCCESS [01:02 min]
[INFO] GraphHopper Reader for OpenStreetMap Data .......... SUCCESS [01:20 min]
[INFO] GraphHopper Reader for Overlay Data ................ SUCCESS [  7.263 s]
[INFO] GraphHopper Tools .................................. SUCCESS [  6.545 s]
[INFO] GraphHopper Web .................................... SUCCESS [ 29.475 s]
[INFO] GraphHopper Reader for Shapefile Data .............. SUCCESS [ 37.570 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 03:47 min
[INFO] Finished at: 2016-12-03T22:47:16+00:00
[INFO] Final Memory: 24M/291M
[INFO] ------------------------------------------------------------------------

The file wasn’t downloaded:

russia/far-eastern-fed-district-latest.osm.pbf: No such file or directory

The notation to automatically download from geofabrik is area/subarea.pbf ie. in your case:

./graphhopper.sh web russia/far-eastern-fed-district.pbf

make sure you do rm -rf russia* before

Thank for fast response, but you variant also dont work. I try original script from Add Dockerfile by edy · Pull Request #849 · graphhopper/graphhopper · GitHub

docker run -it -p 8989:8989 -v /home/username/graphhopper-maps/:/data graphhopper:master ./graphhopper.sh web /data/europe-latest.osm.pbf

./graphhopper.sh: line 89: mvn: command not found
File not found '/data/europe-latest.osm.pbf'. Press ENTER to get it from: http://download.geofabrik.de//data/europe-latest.osm-latest.osm.pbf
Press CTRL+C if you do not have enough disc space or you don't want to download several MB.

## now downloading OSM file from http://download.geofabrik.de//data/europe-latest.osm-latest.osm.pbf and extracting to /data/europe-latest.osm.pbf
  HTTP/1.1 404 Not Found
  Date: Sun, 04 Dec 2016 08:19:52 GMT
  Server: Apache/2.4.18 (Ubuntu)
  Content-Length: 322
  Content-Type: text/html; charset=iso-8859-1
  Keep-Alive: timeout=5, max=100
  Connection: Keep-Alive
http://download.geofabrik.de//data/europe-latest.osm-latest.osm.pbf:
2016-12-04 08:19:52 ERROR 404: Not Found.

I also try this command

docker run -it -p 8989:8989 -v /home/username/graphhopper-maps/:/data graphhopper:master ./graphhopper.sh web russia/far-eastern-fed-district.osm
It seems downoaded, but next operations failed.

## using java  (64bit) from /usr/lib/jvm/java-8-openjdk-amd64
./graphhopper.sh: line 89: mvn: command not found
File not found 'russia/far-eastern-fed-district.osm'. Press ENTER to get it from: http://download.geofabrik.de/russia/far-eastern-fed-district-latest.osm.bz2
Press CTRL+C if you do not have enough disc space or you don't want to download several MB.

## now downloading OSM file from http://download.geofabrik.de/russia/far-eastern-fed-district-latest.osm.bz2 and extracting to russia/far-eastern-fed-district.osm
  HTTP/1.1 200 OK
  Date: Sun, 04 Dec 2016 08:41:38 GMT
  Server: Apache/2.4.18 (Ubuntu)
  Last-Modified: Mon, 28 Nov 2016 10:49:43 GMT
  ETag: "ee1e913-5425a3ab96f2d"
  Accept-Ranges: bytes
  Content-Length: 249686291
  Keep-Alive: timeout=5, max=100
  Connection: Keep-Alive
  Content-Type: application/x-bzip2
2016-12-04 08:43:26 URL:http://download.geofabrik.de/russia/far-eastern-fed-district-latest.osm.bz2 [249686291/249686291] -> "-" [1]
mv: cannot move ‘temp.osm’ to ‘russia/far-eastern-fed-district.osm’: No such file or directory

Where I must print “rm -rf russia*”? In docker container?

I think, you are still not using the proposed command. It should not end on .osm, the command that should be executed inside the container should be:

./graphhopper.sh web russia/far-eastern-fed-district.pbf

Or if you already have the pbf on your disc it should be

./graphhopper.sh web path/to/some.pbf

But I have no experiences with Docker and how to tell docker to do that.

Yes, I think so.