xrombik
xrombik

Reputation: 1

Downloading of opentilemaps hangs up

I am trying to install a local server based on OpenMapTiles Map Server. I do the commands given in the instructions on the website https://openmaptiles.com/server/#install:

$: curl -sSL https://get.docker.com/ | sh
$: docker run --rm -it -v $(pwd):/data -p 8080:80 klokantech/openmaptiles-server

I open in my browser: localhost:8080, and then after selecting the available default items, the map file download - 51 GB starts. The file download stops after downloading any amount of data, without downloading the whole file to the end. I have already made a few attempts to configure according to the attached instructions and each time the download stops after an arbitrary amount of data.

Question: Is it possible to fix this OpenMapTiles Map Server installation wizard so that it downloads the file more stable? Here is the wizard's log:

{"log":"/usr/lib/python2.7/dist-packages/supervisor/options.py:298: UserWarning: Supervisord is running as root and it is searching for its configuration file in default locations (including its current working directory); you probably want to specify a \"-c\" argument specifying an absolute path to a configuration file for improved security.\r\n","stream":"stdout","time":"2020-06-07T17:21:05.138055299Z"}
{"log":"  'Supervisord is running as root and it is searching '\r\n","stream":"stdout","time":"2020-06-07T17:21:05.138174326Z"}
{"log":"2020-06-07 17:21:05,156 CRIT Supervisor running as root (no user in config file)\r\n","stream":"stdout","time":"2020-06-07T17:21:05.157198265Z"}
{"log":"2020-06-07 17:21:05,157 INFO Included extra file \"/etc/supervisor/conf.d/openmaptiles.conf\" during parsing\r\n","stream":"stdout","time":"2020-06-07T17:21:05.15725187Z"}
{"log":"2020-06-07 17:21:05,161 INFO Creating socket tcp://localhost:8081\r\n","stream":"stdout","time":"2020-06-07T17:21:05.161776495Z"}
{"log":"2020-06-07 17:21:05,163 INFO Closing socket tcp://localhost:8081\r\n","stream":"stdout","time":"2020-06-07T17:21:05.163767121Z"}
{"log":"2020-06-07 17:21:05,178 INFO RPC interface 'supervisor' initialized\r\n","stream":"stdout","time":"2020-06-07T17:21:05.178459055Z"}
{"log":"2020-06-07 17:21:05,178 CRIT Server 'unix_http_server' running without any HTTP authentication checking\r\n","stream":"stdout","time":"2020-06-07T17:21:05.178586936Z"}
{"log":"2020-06-07 17:21:05,178 INFO supervisord started with pid 1\r\n","stream":"stdout","time":"2020-06-07T17:21:05.178762696Z"}
{"log":"2020-06-07 17:21:06,182 INFO spawned: 'wizard' with pid 8\r\n","stream":"stdout","time":"2020-06-07T17:21:06.18303205Z"}
{"log":"2020-06-07 17:21:06,187 INFO spawned: 'xvfb' with pid 9\r\n","stream":"stdout","time":"2020-06-07T17:21:06.187948752Z"}
{"log":"2020-06-07 17:21:07,189 INFO success: wizard entered RUNNING state, process has stayed up for \u003e than 0 seconds (startsecs)\r\n","stream":"stdout","time":"2020-06-07T17:21:07.190241733Z"}
{"log":"2020-06-07 17:21:07,190 INFO success: xvfb entered RUNNING state, process has stayed up for \u003e than 0 seconds (startsecs)\r\n","stream":"stdout","time":"2020-06-07T17:21:07.19037577Z"}
{"log":"Starting OpenMapTiles Map Server (action: run)\r\n","stream":"stdout","time":"2020-06-07T17:21:07.336682414Z"}
{"log":"Config file not found!\r\n","stream":"stdout","time":"2020-06-07T17:21:07.340291022Z"}
{"log":"Starting installation...\r\n","stream":"stdout","time":"2020-06-07T17:21:07.34056988Z"}
{"log":"Installation wizard started at http://:::80/\r\n","stream":"stdout","time":"2020-06-07T17:21:07.384525986Z"}
{"log":"List of available downloads ready.\r\n","stream":"stdout","time":"2020-06-07T17:21:08.469846587Z"}
{"log":"Downloading osm-2020-06-01-v3.11-planet.mbtiles (planet)\r\n","stream":"stdout","time":"2020-06-07T17:24:11.466397428Z"}
{"log":"Downloading: 17856 of 54776152064 0.00%\r\n","stream":"stdout","time":"2020-06-07T17:24:12.047466146Z"}
{"log":"Downloading: 1178080 of 54776152064 0.00%\r\n","stream":"stdout","time":"2020-06-07T17:24:13.049781146Z"}
{"log":"Downloading: 2341344 of 54776152064 0.00%\r\n","stream":"stdout","time":"2020-06-07T17:24:14.049460924Z"}
{"log":"Downloading: 3520992 of 54776152064 0.01%\r\n","stream":"stdout","time":"2020-06-07T17:24:15.049874406Z"}
...
{"log":"Downloading: 11291785696 of 54776152064 20.61%\r\n","stream":"stdout","time":"2020-06-07T21:12:36.502910792Z"}
{"log":"Downloading: 11291802080 of 54776152064 20.61%\r\n","stream":"stdout","time":"2020-06-07T21:12:37.503800507Z"}
{"log":"Downloading: 11291818464 of 54776152064 20.61%\r\n","stream":"stdout","time":"2020-06-07T21:12:41.434972368Z"}
{"log":"Downloading: 11291834848 of 54776152064 20.61%\r\n","stream":"stdout","time":"2020-06-07T21:12:48.997341257Z"}

You can see in the log that the load hangs this time by 20.61%. And so this situation has been going on for 40 minutes and nothing has changed.

Upvotes: 0

Views: 270

Answers (1)

xrombik
xrombik

Reputation: 1

The problem was solved by downloading the file required by the server manually. To do this, I went to https://openmaptiles.com/downloads/tileset/osm/. and using my authorization data, I got a link to download the file. The link contained a command that you must execute to download the file:

$ wget -t 0 -c https://openmaptiles.com/download/XXXXXXXXXXXX/osm-2017-07-03-v3.6.1-planet.mbtiles?usage=personal

where XXXXXXXXXX is the link key generated for your authentication data

-t 0 is the key of the wget command which allows an infinite number of reconnections (helps with communication problems).

-c - a wget command key that allows you to continue downloading an existing file.

key XXXXXXXXXXXX - this key may lose its relevance, and then you will have to go back to https://openmaptiles.com/downloads/tileset/osm/ to get a new download link.

All you have to do is to continue downloading (you can continue the next day), and eventually the file will be downloaded in its entirety. Now having the file osm-2017-07-03-v3.6.1-planet.mbtiles check its checksum and compare it with the one at https://openmaptiles.com/downloads/tileset/osm/. In my case, the checksum was correct. Then you can move on to the next step.

Now being in the folder with the file osm-2017-07-03-v3.6.1-planet.mbtiles I ran the command:

sudo docker run --rm -it -v $(pwd):/data -p 8080:80 klokantech/openmaptiles-server

The hardest part is done now.The server starts up and reports that a map database file has been detected, and the wizard opened in his browser at localhost:8080 was ready for further action.

Upvotes: 0

Related Questions