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

I have a tile server set up, and was using osmosis to update the database. However, the process stopped working, and when I analyzed the logs, it appears that when I shut down the server (in order to move to a new timezone), the update process stopped working.

Here is the relevant portion of the log file:

alt text

A current osmosis.log shows this:

Jul 21, 2018 7:15:01 PM org.openstreetmap.osmosis.core.Osmosis run INFO: Osmosis Version 0.46 Jul 21, 2018 7:15:02 PM org.openstreetmap.osmosis.core.Osmosis run INFO: Preparing pipeline. Jul 21, 2018 7:15:02 PM org.openstreetmap.osmosis.core.Osmosis run INFO: Launching pipeline execution. Jul 21, 2018 7:15:02 PM org.openstreetmap.osmosis.core.Osmosis run INFO: Pipeline executing, waiting for completion. Jul 21, 2018 7:15:03 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.v0_6.BaseReplicationDownloader.runImpl(BaseReplicationDownloader.java:268)
    at org.openstreetmap.osmosis.replication.v0_6.BaseReplicationDownloader.run(BaseReplicationDownloader.java:350)
    at java.base/java.lang.Thread.run(Thread.java:844)

Jul 21, 2018 7:15:03 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 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:564)
        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)

Admittedly, I had not changed the timezone on the server, so I'm not thinking it would have known I moved. Instead, I'm guessing something didn't shut down cleanly which is why osmosis.log shows a problem with the timestamp of the replication state. Assuming I'm correct, how can I reset osmosis expire stamp?

Can I simply run openstreetmap-tiles-update-expire with a timestamp of the last successful expiration? In this case: 2018-07-08T14:15:10Z?

In my searching, I've found some directions on how to get the current timestamp of a file, but not how to determine the current timestamp of the database. I apologize up front if I'm missing something easy or obvious.

Thanks.

asked 22 Jul '18, 03:48

tim_rohrer's gravatar image

tim_rohrer
816712
accept rate: 100%


Generally, how to re-sync after failure:

First, find the highest node ID in your database. If you are not using flatnodes, then

select max(id) from planet_osm_nodes;

else

select max(osm_id) from planet_osm_point;

Then, find the replication status file ("state.txt") that contains this ID; you can either do this by guesswork based on the node's creation date, or use the whichdiff utility (https://svn.openstreetmap.org/applications/utils/whichdiff/) which you invoke with the node ID you found.

Install the replication status file in the correct directory (same where your configuration.txt lives) and you should be ready to go.

Having said all that: Your screenshot says the last successfully applied diff was #3047966. The replication directory is organised by groups of thousands, so this number translates to 003/047/966, or https://planet.openstreetmap.org/replication/minute/003/047/966.state.txt - you could use the above procedure to double check, but it should lead you to approximately the same file.

permanent link

answered 22 Jul '18, 10:06

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

edited 22 Jul '18, 10:06

Thank you Frederik. This makes sense because I want the time stamp of the latest diff applied, not the time stamp of the latest time osmosis CHECKED to see if an update was necessary.

To confirm, I then will run openstreetmap-tiles-update-expire with the timestamp of that last diff successfully applied, after deleting the .osmosis file?

(22 Jul '18, 12:54) tim_rohrer

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:

×252
×18
×7

question asked: 22 Jul '18, 03:48

question was seen: 2,480 times

last updated: 22 Jul '18, 12:57

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