public inbox for [email protected]help / color / mirror / Atom feed
DB Switchover using repmgr--Error 3+ messages / 2 participants [nested] [flat]
* DB Switchover using repmgr--Error @ 2024-11-26 06:36 jayakumar s <[email protected]> 0 siblings, 1 reply; 3+ messages in thread From: jayakumar s @ 2024-11-26 06:36 UTC (permalink / raw) To: [email protected] Hi Team, I have tried to configure DB switch over using repmgr. Post updated repmgr file then tried to register in primary db but getting the below error. Kindly check and let me know to fix the issue. *Error:* [postgres@post1 bin]$ ./repmgr -f /var/lib/pgsql/repmgr.conf primary register ERROR: following errors were found in the configuration file: syntax error in file "/var/lib/pgsql/repmgr.conf" line 3, near token "data_directory" syntax error in file "/var/lib/pgsql/repmgr.conf" line 6, near token "log_file" [postgres@post1 bin]$ *Conf file:* [postgres@post1 data]$ cat /var/lib/pgsql/repmgr.conf node_id=1 node_name=primary conninfo='host=192.168.29.193 user=repmgr dbname=repmgr connect_timeout=2' data_directory='/application/pgsql/data' failover=automatic promote_command='/usr/pgsql-16/bin/repmgr standby promote -f /var/lib/pgsql/repmgr.conf --log-to-file' follow_command='/usr/pgsql-16/bin/repmgr standby follow -f /var/lib/pgsql/repmgr.conf --log-to-file --upstream-node-id=%n' pg_bindir='/usr/pgsql-16/bin' log_file='/usr/pgsql-16/repmgr.log' [postgres@post1 data]$ ^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: DB Switchover using repmgr--Error @ 2024-11-26 10:10 Paul Foerster <[email protected]> parent: jayakumar s <[email protected]> 0 siblings, 1 reply; 3+ messages in thread From: Paul Foerster @ 2024-11-26 10:10 UTC (permalink / raw) To: jayakumar s <[email protected]>; +Cc: [email protected] Hi, > [postgres@post1 bin]$ ./repmgr -f /var/lib/pgsql/repmgr.conf primary register > ERROR: following errors were found in the configuration file: > syntax error in file "/var/lib/pgsql/repmgr.conf" line 3, near token "data_directory" > syntax error in file "/var/lib/pgsql/repmgr.conf" line 6, near token "log_file" > [postgres@post1 bin]$ > > Conf file: > > [postgres@post1 data]$ cat /var/lib/pgsql/repmgr.conf > node_id=1 > node_name=primary > conninfo='host=192.168.29.193 user=repmgr dbname=repmgr connect_timeout=2' data_directory='/application/pgsql/data' failover=automatic > promote_command='/usr/pgsql-16/bin/repmgr standby promote -f /var/lib/pgsql/repmgr.conf --log-to-file' > follow_command='/usr/pgsql-16/bin/repmgr standby follow -f /var/lib/pgsql/repmgr.conf --log-to-file --upstream-node-id=%n' > pg_bindir='/usr/pgsql-16/bin' log_file='/usr/pgsql-16/repmgr.log' > [postgres@post1 data]$ I'm not a repmgr guru but at first glance I would say that your config lacks two line breaks. It should probably look like this: node_id=1 node_name=primary conninfo='host=192.168.29.193 user=repmgr dbname=repmgr connect_timeout=2' data_directory='/application/pgsql/data' failover=automatic promote_command='/usr/pgsql-16/bin/repmgr standby promote -f /var/lib/pgsql/repmgr.conf --log-to-file' follow_command='/usr/pgsql-16/bin/repmgr standby follow -f /var/lib/pgsql/repmgr.conf --log-to-file --upstream-node-id=%n' pg_bindir='/usr/pgsql-16/bin' log_file='/usr/pgsql-16/repmgr.log' Cheers Paul ^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: DB Switchover using repmgr--Error @ 2024-11-27 06:17 jayakumar s <[email protected]> parent: Paul Foerster <[email protected]> 0 siblings, 0 replies; 3+ messages in thread From: jayakumar s @ 2024-11-27 06:17 UTC (permalink / raw) To: Paul Foerster <[email protected]>; +Cc: [email protected] Hi Paul, Thanks for your help. I have fixed that issue. Now I am getting one more issue. Can you help to fix the below error? [postgres@post1 bin]$ /usr/pgsql-16/bin/repmgr -f /var/lib/pgsql/repmgr.conf cluster show WARNING: node "standby" not found in "pg_stat_replication" ID | Name | Role | Status | Upstream | Location | Priority | Timeline | Connection string ----+---------+---------+-----------+-----------+----------+----------+----------+----------------------------------------------------------------- 1 | primary | primary | * running | | default | 100 | 8 | host=192.168.29.193 user=repmgr dbname=repmgr connect_timeout=2 2 | standby | standby | running | ! primary | default | 100 | 8 | host=192.168.29.9 user=repmgr dbname=repmgr connect_timeout=2 WARNING: following issues were detected - node "standby" (ID: 2) is not attached to its upstream node "primary" (ID: 1) [postgres@post1 bin]$ On Tue, Nov 26, 2024 at 3:41 PM Paul Foerster <[email protected]> wrote: > Hi, > > > [postgres@post1 bin]$ ./repmgr -f /var/lib/pgsql/repmgr.conf primary > register > > ERROR: following errors were found in the configuration file: > > syntax error in file "/var/lib/pgsql/repmgr.conf" line 3, near token > "data_directory" > > syntax error in file "/var/lib/pgsql/repmgr.conf" line 6, near token > "log_file" > > [postgres@post1 bin]$ > > > > Conf file: > > > > [postgres@post1 data]$ cat /var/lib/pgsql/repmgr.conf > > node_id=1 > > node_name=primary > > conninfo='host=192.168.29.193 user=repmgr dbname=repmgr > connect_timeout=2' data_directory='/application/pgsql/data' > failover=automatic > > promote_command='/usr/pgsql-16/bin/repmgr standby promote -f > /var/lib/pgsql/repmgr.conf --log-to-file' > > follow_command='/usr/pgsql-16/bin/repmgr standby follow -f > /var/lib/pgsql/repmgr.conf --log-to-file --upstream-node-id=%n' > > pg_bindir='/usr/pgsql-16/bin' log_file='/usr/pgsql-16/repmgr.log' > > [postgres@post1 data]$ > > I'm not a repmgr guru but at first glance I would say that your config > lacks two line breaks. It should probably look like this: > > node_id=1 > node_name=primary > conninfo='host=192.168.29.193 user=repmgr dbname=repmgr connect_timeout=2' > data_directory='/application/pgsql/data' > failover=automatic > promote_command='/usr/pgsql-16/bin/repmgr standby promote -f > /var/lib/pgsql/repmgr.conf --log-to-file' > follow_command='/usr/pgsql-16/bin/repmgr standby follow -f > /var/lib/pgsql/repmgr.conf --log-to-file --upstream-node-id=%n' > pg_bindir='/usr/pgsql-16/bin' log_file='/usr/pgsql-16/repmgr.log' > > Cheers > Paul ^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2024-11-27 06:17 UTC | newest] Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2024-11-26 06:36 DB Switchover using repmgr--Error jayakumar s <[email protected]> 2024-11-26 10:10 ` Paul Foerster <[email protected]> 2024-11-27 06:17 ` jayakumar s <[email protected]>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox