citus rebalance_table_shards() -> fe_sendauth: no password supplied

Viewed 459

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!

1 Answers

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
Related