NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

I imported a geofabrik extract of a small area (Liechtenstein) into my local osm website database to test if it works, the imported data appeared in iD editor, I can edit it and everything went fine as shown in the following copy&paste of terminal.

But when I tried with a bigger dataset (southeast of Brazil) it toke all night long and gave me the following error. I think the data has not been imported because nothing appeared in iD editor.

I'm using ubuntu 18.04 my specs are: 500 GB SSD 16 GB RAM i7-8550U

cadu@cadu-Inspiron-7773:~/Downloads/osmosis-0.47.1/bin$ ./osmosis --read-pbf /home/cadu/Downloads/liechtenstein-latest.osm.pbf   --write-apidb host="localhost" database="openstreetmap"   user="openstreetmap" password="openstreetmap" validateSchemaVersion="no"
mar 15, 2020 6:56:16 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Osmosis Version 0.47.1-1-g80be2971
mar 15, 2020 6:56:16 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Preparing pipeline.
mar 15, 2020 6:56:16 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Launching pipeline execution.
mar 15, 2020 6:56:16 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Pipeline executing, waiting for completion.
mar 15, 2020 6:57:20 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Pipeline complete.
mar 15, 2020 6:57:20 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Total execution time: 64617 milliseconds.
cadu@cadu-Inspiron-7773:~/Downloads/osmosis-0.47.1/bin$ ./osmosis --read-pbf /home/cadu/Downloads/sudeste-latest.osm.pbf   --write-apidb host="localhost" database="openstreetmap"   user="openstreetmap" password="openstreetmap" validateSchemaVersion="no"
mar 15, 2020 7:00:08 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Osmosis Version 0.47.1-1-g80be2971
mar 15, 2020 7:00:08 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Preparing pipeline.
mar 15, 2020 7:00:08 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Launching pipeline execution.
mar 15, 2020 7:00:08 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Pipeline executing, waiting for completion.
mar 16, 2020 12:42:07 AM org.openstreetmap.osmosis.core.pipeline.common.ActiveTaskManager waitForCompletion
SEVERE: Thread for task 1-read-pbf failed
org.openstreetmap.osmosis.core.OsmosisRuntimeException: Unable to load current nodes.
at org.openstreetmap.osmosis.apidb.v0_6.ApidbWriter.populateCurrentNodes(ApidbWriter.java:1006)
at org.openstreetmap.osmosis.apidb.v0_6.ApidbWriter.populateCurrentTables(ApidbWriter.java:1107)
at org.openstreetmap.osmosis.apidb.v0_6.ApidbWriter.complete(ApidbWriter.java:1141)
at crosby.binary.osmosis.OsmosisBinaryParser.complete(OsmosisBinaryParser.java:35)
at org.openstreetmap.osmosis.osmbinary.file.BlockInputStream.process(BlockInputStream.java:37)
at crosby.binary.osmosis.OsmosisReader.run(OsmosisReader.java:45)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "current_nodes_pkey1"
  Detail: Key (id)=(15755281) already exists.
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2440)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2183)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:308)
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:441)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:365)
at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:143)
at org.postgresql.jdbc.PgPreparedStatement.execute(PgPreparedStatement.java:132)
at org.openstreetmap.osmosis.apidb.v0_6.ApidbWriter.populateCurrentNodes(ApidbWriter.java:1003)
... 6 more

mar 16, 2020 12:42:07 AM org.openstreetmap.osmosis.core.Osmosis main
SEVERE: Execution aborted.
org.openstreetmap.osmosis.core.OsmosisRuntimeException: One or more tasks failed.
at org.openstreetmap.osmosis.core.pipeline.common.Pipeline.waitForCompletion(Pipeline.java:146)
at org.openstreetmap.osmosis.core.Osmosis.run(Osmosis.java:92)
at org.openstreetmap.osmosis.core.Osmosis.main(Osmosis.java:37)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:330)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:238)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
at org.codehaus.classworlds.Launcher.main(Launcher.java:47)

cadu@cadu-Inspiron-7773:~/Downloads/osmosis-0.47.1/bin$

asked 16 Mar '20, 18:56

carlosguedes's gravatar image

carlosguedes
9191016
accept rate: 0%

edited 16 Mar '20, 19:51


The node that the database complains about (15755281) is near Bludenz, in Austria, and not in Brazil. This node may be part of your Liechtenstein import due to its membership in the "Rätikon" multipolygon, however it is unclear to me why a Brazil import should trigger a duplicate key error here. Make sure to clear your database and re-try.

permanent link

answered 16 Mar '20, 19:54

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

Thank you.I truncated the database with osmosis and now I'm re-importing Brazil southeast again. When it ends I come with the results.

(16 Mar '20, 22:01) carlosguedes

Well, the southeast Brazil data has been imported, I could see and edit it through iD and manually added some points in the map. But then I imported the Liechtenstein pbf and now seems like another node is complaining.alt text

(17 Mar '20, 16:53) carlosguedes

I suspect these 2 datasets have an common node key.

(18 Mar '20, 23:24) carlosguedes

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×362

question asked: 16 Mar '20, 18:56

question was seen: 2,122 times

last updated: 18 Mar '20, 23:24

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum