Здравствуйте, коллеги!
на текущий момент настроена кластерная связка на 3 ноды: etcd, postgresql12-server, patroni и весь этот зоопарк нормально работает.
За основу был взят мануал https://itdraft.ru/2023/08/14/nastrojka-otkazoustojchivogo-klastera-postgresql-v-linux/
pgbouncer мне пока не нужен.
Установил haproxy, адаптировал конфиг под Altlinux и не выходит каменный цветок.
systemctl status haproxy
...
Jun 27 15:27:10 host-101 haproxy[9409]: [NOTICE]   (9409) : New worker (9411) forked
Jun 27 15:27:10 host-101 haproxy[9409]: [NOTICE]   (9409) : Loading success.
Jun 27 15:27:10 host-101 systemd[1]: Started HAProxy Load Balancer.
Jun 27 15:27:10 host-101 haproxy[9411]: [WARNING]  (9411) : Server postgres_master/host-101 is DOWN, reason: Layer7 wrong status, code: 503, info: "Service Unavailable", check duration: 4ms>
Jun 27 15:27:10 host-101 haproxy[9411]: [ALERT]    (9411) : sendmsg()/writev() failed in logger #1: No such file or directory (errno=2)
Jun 27 15:27:10 host-101 haproxy[9411]: [WARNING]  (9411) : Server postgres_replicas/host-102 is DOWN, reason: Layer7 wrong status, code: 503, info: "Service Unavailable", check duration: 1>
Jun 27 15:27:10 host-101 haproxy[9411]: [WARNING]  (9411) : Server postgres_replicas_sync/host-101 is DOWN, reason: Layer7 wrong status, code: 503, info: "Service Unavailable", check durati>
Jun 27 15:27:10 host-101 haproxy[9411]: [WARNING]  (9411) : Server postgres_replicas_sync/host-102 is DOWN, reason: Layer7 wrong status, code: 503, info: "Service Unavailable", check durati>
Jun 27 15:27:10 host-101 haproxy[9411]: [ALERT]    (9411) : proxy 'postgres_replicas_sync' has no server available!
Jun 27 15:27:10 host-101 haproxy[9411]: [WARNING]  (9411) : Server postgres_replicas_async/host-102 is DOWN, reason: Layer7 wrong status, code: 503, info: "Service Unavailable", check dura
вот отрывок из
cat /etc/haproxy/haproxy.cfg 
global
    maxconn 100000
    log /dev/log    local0
    log /dev/log    local1 notice
    chroot /var/lib/haproxy
    stats socket /var/lib/haproxy/stats mode 660 level admin expose-fd listeners
    pidfile /run/haproxy.pid
    stats timeout 30s
    user _haproxy
    group _haproxy
    daemon
defaults
    mode               tcp
    log                global
    retries            2
    timeout queue      5s
    timeout connect    5s
    timeout client     60m
    timeout server     60m
    timeout check      15s
listen stats
    mode http
    bind 192.168.12.101:7000
    stats enable
    stats uri /
listen postgres_master
    bind *:5000
    maxconn 10000
    option tcplog
    option httpchk OPTIONS /master HTTP/1.1
    http-check expect status 200
    default-server inter 3s fastinter 1s fall 3 rise 4 on-marked-down shutdown-sessions
    server host-101 192.168.12.101:5432 check port 8008
    server host-102 192.168.12.102:5432 check port 8008
    
listen postgres_replicas
    bind *:5001
    maxconn 10000
    option tcplog
    option httpchk OPTIONS /replica HTTP/1.1
    balance roundrobin
    http-check expect status 200
    default-server inter 3s fastinter 1s fall 3 rise 2 on-marked-down shutdown-sessions
    server host-101 192.168.12.101:5432 check port 8008
    server host-102 192.168.12.102:5432 check port 8008
8008 порт отдает patroni и он нормально работает
patronictl -c /etc/patroni/patroni.yml list pg_cluster
+ Cluster: pg_cluster ------+---------+---------+----+-----------+
| Member   | Host           | Role    | State   | TL | Lag in MB |
+----------+----------------+---------+---------+----+-----------+
| host-101 | 192.168.12.101 | Replica | running |  3 |         0 |
| host-102 | 192.168.12.102 | Leader  | running |  3 |           |
+----------+----------------+---------+---------+----+-----------+
Я полагаю, что haproxy что-то не то спрашивает у patroni и они друг друга не понимают.
Как, вообще, через telenet поопрашивать patroni?
И что тут может быть не так?


