[Tile-serving] [osm2pgsql-dev/osm2pgsql] Replication breakage (Issue #2195)

Jochen Topf notifications at github.com
Wed Jun 12 08:31:33 UTC 2024


<!-- Please don't use screenshots. Copy and paste the *text* output here if that's needed for context. -->

## What version of osm2pgsql are you using?

master

## What operating system and PostgreSQL/PostGIS version are you using?

Debian stable

## What did you do exactly?

Running `osm2pgsql-replication update -d "$DB"` in a loop.

## What did you expect to happen?

Update works.

## What did happen instead?

Ran fine for months then stopped with this:

```
2024-05-30 14:22:39 [WARNING]: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f91767a0850>: Failed to establish a new connection: [Errno 111] Connection refused')': /replication/minute//006/111/860.state.txt
2024-05-30 14:22:40 [WARNING]: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f917679a810>: Failed to establish a new connection: [Errno 111] Connection refused')': /replication/minute//006/111/860.state.txt
2024-05-30 14:22:42 [WARNING]: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f91767b4910>: Failed to establish a new connection: [Errno 111] Connection refused')': /replication/minute//006/111/860.state.txt
Traceback (most recent call last):
  File "/home/sqrt/bin/osm2pgsql-replication", line 724, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/sqrt/bin/osm2pgsql-replication", line 716, in main
    return args.handler(props, args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sqrt/bin/osm2pgsql-replication", line 563, in update
    props.write_replication_state(base_url, seq, nextstate.timestamp if nextstate else None)
  File "/home/sqrt/bin/osm2pgsql-replication", line 211, in write_replication_state
    self._set_prop('replication_timestamp', osm_date(date))
                                            ^^^^^^^^^^^^^^
  File "/home/sqrt/bin/osm2pgsql-replication", line 81, in osm_date
    return date.strftime('%Y-%m-%dT%H:%M:%SZ')
           ^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'strftime'
```


-- 
Reply to this email directly or view it on GitHub:
https://github.com/osm2pgsql-dev/osm2pgsql/issues/2195
You are receiving this because you are subscribed to this thread.

Message ID: <osm2pgsql-dev/osm2pgsql/issues/2195 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20240612/60615bb1/attachment.htm>


More information about the Tile-serving mailing list