pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Patroni issue
4+ messages / 4 participants
[nested] [flat]

* Patroni issue
@ 2020-12-29 22:59  Deepak tyagi <deepaktyagi454@gmail.com>
  0 siblings, 1 reply; 4+ messages in thread

From: Deepak tyagi @ 2020-12-29 22:59 UTC (permalink / raw)
  To: pgsql-admin

Hi,

I am getting below highlighted issue while starting the patroni, so i need
an advice, how to resolve it?



 Error :
[image: image.png]
 #systemctl status patroni
patroni.service - Runners to orchestrate a high-availability PostgreSQL
   Loaded: loaded (/etc/systemd/system/patroni.service; disabled; vendor
preset: disabled)
   Active: active (running) since Tue 2020-12-29 17:34:55 EST; 3s ago
 Main PID: 9658 (patroni)
    Tasks: 2 (limit: 4915)
   CGroup: /system.slice/patroni.service
           └─9658 /usr/bin/python3 /usr/bin/patroni /etc/patroni.yml

Dec 29 17:34:55  systemd[1]: Started Runners to orchestrate a
high-availability PostgreSQL.
Dec 29 17:34:55  patroni[9658]: 2020-12-29 17:34:55,743 WARNING: Retrying
(Retry(total=1, connect=None, read=None, redirect=0, statu>
Dec 29 17:34:55  patroni[9658]: 2020-12-29 17:34:55,743 WARNING: Retrying
(Retry(total=0, connect=None, read=None, redirect=0, statu>
Dec 29 17:34:55  patroni[9658]: 2020-12-29 17:34:55,744 ERROR: Failed to
get list of machines from http://localhost:80/v2: MaxRetry>
Dec 29 17:34:55  patroni[9658]: 2020-12-29 17:34:55,744 INFO: waiting on
etcd

ETCD status:

  systemctl status etcd
● etcd.service - Etcd Server
   Loaded: loaded (/usr/lib/systemd/system/etcd.service; enabled; vendor
preset: disabled)
   Active: active (running) since Tue 2020-12-29 17:01:58 EST; 4s ago
 Main PID: 10826 (etcd)
    Tasks: 13 (limit: 4915)
   CGroup: /system.slice/etcd.service
           └─10826 /usr/sbin/etcd

Dec 29 17:01:57 vtststmost3 etcd[10826]: listening for peers on
127.0.0.1:2380
Dec 29 17:01:58 vtststmost3 bash[10826]: raft2020/12/29 17:01:58 INFO:
8e9e05c52164694d is starting a new election at term 5
Dec 29 17:01:58 vtststmost3 bash[10826]: raft2020/12/29 17:01:58 INFO:
8e9e05c52164694d became candidate at term 6
Dec 29 17:01:58 vtststmost3 bash[10826]: raft2020/12/29 17:01:58 INFO:
8e9e05c52164694d received MsgVoteResp from 8e9e05c52164694d at term 6
Dec 29 17:01:58 vtststmost3 bash[10826]: raft2020/12/29 17:01:58 INFO:
8e9e05c52164694d became leader at term 6
Dec 29 17:01:58 vtststmost3 bash[10826]: raft2020/12/29 17:01:58 INFO:
raft.node: 8e9e05c52164694d elected leader 8e9e05c52164694d at term 6
Dec 29 17:01:58 vtststmost3 etcd[10826]: published {Name:default
ClientURLs:[http://localhost:2379]} to cluster cdf818194e3a8c32
Dec 29 17:01:58 vtststmost3 etcd[10826]: ready to serve client requests
Dec 29 17:01:58 vtststmost3 systemd[1]: Started Etcd Server.
Dec 29 17:01:58 vtststmost3 etcd[10826]: serving insecure client requests
on 127.0.0.1:2379, this is strongly discouraged!

Thanks & Regards,
Deepak Tyagi

Attachments:

  [image/png] image.png (43.0K, ../../CAFC+CBzno6Kd2ya4G6NaoXMjqpqc_PR7YsOdZkh8kcx3WkUnSg@mail.gmail.com/3-image.png)
  download | view image

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Patroni issue
@ 2020-12-29 23:16  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Deepak tyagi <deepaktyagi454@gmail.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Tom Lane @ 2020-12-29 23:16 UTC (permalink / raw)
  To: Deepak tyagi <deepaktyagi454@gmail.com>; +Cc: pgsql-admin

Deepak tyagi <deepaktyagi454@gmail.com> writes:
> I am getting below highlighted issue while starting the patroni, so i need
> an advice, how to resolve it?

I know zero about Patroni, but I can't help noticing that this:

> Dec 29 17:34:55  patroni[9658]: 2020-12-29 17:34:55,744 ERROR: Failed to
> get list of machines from http://localhost:80/v2: MaxRetry>

suggests that patroni is trying to contact a server on port 80,
while this:

> Dec 29 17:01:58 vtststmost3 etcd[10826]: serving insecure client requests
> on 127.0.0.1:2379, this is strongly discouraged!

suggests that the server is listening on port 2379.  So it'd seem
that one or the other is misconfigured.

In any case, this problem has got basically nothing to do with
Postgres.  Try asking in a patroni-related forum.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Patroni Issue
@ 2023-05-10 12:08  Inzamam Shafiq <inzamam.shafiq@hotmail.com>
  0 siblings, 1 reply; 4+ messages in thread

From: Inzamam Shafiq @ 2023-05-10 12:08 UTC (permalink / raw)
  To: pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>

Hi Team,

I hope you are doing well.

I am working on patroni auto failover, I have 3 ETCD nodes, 2 pgsql/patroni nodes, ETCD cluster is running fine with no issues, now I have installed postgresql on patroni nodes and configured streaming replication using pg_basebackup, which is running fine. On top of that I have created yaml file for patroni, when I start patroni on the first(primary) node, it show the following logs and keep on showing this message and stay in starting state. can someone please help me to identify the issue, logs are as follows,

-bash-4.2$ patroni /etc/patroni/patroni.yml
2023-05-10 16:43:59,147 INFO: Selected new etcd server http://172.xx.xx.xx:2379
2023-05-10 16:43:59,151 INFO: No PostgreSQL configuration items changed, nothing to reload.
2023-05-10 16:43:59,171 WARNING: Postgresql is not running.
2023-05-10 16:43:59,171 INFO: Lock owner: None; I am pg1
2023-05-10 16:43:59,174 INFO: pg_controldata:
  pg_control version number: 1201
  Catalog version number: 201909212
  Database system identifier: 7230768165275119881
  Database cluster state: shut down
  pg_control last modified: Wed May 10 16:43:54 2023
  Latest checkpoint location: 0/6000150
  Latest checkpoint's REDO location: 0/6000150
  Latest checkpoint's REDO WAL file: 000000010000000000000006
  Latest checkpoint's TimeLineID: 1
  Latest checkpoint's PrevTimeLineID: 1
  Latest checkpoint's full_page_writes: on
  Latest checkpoint's NextXID: 0:490
  Latest checkpoint's NextOID: 16386
  Latest checkpoint's NextMultiXactId: 1
  Latest checkpoint's NextMultiOffset: 0
  Latest checkpoint's oldestXID: 479
  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: Wed May 10 16:43:53 2023
  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: 5
  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
  Float4 argument passing: by value
  Float8 argument passing: by value
  Data page checksum version: 0
  Mock authentication nonce: c557e5f51c201ffaa61d5372fe87384044552322ff979d1e05f6030be1fc7cc0

2023-05-10 16:43:59,185 INFO: Lock owner: None; I am pg1
2023-05-10 16:43:59,191 INFO: starting as a secondary
2023-05-10 16:43:59.461 PKT [22878] LOG:  starting PostgreSQL 12.14 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44), 64-bit
2023-05-10 16:43:59.461 PKT [22878] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2023-05-10 16:43:59,476 INFO: postmaster pid=22878
2023-05-10 16:43:59.479 PKT [22878] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
localhost:5432 - no response
2023-05-10 16:43:59.498 PKT [22878] LOG:  redirecting log output to logging collector process
2023-05-10 16:43:59.498 PKT [22878] HINT:  Future log output will appear in directory "log".
localhost:5432 - no response
localhost:5432 - no response
localhost:5432 - no response
localhost:5432 - no response
localhost:5432 - no response
localhost:5432 - no response
localhost:5432 - no response
localhost:5432 - no response
localhost:5432 - no response
2023-05-10 16:44:09,163 INFO: Lock owner: None; I am pg1
2023-05-10 16:44:09,163 INFO: not healthy enough for leader race
2023-05-10 16:44:09,169 INFO: restarting after failure in progress
localhost:5432 - no response
localhost:5432 - no response
localhost:5432 - no response
localhost:5432 - no response
localhost:5432 - no response
localhost:5432 - no response
localhost:5432 - no response
localhost:5432 - no response
localhost:5432 - no response
localhost:5432 - no response
2023-05-10 16:44:19,163 INFO: Lock owner: None; I am pg1
2023-05-10 16:44:19,163 INFO: not healthy enough for leader race
2023-05-10 16:44:19,169 INFO: restarting after failure in progress
localhost:5432 - no response
localhost:5432 - no response
localhost:5432 - no response

Thanks.

Regards,

Inzamam Shafiq
Sr. DBA

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Patroni Issue
@ 2023-05-10 12:13  Stephen Frost <sfrost@snowman.net>
  parent: Inzamam Shafiq <inzamam.shafiq@hotmail.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Stephen Frost @ 2023-05-10 12:13 UTC (permalink / raw)
  To: Inzamam Shafiq <inzamam.shafiq@hotmail.com>; +Cc: pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>

Greetings,

* Inzamam Shafiq (inzamam.shafiq@hotmail.com) wrote:
> I hope you are doing well.

Please don't post the exact same message to multiple mailing lists.

Thanks,

Stephen

Attachments:

  [application/pgp-signature] signature.asc (832B, ../../ZFuKT3QwML9QOfTH@tamriel.snowman.net/2-signature.asc)
  download

^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2023-05-10 12:13 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-12-29 22:59 Patroni issue Deepak tyagi <deepaktyagi454@gmail.com>
2020-12-29 23:16 ` Tom Lane <tgl@sss.pgh.pa.us>
2023-05-10 12:08 Patroni Issue Inzamam Shafiq <inzamam.shafiq@hotmail.com>
2023-05-10 12:13 ` Re: Patroni Issue Stephen Frost <sfrost@snowman.net>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox