Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Citus master_add_node Authentication Failure with ~/.pgpass File #7567

Open
ku9nov opened this issue Mar 29, 2024 · 1 comment
Open

Citus master_add_node Authentication Failure with ~/.pgpass File #7567

ku9nov opened this issue Mar 29, 2024 · 1 comment

Comments

@ku9nov
Copy link

ku9nov commented Mar 29, 2024

Attempting to configure a simple Citus cluster on Kubernetes (k8s) for testing purposes. The issue arises when utilizing the master_add_node command in the database. Citus fails to fetch data from the ~/.pgpass file, leading to authentication errors. The problem persists regardless of whether the .pgpass file is located in the PostgreSQL user’s home directory or another user’s directory.
I can connect to a worker from the master pod using the following command:

psql --host=citus-worker-0.citus-workers --username=postgres
psql (16.2 (Debian 16.2-1.pgdg120+2))
SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, compression: off)
Type "help" for help.

postgres=# \q

I can connect to a master from the master pod using the following command:

psql --host=citus-master --username=postgres
psql (16.2 (Debian 16.2-1.pgdg120+2))
SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, compression: off)
Type "help" for help.

postgres=# SELECT * from master_add_node('citus-worker-0.citus-workers', 5432);
ERROR:  connection to the remote node citus-worker-0.citus-workers:5432 failed with the following error: FATAL:  password authentication failed for user "postgres"
postgres=# \q

As you can see i have successful connection, but when I'm run the master_add_node command from the master pod, specifying the worker details I have authentication failure.
Expected Behavior:
The master_add_node command should successfully authenticate and add the specified node to the Citus cluster.

Additional Information:
Citus version: citusdata/citus:12.1.2
Contents of the .pgpass file:

cat /var/lib/postgresql/.pgpass
citus-master:5432:*:postgres:dsbhjq632GDHshq8dSH
citus-worker-0.citus-workers:5432:*:postgres:dsbhjq632GDHshq8dSH

More details can be found here (link to your documentation).

Patroni Kubernetes configurations are not desired as they configure the Citus cluster using the Kubernetes API, which is incompatible with a multi-region installation requirement.

@ku9nov
Copy link
Author

ku9nov commented Mar 29, 2024

It's working in: 8.0.0
Not working in: 11, 10.2.5, 10.2.3, 10.0, 9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant