Replication Unable to unsubscribe slave node (password failed)

July 19, 2011 • Customer Services       
Synopsis

You are attempting to unsubscribe a slave node from the master and you get the error "FATAL: password authentication failed for user 'postgres'"

Article

This error happens if the password you set for the slave node contains special characters e.g. $, %, ! etc. Although you are able to join the slave node to the cluster, when trying to unsubscribe the node postgres database throws the above error.

The work around is as follows:

1. Log in to the slave node as root

2. Type:

su postgres
psql censornet

3. Execute the following SQL:

ALTER USER postgres WITH password 'plaintextpassword';

where 'plaintextpassword' is a new password that does not contain special characters.

4. Exit from the postgres prompt by pressing Ctrl+D twice.

5. Type:

nano /etc/slony1/censornet/slon.conf

6. Alter the password in the file to match the new password set in step 3. Ctrl+X then Y then Enter to save and exit.

7. Now log in to the master node as root

8. Type:

su postgres
psql censornet

9. Type:

SELECT * from tbl_nodes WHERE node_ip = 'IP of slave node';

where 'IP of slave node' is the IP address of the slave node you connected to in step 1.

10. Make a note of the "node_id" field.

11. Type:

UPDATE tbl_nodes SET node_password = 'plaintextpassword' WHERE node_id = 'node ID';

where 'plaintextpassword' is the password you set in step 3 and 'node ID' is the ID you noted down in step 10.

12. Exit from the postgres prompt by pressing Ctrl+D twice.

13. Attempt to remove the node from the cluster again via the web interface.

Related articles


Last modified on Tue, July 19, 2011 « Back