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

Trouble connecting Clickhouse to SSL-enabled PostgreSQL Table: How to fix? #50528

Open
zcoder opened this issue Jun 3, 2023 · 1 comment
Open
Labels
question Question?

Comments

@zcoder
Copy link

zcoder commented Jun 3, 2023

Hello, respected Clickhouse developers and experts!

I've encountered an issue while connecting Clickhouse to a table in PostgreSQL. I use the following query to create the table:

CREATE TABLE if not exists {table_name} as postgresql('127.0.0.1:5432', 'postgres', 'transactions', 'postgres', {PASSWORD});

It works fine!

However, when I try to repeat this process on the production server where SSL connection is required, I receive the following error:

failed: FATAL:  SASL authentication failed
failed: FATAL:  SSL required
. (POSTGRESQL_CONNECTION_FAILURE) (version 23.4.2.11 (official build))

error.log + server.log

Clickhouse is currently running locally in Docker.
I've searched through all the available documentation, reviews, opinions, chatGPT answers, and most of the issues related to this topic, but the answer has eluded me. I haven't found a parameter that would allow using SSL.

I'm turning to you with a request for help with this problem. How do I properly set up an SSL connection to PostgreSQL from Clickhouse?

I want to add that I'm committed to contributing to the Clickhouse community. If a solution is found, I take upon myself the responsibility to ensure it's incorporated into the Clickhouse documentation.

Thank you in advance for any help and recommendations!

@zcoder zcoder added the question Question? label Jun 3, 2023
@zcoder
Copy link
Author

zcoder commented Jun 3, 2023

At this point, I suspect that the issue might be linked to the current version of Clickhouse (version 23.4.2.11 (official build)) using an outdated version of the pqxx library, which hasn't been updated in Clickhouse's master branch for the last two years. Interestingly, the library itself has recently added SSL support as seen in this commit.

Could this be a possible lead to the root cause of my issue?

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

No branches or pull requests

1 participant