Closed geek7 closed 10 months ago
Traces of "patroni_service.err.log" : 2023-10-19 18:07:25,939 INFO: Selected new etcd server http://xxx.xxx.xxx.xxx:2379 2023-10-19 18:07:25,980 INFO: No PostgreSQL configuration items changed, nothing to reload. 2023-10-19 18:07:26,902 WARNING: Postgresql is not running. 2023-10-19 18:07:26,902 INFO: Lock owner: None; I am node1 2023-10-19 18:07:26,921 INFO: pg_controldata: pg_control version number: 1300 Catalog version number: 202209061 Database system identifier: 7291036189100811420 Database cluster state: shut down pg_control last modified: 19/10/2023 18:06:01 Latest checkpoint location: 0/176E5E8 Latest checkpoint's REDO location: 0/176E5E8 Latest checkpoint's REDO WAL file: 000000070000000000000001 Latest checkpoint's TimeLineID: 7 Latest checkpoint's PrevTimeLineID: 7 Latest checkpoint's full_page_writes: on Latest checkpoint's NextXID: 0:729 Latest checkpoint's NextOID: 16387 Latest checkpoint's NextMultiXactId: 1 Latest checkpoint's NextMultiOffset: 0 Latest checkpoint's oldestXID: 717 Latest checkpoint's oldestXID's DB: 1 Latest checkpoint's oldestActiveXID: 0 Latest checkpoint's oldestMultiXid: 1 Latest checkpoint's oldestMulti's DB: 1 Latest checkpoint's oldestCommitTsXid: 0 Latest checkpoint's newestCommitTsXid: 0 Time of latest checkpoint: 19/10/2023 18:06:01 Fake LSN counter for unlogged rels: 0/3E8 Minimum recovery ending location: 0/0 Min recovery ending loc's timeline: 0 Backup start location: 0/0 Backup end location: 0/0 End-of-backup record required: no wal_level setting: replica wal_log_hints setting: on max_connections setting: 100 max_worker_processes setting: 8 max_wal_senders setting: 10 max_prepared_xacts setting: 0 max_locks_per_xact setting: 64 track_commit_timestamp setting: off Maximum data alignment: 8 Database block size: 8192 Blocks per segment of large relation: 131072 WAL block size: 8192 Bytes per WAL segment: 16777216 Maximum length of identifiers: 64 Maximum columns in an index: 32 Maximum size of a TOAST chunk: 1996 Size of a large-object chunk: 2048 Date/time type storage: 64-bit integers Float8 argument passing: by value Data page checksum version: 1 Mock authentication nonce: 9d70db024aef759abedfa3b1e66f694eba2bbc08dba2ea8aad417b018c92adc6
2023-10-19 18:07:26,956 INFO: Lock owner: None; I am node1 2023-10-19 18:07:26,969 INFO: starting as a secondary 2023-10-19 18:07:28,948 INFO: postmaster pid=2860 2023-10-19 18:07:28.998 CEST [2860] LOG: démarrage de PostgreSQL 15.3, compiled by Visual C++ build 1914, 64-bit 2023-10-19 18:07:29.000 CEST [2860] LOG: en écoute sur IPv4, adresse « 0.0.0.0 », port 5432 2023-10-19 18:07:29.079 CEST [7432] LOG: le système de bases de données a été arrêté à 2023-10-19 18:06:01 CEST 2023-10-19 18:07:29.081 CEST [7432] ATTENTION: ni primary_conninfo ni restore_command n'est spécifié 2023-10-19 18:07:29.081 CEST [7432] ASTUCE : Le serveur de la base de données va régulièrement interroger le sous-répertoire pg_wal pour vérifier les fichiers placés ici. 2023-10-19 18:07:29.081 CEST [7432] LOG: entre en mode standby 2023-10-19 18:07:29.089 CEST [7432] LOG: état de restauration cohérent atteint à 0/176E660 2023-10-19 18:07:29.089 CEST [7432] LOG: longueur invalide de l'enregistrement à 0/176E660 : voulait 24, a eu 0 2023-10-19 18:07:29.089 CEST [2860] LOG: le système de bases de données est prêt pour accepter les connexions en lecture seule 2023-10-19 18:07:29.089 CEST [7432] LOG: waiting for WAL to become available at 0/1002000 2023-10-19 18:07:31,207 INFO: establishing a new patroni connection to the postgres cluster 2023-10-19 18:07:33.375 CEST [7372] FATAL: le rôle « replicator » n'existe pas 2023-10-19 18:07:33,375 ERROR: Can not fetch local timeline and lsn from replication connection Traceback (most recent call last): File "C:\PES\patroni\patroni\postgresql__init.py", line 1012, in get_replica_timeline with self.get_replication_connection_cursor(self.config.local_replication_address) as cur: File "C:\Program Files\Python311\Lib\contextlib.py", line 137, in enter return next(self.gen) ^^^^^^^^^^^^^^ File "C:\PES\patroni\patroni\postgresql__init__.py", line 1007, in get_replication_connection_cursor with get_connection_cursor(conn_kwargs) as cur: File "C:\Program Files\Python311\Lib\contextlib.py", line 137, in enter return next(self.gen) ^^^^^^^^^^^^^^ File "C:\PES\patroni\patroni\postgresql\connection.py", line 48, in get_connection_cursor conn = psycopg.connect(*kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\PES\patroni\patroni\psycopg.py", line 102, in connect ret = _connect(args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Python311\Lib\site-packages\psycopg2__init__.py", line 122, in connect conn = _connect(dsn, connection_factory=connection_factory, kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ psycopg2.OperationalError 2023-10-19 18:07:33,397 INFO: promoted self to leader by acquiring session lock 2023-10-19 18:07:33.414 CEST [7432] LOG: a reçu une demande de promotion 2023-10-19 18:07:33.415 CEST [7432] LOG: la ré-exécution n'est pas nécessaire 2023-10-19 18:07:33.418 CEST [7432] LOG: identifiant d'un timeline nouvellement sélectionné : 8 2023-10-19 18:07:33.492 CEST [7432] LOG: restauration de l'archive terminée 2023-10-19 18:07:33.500 CEST [5028] LOG: début du checkpoint : force 2023-10-19 18:07:33.514 CEST [5028] LOG: checkpoint terminé : a écrit 3 tampons (0.0%); 0 fichiers WAL ajoutés, 0 supprimés, 0 recyclés ; écriture=0.005 s, synchronisation=0.002 s, total=0.016 s; fichiers synchronisés=2, plus long=0.001 s, moyenne=0.001 s; distance=0 kB, estimation=0 kB 2023-10-19 18:07:33.522 CEST [2860] LOG: le système de bases de données est prêt pour accepter les connexions 2023-10-19 18:07:34.570 CEST [1096] FATAL: le rôle « replicator » n'existe pas 2023-10-19 18:07:33,398 INFO: Lock owner: node1; I am node1 2023-10-19 18:07:34,569 ERROR: Can not fetch local timeline and lsn from replication connection Traceback (most recent call last): File "C:\PES\patroni\patroni\postgresql__init__.py", line 1012, in get_replica_timeline with self.get_replication_connection_cursor(**self.config.local_replication_address) as cur: File "C:\Program Files\Python311\Lib\contextlib.py", line 137, in enter return next(self.gen) ^^^^^^^^^^^^^^ File "C:\PES\patroni\patroni\postgresql__init.py", line 1007, in get_replication_connection_cursor with get_connection_cursor(**conn_kwargs) as cur: File "C:\Program Files\Python311\Lib\contextlib.py", line 137, in enter__ return next(self.gen) ^^^^^^^^^^^^^^ File "C:\PES\patroni\patroni\postgresql\connection.py", line 48, in get_connection_cursor conn = psycopg.connect(*kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\PES\patroni\patroni\psycopg.py", line 102, in connect ret = _connect(args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Python311\Lib\site-packages\psycopg2\init__.py", line 122, in connect conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ psycopg2.OperationalError 2023-10-19 18:07:34,571 INFO: updated leader lock during promote 2023-10-19 18:07:34,666 INFO: no action. I am (node1), the leader with the lock 2023-10-19 18:07:44,636 INFO: no action. I am (node1), the leader with the lock 2023-10-19 18:07:54,604 INFO: no action. I am (node1), the leader with the lock 2023-10-19 18:08:04,599 INFO: no action. I am (node1), the leader with the lock 2023-10-19 18:08:14,605 INFO: no action. I am (node1), the leader with the lock 2023-10-19 18:08:24,605 INFO: no action. I am (node1), the leader with the lock 2023-10-19 18:08:34,589 INFO: no action. I am (node1), the leader with the lock 2023-10-19 18:08:44,603 INFO: no action. I am (node1), the leader with the lock 2023-10-19 18:08:54,591 INFO: no action. I am (node1), the leader with the lock 2023-10-19 18:09:04,603 INFO: no action. I am (node1), the leader with the lock 2023-10-19 18:09:14,603 INFO: no action. I am (node1), the leader with the lock 2023-10-19 18:09:24,589 INFO: no action. I am (node1), the leader with the lock 2023-10-19 18:09:34,601 INFO: no action. I am (node1), the leader with the lock 2023-10-19 18:09:44,600 INFO: no action. I am (node1), the leader with the lock 2023-10-19 18:09:54,591 INFO: no action. I am (node1), the leader with the lock 2023-10-19 18:10:04,594 INFO: no action. I am (node1), the leader with the lock 2023-10-19 18:10:14,588 INFO: no action. I am (node1), the leader with the lock 2023-10-19 18:10:24,590 INFO: no action. I am (node1), the leader with the lock 2023-10-19 18:10:34,590 INFO: no action. I am (node1), the leader with the lock 2023-10-19 18:10:44,589 INFO: no action. I am (node1), the leader with the lock 2023-10-19 18:10:54,590 INFO: no action. I am (node1), the leader with the lock 2023-10-19 18:11:04,591 INFO: no action. I am (node1), the leader with the lock 2023-10-19 18:11:14,591 INFO: no action. I am (node1), the leader with the lock 2023-10-19 18:11:24,595 INFO: no action. I am (node1), the leader with the lock 2023-10-19 18:11:34,590 INFO: no action. I am (node1), the leader with the lock 2023-10-19 18:11:44,591 INFO: no action. I am (node1), the leader with the lock 2023-10-19 18:11:54,601 INFO: no action. I am (node1), the leader with the lock 2023-10-19 18:12:04,596 INFO: no action. I am (node1), the leader with the lock 2023-10-19 18:12:14,604 INFO: no action. I am (node1), the leader with the lock 2023-10-19 18:12:24,590 INFO: no action. I am (node1), the leader with the lock 2023-10-19 18:12:34,604 INFO: no action. I am (node1), the leader with the lock 2023-10-19 18:12:44,602 INFO: no action. I am (node1), the leader with the lock 2023-10-19 18:12:54,590 INFO: no action. I am (node1), the leader with the lock 2023-10-19 18:13:04,591 INFO: no action. I am (node1), the leader with the lock
Can be closed => service patroni registered without pes user
The cluster starts but this log seems to reveal that the BDD should contain the "replicator" role unvailable. Should the creation of this role in the postgresql database be done manually ?