percona / pmm

Percona Monitoring and Management: an open source database monitoring, observability and management tool
https://www.percona.com/software/database-tools/percona-monitoring-and-management
GNU Affero General Public License v3.0
679 stars 131 forks source link

PMM Clickhouse Datasource Exception #1292

Open dwaipayan05 opened 2 years ago

dwaipayan05 commented 2 years ago

Description

We’re currently running PMM on a VM with a docker container running the pmm-server. To embed the dashboards, we have started a proxy VM which basically adds a auth header to all the requests passed on to the PMM Endpoint (percona.domain.in).

While embedding the dashboards, it works fine while using it with dashboard having prometheus data source. However, we’ve been facing a weird issue while querying the Clickhouse based datasource dashboard through the Proxy VM.

Expected Results

The Clickhouse Query should be executed successfully.

Actual Results

Here’s what’s happening

while opening a dashboard on percona.domain.in a query is sent through the following endpoint percona.domain.in/api/datasources/proxy/3?query=‘Clickhouse Query’ while embedding a dashboard on Proxy VM with endpoint proxy.domain.in a query is sent through the following endpoint proxy.domain.in/api/datasources/proxy/3?query=‘Clickhouse Query’ However, while the Query is sent to the API, the following error is thrown by Clickhouse

Poco::Exception. Code: 1000, e.code() = 0, e.displayText() = No authentication information found: Basic authentication expected (version 21.3.14.1 (official build))

To Debug the above error, we went ahead with enabling basic auth in the Clickhouse Datasource. Initially we tried the Datasource config on our percona.domain.in. It ended up working perfectly fine. However, the same config ( basic auth enabled ) threw the same error.

Any suggestions on handling this exception ?

Version

PMMVersion: 2.20.0

Steps to reproduce

Proxy the request sent to PMM for any Clickhouse based Datasource.

Relevant logs

No response

Code of Conduct

BupycHuk commented 2 years ago

Hello, Thank you for the report. Could you please provide more detailed steps to reproduce this? Which Proxy VM have you used? How did you configure it?

Thank you