osmupdate Error: “Could not get the newest minutely timestamp from the Internet” [Updated]

Starting 2021-02-21 osmupdate from the osmctools collection failed to update my copy of the OpenStreetMap planet file:

osmupdate: Verbose mode.
osmupdate Parameter: --drop-author
osmupdate Parameter: --compression-level=1
osmupdate Parameter: --tempfiles=/brouter-tmp/osmupdate
osmupdate Parameter: --keep-tempfiles
osmupdate Parameter: /planet/planet-latest.osm.pbf
osmupdate Parameter: /planet/planet-latest.osm.pbf.new.osm.pbf
osmupdate: timestamp of /planet/planet-latest.osm.pbf: 2021-02-21T11:02:03Z
osmupdate: newest sporadic timestamp: (no timestamp)
osmupdate: newest minutely timestamp: (no timestamp)
osmupdate Error: Could not get the newest minutely timestamp from the Internet.

After some debugging, I found out the reason for the error. The syntax of the replication state.txt files has changed on 2021-02-21. The change was introduced after an update was applied which was announced here.

osmupdate worked with files containing the legacy format (example) …

#Sun Feb 21 11:07:02 UTC 2021
sequenceNumber=4425367
txnMaxQueried=3411747792
txnActiveList=
txnReadyList=
txnMax=3411747792
timestamp=2021-02-21T11\:07\:02Z

… but fails to parse the new format (example):

sequenceNumber=4425368
timestamp=2021-02-21T11\:16\:57Z

I’m relying on osmupdate to update the planet file for creating routing data for my BRouter-Web instance. I took a short look into osmupdate’s source and implemented a quick fix (which was as easy as commenting out four lines).

My Docker image which creates the routing data contains now the patched version of osmupdate.

Everything works fine again.

Update 2021-02-26

In the meantime the missing first line beginning with the # was re-added to state.txt, so the unpatched osmupdate works again.