Skip to content
This repository has been archived by the owner on May 7, 2020. It is now read-only.

Unable to build nominatim planet #7

Open
yonaichin opened this issue Jul 26, 2018 · 14 comments
Open

Unable to build nominatim planet #7

yonaichin opened this issue Jul 26, 2018 · 14 comments

Comments

@yonaichin
Copy link

Hi,
Unable to build nominatim planet when docker build process of
Step 35/68 : RUN curl -L ${PBF_URL} --create-dirs -o /srv/nominatim/src/data.osm.pbf
then ran into this issue.
ERROR: Error processing tar file(exit status 1): unexpected EOF

The machine info:
CPU: 8 core
MEM: 32GB
STORAGE: 10TB

Docker version:
Client:
Version: 18.06.0-ce
API version: 1.38
Go version: go1.10.3
Git commit: 0ffa825
Built: Wed Jul 18 19:11:02 2018
OS/Arch: linux/amd64
Experimental: false

Server:
Engine:
Version: 18.06.0-ce
API version: 1.38 (minimum version 1.12)
Go version: go1.10.3
Git commit: 0ffa825
Built: Wed Jul 18 19:09:05 2018
OS/Arch: linux/amd64
Experimental: false

Let me know if you need more info.

Thanks in advance.

@merlinnot
Copy link
Owner

What's the PBF_URL you've specified? Is it the default one?

@yonaichin
Copy link
Author

Yes,
Tried to build nominatim planet with the scrtips.

docker build github.com/merlinnot/nominatim-docker \
  -t nominatim \
  --build-arg BUILD_THREADS=16 \
  --build-arg BUILD_MEMORY=32GB \
  --build-arg OSM2PGSQL_CACHE=28000 \
  --build-arg RUNTIME_THREADS=2 \
  --build-arg RUNTIME_MEMORY=8GB

@merlinnot
Copy link
Owner

You should probably lower your memory limit a bit, as stated in the docs, BUILD_MEMORY is a memory dedicated to a build process, if you have 32GB total, you still need some for system etc. The same goes for BUILD_THREADS.

OSM2PGSQL_CACHE should be lower too, as you can see in the docs it should be set to about 75% of memory available during build process.

Anyways, is your system behind some kind of a proxy, which might affect the download process? Map extracts are being downloaded form the Internet, by default from
https://planet.osm.org/pbf/planet-latest.osm.pbf. Can you try to download it using wget or curl, just to confirm that it's not a network issue?

@merlinnot
Copy link
Owner

Btw., my company provides Nominatim API as a service if you'd be interested.

@yonaichin
Copy link
Author

The network wasn't the issue.
PBF file was downloaded successfully via curl.

Tried the different approach that copy the PBF file during the build process and still failed.

Error processing tar file(exit status 1): unexpected EOF

The Dockerfile was modified as below

# ARG PBF_URL=https://planet.osm.org/pbf/planet-latest.osm.pbf
# RUN curl -L ${PBF_URL} --create-dirs -o /srv/nominatim/src/data.osm.pbf
RUN mkdir /srv/nominatim/src
COPY data.osm.pbf /srv/nominatim/src/data.osm.pbf

I've adjusted the machine settings to 10 Cores CPU and 48GB MEM.
Building nominatim for cities works just fine.

Is it possible that the problem was the file exceeds the docker build limits?

Thanks

@merlinnot
Copy link
Owner

It should handle the file having much less memory, I've successfully built planet on 8GB machine in the past.

Did you adjust (lower) your OSM2PGSQL_CACHE settings?
Can you post a link to a full log (please don't paste it here, you can use make a gist)?
Can you verify that a downloaded file matches this checksum?

@yonaichin
Copy link
Author

I did adjust the OSM2PGSQL_CACHE settings.

docker build github.com/merlinnot/nominatim-docker   -t nominatim-planet   \
--build-arg BUILD_THREADS=2   \
--build-arg BUILD_MEMORY=8GB   \
--build-arg OSM2PGSQL_CACHE=2000   \
--build-arg RUNTIME_THREADS=2   \
--build-arg RUNTIME_MEMORY=8GB

Here's the log

The checksum matched the version of 2018-07-19 PBF file.

85291e7cc8cfdc20f2e62a8650b2d069  planet-latest.osm.pbf

@konrad-g
Copy link

I got the same issue. Did you solve it by any chance @yonaichin? I'm running this on quite a strong machine, 50GB of RAM and 10 cores.

@yonaichin
Copy link
Author

yonaichin commented Aug 14, 2018

@konrad-g

No, I did not.
Though I've passed this step successfully on my mac, there wasn't enough disk space to go through the whole docker process. I ran into this problem on the machine with Linux 16.04.
Still, I'm not able to pinpoint what the root cause really is.

Instead of using docker to build planet, I'm building it on vm following nominatim guideline which has more configurations to be tuned with.

@twentytwokhz
Copy link

#offtopic How can I check if the build for nominatim completed or not? I started an ssh session into the VM machine for building nominatim. Then I executed the build, which is still running after 2 days. Can I stop the ssh session and then check back later and see some logs or files to validate that the build has completed? Another question is: does the build allow to resume after it has been stopped?

@merlinnot
Copy link
Owner

Hey, could you try building Monaco to test if it's a general problem or just with the planet?

@konrad-g
Copy link

Works great with Monaco, it seems to be an issue related with the planet.
I got information that it might be related with following issue:
moby/moby#37581

@merlinnot
Copy link
Owner

Oh, great finding. It might be the one, the file is bigger than 8GB.

@chmelej
Copy link

chmelej commented Oct 5, 2018

FYI see moby/moby#37581
some docker versions have a bug. you need upgrade or downgrade docker to avoid

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

No branches or pull requests

5 participants