简体   繁体   中英

CRITICAL: system ID mismatch, node belongs to a different cluster: 6859654378827691778 != 6859654951670505099

i installed a patroni master node and need to create a pgbackrest replica the master node state is running but the slave node is stopped then it disappear because it looks like it belongs to another database identifier, when i try to run restore command manually pgbackrest --stanza=main --log-level-console=info --delta restore the slave node state change to running

here is the master postgresql.yml file:

> scope: {{ obasicat }} namespace: /pg_cluster/ name: {{ master }}
> 
> restapi:
>     listen: {{ master_ip }}:8008
>     connect_address: {{ master_ip }}:8008
> 
> etcd:
>     host: {{ etcd_ip }}:2379
> 
> bootstrap:   dcs:
>     ttl: 30
>     loop_wait: 10
>     retry_timeout: 10
>     maximum_lag_on_failover: {{ lag }}
>     postgresql:
>       use_pg_rewind: false
>       use_slots: true
> 
>   method: pgbackrest   pgbackrest:
>     command: /home/osadmin/custom_bootstrap.sh
>     keep_existing_recovery_conf: False
>     no_params: False
>     recovery_conf:
>       recovery_target: immediate
>       recovery_target_action: pause
>       restore_command: pgbackrest --stanza={{ obasicat }} archive-get %f %p
> 
>   pg_hba:
>   - host all         postgres    0.0.0.0/0      trust
>   - host replication replicate {{ master_ip }}/0 md5
>   - host replication replicate {{ slave_ip }}/0 md5
>   - host all all 0.0.0.0/0 md5
> 
>   users:
>     admin:
>       password: admin
>       options:
>         - createrole
>         - createdb
> 
> postgresql:   listen: "*:5432"   connect_address: {{ master_ip }}:5432
> data_dir: /{{opgbase}}/{{opgname}}/data/   bin_dir:
> /opt/pgsql/na/11.7/bin/   authentication:
>     replication:
>       username: replicate
>       password: replicate
>     superuser:
>       username: postgres
>       password: postgres
> 
>   create_replica_methods:
>     - pgbackrest   pgbackrest:
>     command: pgbackrest --stanza={{ obasicat }} --delta restore --config=/etc/pgbackrest.conf --pg1-path=/pgqdata/pgserver01/data/ --log-level-console=info
>     keep_data: True
>     no_params: True
> 
> tags:
>     nofailover: false
>     noloadbalance: false
>     clonefrom: false
>     nosync: false
> 
> log:
>     level: DEBUG
>     dir: /tmp/

and this is the slave postgresql.yml file:

> scope: {{ obasicat }} namespace: /pg_cluster/ name: {{ slave }}
> 
> restapi:
>     listen: {{ slave_ip }}:8008
>     connect_address: {{ slave_ip }}:8008
> 
> etcd:
>     host: {{ etcd_ip }}:2379
> 
> bootstrap:   dcs:
>     ttl: 30
>     loop_wait: 10
>     retry_timeout: 10
>     maximum_lag_on_failover: {{ lag }}
>     postgresql:
>       use_pg_rewind: false
>       use_slots: true
> 
>   method: pgbackrest   pgbackrest:
>     command: /home/osadmin/custom_bootstrap.sh
>     keep_existing_recovery_conf: False
>     no_params: False
>     recovery_conf:
>       recovery_target: immediate
>       recovery_target_action: pause
>       restore_command: pgbackrest --stanza={{ obasicat }} archive-get %f %p
> 
>   pg_hba:
>   - host all         postgres    0.0.0.0/0      trust
>   - host replication replicate {{ master_ip }}/0 md5
>   - host replication replicate {{ slave_ip }}/0 md5
>   - host all all 0.0.0.0/0 md5
> 
>   users:
>     admin:
>       password: admin
>       options:
>         - createrole
>         - createdb
> 
> postgresql:   listen: "*:5432"   connect_address: {{ slave_ip }}:5432 
> data_dir: /{{opgbase}}/{{opgname}}/data/   bin_dir:
> /opt/pgsql/na/11.7/bin/   authentication:
>     replication:
>       username: replicate
>       password: replicate
>     superuser:
>       username: postgres
>       password: postgres
> 
>   create_replica_methods:
>     - pgbackrest   pgbackrest:
>     command: pgbackrest --stanza={{ obasicat }} --delta restore --config=/etc/pgbackrest_slave.conf --pg1-path=/pgqdata/pgserver01/data/ --log-level-console=info
>     keep_data: True
>     no_params: True
> 
> tags:
>     nofailover: false
>     noloadbalance: false
>     clonefrom: false
>     nosync: false
> 
> log:
>     level: DEBUG
>     dir: /tmp/

Please any help?! Thanks

Try update key in etcd/zookeper/consul

7127773868874685913 != 7194568630546240772

/opt/etcd/etcdctl --endpoints=localhost:2379 get /service/stampede/initialize

Getting this key 7127773868874685913

/opt/etcd/etcdctl --endpoints=localhost:2379 put /service/stampede/initialize 7194568630546240772

Updating to new key 7194568630546240772

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM