I extract highways from OSM every day from a cron job and keep a postgis database up-to-date. Due to a database change, the syncing has stopped in December 2017. I am trying to re-sync with a sequence number from earlier than December 03 2018 (when the syncing failed), but, I get a

org.openstreetmap.osmosis.core.OsmosisRuntimeException: The replication state doesn't contain a timestamp property.

Error. How can I rectify the issue and make the database current? Below is the failure:

-------------------Fri Sep 14 14:18:42 EDT 2018----------------------

Sep 14, 2018 2:18:42 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Osmosis Version 0.45
Sep 14, 2018 2:18:42 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Preparing pipeline.
Sep 14, 2018 2:18:42 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Launching pipeline execution.
Sep 14, 2018 2:18:42 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Pipeline executing, waiting for completion.
Sep 14, 2018 2:18:43 PM org.openstreetmap.osmosis.core.pipeline.common.ActiveTaskManager waitForCompletion
SEVERE: Thread for task 1-read-replication-interval failed
org.openstreetmap.osmosis.core.OsmosisRuntimeException: The replication state doesn't contain a timestamp property.
    at org.openstreetmap.osmosis.replication.common.ReplicationState.loadProperty(ReplicationState.java:65)
    at org.openstreetmap.osmosis.replication.common.ReplicationState.load(ReplicationState.java:78)
    at org.openstreetmap.osmosis.replication.common.ReplicationState.<init>(ReplicationState.java:59)
    at org.openstreetmap.osmosis.replication.common.ServerStateReader.getServerState(ServerStateReader.java:108)
    at org.openstreetmap.osmosis.replication.common.ServerStateReader.getServerState(ServerStateReader.java:50)
    at org.openstreetmap.osmosis.replication.v0_6.BaseReplicationDownloader.runImpl(BaseReplicationDownloader.java:290)
    at org.openstreetmap.osmosis.replication.v0_6.BaseReplicationDownloader.run(BaseReplicationDownloader.java:383)
    at java.lang.Thread.run(Unknown Source)

Sep 14, 2018 2:18:43 PM 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 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    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)

asked 14 Sep, 21:16

picmate's gravatar image

picmate
6635
accept rate: 50%


The issue was directly due to not using the secured endpoint for fetching the diffs. I wrote an answer detailing the solution on stack overflow:

https://gis.stackexchange.com/questions/295991/re-sync-osm-db-after-failure/301589#301589

permanent link

answered 07 Nov, 18:47

picmate's gravatar image

picmate
6635
accept rate: 50%

edited 07 Nov, 18:48

1

I've accepted this as the answe; hope you don't mind.

(07 Nov, 19:07) SomeoneElse ♦

I don't, thanks for doing that. Considering what I went through to get it resolved, would be helpful for someone else if run into a similar issue.

(07 Nov, 19:15) picmate

I would assume the error message to be correct, so "replication state doesn't contain a timestamp property." id likely your problem.

#Sun Sep 16 09:25:02 CEST 2018
sequenceNumber=3149567
timestamp=2018-09-16T07\:24\:02Z

is an example of what the state file should look like and your file probably doesn't.

The values from https://planet.openstreetmap.org/replication/minute/002/732/999.state.txt should restart replication from the end of Novemeber 2017.

permanent link

answered 16 Sep, 08:32

SimonPoole's gravatar image

SimonPoole ♦
36.1k13272577
accept rate: 18%

edited 16 Sep, 08:43

Hi, thanks for the reply. I tried that. But, still get the same message. Is this related to a problem with the security certificate and the diff url? I still use an http url opposed to https. Just read something indicating that the https version should be used now.

(16 Sep, 17:13) picmate

You do need to use https in your osmosis configuration file, however a failure to do so, shouldn't result in the error message you are seeing.

(16 Sep, 17:41) SimonPoole ♦
Your answer
toggle preview

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:

×490
×200
×133
×112

question asked: 14 Sep, 21:16

question was seen: 213 times

last updated: 07 Nov, 19:15

powered by OSQA