Skip to content

Add another tip to Geo replication troubleshooting

Toon Claes requested to merge tc-geo-troubleshoot into master

It seems people regularly run into the problem where they forget a step in the setup of Geo, so they get the following error:

ERROR: replication slots can only be used if wal_level >= replica

This error seems to happen when on the primary to role was not configured correctly. The admin should have added roles ['geo_primary_role'] or geo_primary_role['enable'] = true to gitlab.rb on the primary node.

Since this is a common error, add this as a tip to the troubleshooting section of the error message.

Example output

ERROR:  replication slots can only be used if wal_level >= replica
*** Initial replication failed! ***

Replication tool returned with a non zero exit status!

Troubleshooting tips:
  - replication should be run by root user
  - check if `roles ['geo_primary_role']` or `geo_primary_role['enable'] = true` exists in `gitlab.rb` on the primary node
  - check your trust settings `md5_auth_cidr_addresses` in `gitlab.rb` on the primary node

Failed to execute: PGPASSFILE=/var/opt/gitlab/postgresql/.pgpass /opt/gitlab/bin/gitlab-psql -h 10.132.0.24 -p 5432 -U gitlab_replicator -d gitlabhq_production -t -c "SELECT slot_name FROM pg_create_physical_replication_slot('secondary_example');"


### Related issues

https://gitlab.com/gitlab-org/gitlab-ee/issues/9259
Edited by GitLab Release Tools Bot

Merge request reports

Loading