3

Version: postgresql 14 and citus 10.2

When I execute

select rebalance_table_shards('tbl_name');

in the CN node, postgresql gives an error message: ERROR: connection to the remote node localhost:5432 failed with the following error: fe_sendauth: no password supplied

what's configurations needed to be added?

  1. Firewall of all nodes are disabled.
  2. local and ipv4 lines in the pg_hba.conf of all nodes have been set to trust.

Thanks!

  • 2
    I fixed it by modified pg_hba.conf, configuring local, ipv4, ipv6 to be trust. – William Que Dec 25 '21 at 07:49
  • 1
    Hello I have the same problem. I set pg_hba.conf as stated here: https://docs.citusdata.com/en/v10.2/installation/multi_node_debian.html#steps-to-be-executed-on-all-nodes But problem persist. Do you have a sample pg_hba.conf file? – Kellad Jul 22 '22 at 08:44

1 Answers1

4

The rebalancer connects to localhost and it seems you don't allow that in pg_hba.conf without a password. There's a few ways you could solve this:

  1. add an entry for localhost to your .pgpass file, with the password for the localhost IP, both for ipv4 and ipv6 (127.0.0.1 and ::1)
  2. add an entry to pg_hba.conf to allow passwordless logins from localhost, by using trust authentication
  3. If you are on Citus 10.1 or higher, you can set citus.local_hostname to something that currently is in your pg_hba.conf file (like the node its public IP). It will then connect to the hostname/IP that you specify there instead of to localhost: https://docs.citusdata.com/en/v10.2/develop/api_guc.html#citus-local-hostname-text
JelteF
  • 3,021
  • 2
  • 27
  • 35