[openstreetmap/openstreetmap-website] Create a rake task for populating the database (#282)

Han Chao notifications at github.com
Mon Sep 19 09:26:16 UTC 2016


@danstowell Error occurred. Any help?

[hanchao07 at dx-wmarch-map-routing01 ~]$ ./osmosis/bin/osmosis --truncate-apidb host="waimai-pgsql-wmmapdata01-write.vip.sankuai.com" database="wmgis" user="wmgis_rw" password="3ab8CPjB0C1mx6q7fdsuOuLkp" validateSchemaVersion="no"
九月 19, 2016 5:14:58 下午 org.openstreetmap.osmosis.core.Osmosis run
信息: Osmosis Version 0.45
九月 19, 2016 5:14:58 下午 org.openstreetmap.osmosis.core.Osmosis run
信息: Preparing pipeline.
九月 19, 2016 5:14:58 下午 org.openstreetmap.osmosis.core.Osmosis run
信息: Launching pipeline execution.
九月 19, 2016 5:14:58 下午 org.openstreetmap.osmosis.core.Osmosis run
信息: Pipeline executing, waiting for completion.
九月 19, 2016 5:14:59 下午 org.openstreetmap.osmosis.core.Osmosis run
信息: Pipeline complete.
九月 19, 2016 5:14:59 下午 org.openstreetmap.osmosis.core.Osmosis run
信息: Total execution time: 674 milliseconds.

[hanchao07 at dx-wmarch-map-routing01 ~]$ ./osmosis/bin/osmosis --read-pbf file=china-latest.osm.pbf --write-apidb host="waimai-pgsql-wmmapdata01-write.vip.sankuai.com" database="wmgis" user="wmgis_rw" password="****" validateSchemaVersion="no"
九月 19, 2016 5:15:11 下午 org.openstreetmap.osmosis.core.Osmosis run
信息: Osmosis Version 0.45
九月 19, 2016 5:15:11 下午 org.openstreetmap.osmosis.core.Osmosis run
信息: Preparing pipeline.
九月 19, 2016 5:15:11 下午 org.openstreetmap.osmosis.core.Osmosis run
信息: Launching pipeline execution.
九月 19, 2016 5:15:11 下午 org.openstreetmap.osmosis.core.Osmosis run
信息: Pipeline executing, waiting for completion.
九月 19, 2016 5:16:18 下午 org.openstreetmap.osmosis.core.pipeline.common.ActiveTaskManager waitForCompletion
严重: Thread for task 1-read-pbf failed
org.openstreetmap.osmosis.core.OsmosisRuntimeException: Unable to insert user with id 3642735 into the database.
       	at org.openstreetmap.osmosis.apidb.v0_6.impl.UserManager.insertUser(UserManager.java:143)
       	at org.openstreetmap.osmosis.apidb.v0_6.impl.UserManager.addOrUpdateUser(UserManager.java:191)
       	at org.openstreetmap.osmosis.apidb.v0_6.ApidbWriter.process(ApidbWriter.java:1098)
       	at crosby.binary.osmosis.OsmosisBinaryParser.parseDense(OsmosisBinaryParser.java:138)
       	at org.openstreetmap.osmosis.osmbinary.BinaryParser.parse(BinaryParser.java:124)
       	at org.openstreetmap.osmosis.osmbinary.BinaryParser.handleBlock(BinaryParser.java:68)
       	at org.openstreetmap.osmosis.osmbinary.file.FileBlock.process(FileBlock.java:135)
       	at org.openstreetmap.osmosis.osmbinary.file.BlockInputStream.process(BlockInputStream.java:34)
       	at crosby.binary.osmosis.OsmosisReader.run(OsmosisReader.java:45)
       	at java.lang.Thread.run(Thread.java:745)
Caused by: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "users_display_name_idx"
  详细:Key (display_name)=(Nodes&Roads) already exists.
       	at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2103)
       	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1836)
       	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
       	at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:512)
       	at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:388)
       	at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:334)
       	at org.openstreetmap.osmosis.apidb.v0_6.impl.UserManager.insertUser(UserManager.java:140)
       	... 9 more

九月 19, 2016 5:16:18 下午 org.openstreetmap.osmosis.core.Osmosis main
严重: 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 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
       	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
       	at java.lang.reflect.Method.invoke(Method.java:606)
       	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)


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/282#issuecomment-247947133
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20160919/e7333b33/attachment-0001.html>


More information about the rails-dev mailing list