omniscale/imposm3

Error while reading osm.pbf to cache in ubuntu 20.04 in WSL

bogind opened this issue · 1 comments

Cannot read osm.pbf files into cache (and therefore write to DB) in Ubuntu 20.04 on windows WSL2 sing latest binary versions.

have been trying by using the example in the readme along with multiple other varaitions.

./imposm import -connection postgis://user:password@localhost:5432/osm -mapping mapping.json -read /home/drorb/osm/noord-holland-latest.osm.pbf -cachedir /home/drorb -appendcache

This are the resulting lines after which imposm stops.

[2021-10-14T09:07:27+03:00] 0:00:00 [step] Starting: Imposm [2021-10-14T09:07:27+03:00] 0:00:00 [step] Starting: Reading OSM data [2021-10-14T09:07:27+03:00] 0:00:00 [error] opening cache files: IO error: /home/drorb/coords: Invalid argument

Context

Error occurs while reading osm data into cache.
have tried the below action with versions v0.11.1 and v0.11.0, naturally with the correct username, password and host.
mapping.json is the one that came with the binary, have tried using other *.osm.pbf files.
have tried to both append and overwrite cache, and to move the cache from /tmp to other locations.
have also tried using sudo and deleting cache completely, after recreating it the error returns.

My Environment

  • Version used: 0.11.1 and 0.11.0
  • Environment name and version (e.g. PostgreSQL 13with PostGIS 3.1.4):
  • Server type and version:
  • Operating System and version: Ubuntu 20.04 running on Windows 10

Hi @bogind. I also got this error in Windows Subsystem for linux, I've no idea what causes it. My current solution is to run it through a docker container instead. You can use host.docker.internal as the host for the database on your windows host in the connection string, e.g. postgis://username:password@host.docker.internal/importtest. Not the solution to the problem but hopefully its helpful.