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

Plugin health check failed on create datasource #676

Closed
silentsokolov opened this issue Feb 1, 2024 · 5 comments
Closed

Plugin health check failed on create datasource #676

silentsokolov opened this issue Feb 1, 2024 · 5 comments

Comments

@silentsokolov
Copy link

silentsokolov commented Feb 1, 2024

What happened:
We cannot create datasource, after click "Save & Test" get error "Plugin health check failed"

What you expected to happen:
Datasource created

How to reproduce it (as minimally and precisely as possible):

Grafana helm values:

plugins:
  - grafana-clickhouse-datasource
  # - https://grafana.com/api/plugins/grafana-clickhouse-datasource/versions/4.0.0-beta/download;grafana-clickhouse-datasource

grafana.ini:
  paths:
    data: /var/lib/grafana/
    logs: /var/log/grafana
    plugins: /var/lib/grafana/plugins
    provisioning: /etc/grafana/provisioning
  log:
    mode: console
  dataproxy:
    timeout: 6000
    keep_alive_seconds: 300

Connect creds:

github.demo.trial.altinity.cloud:8443
demo:demo

We also used our creds ... the same error

Screenshots
image
image

Environment:

  • Grafana version: Grafana v10.3.1 (00a22ff8b2)
  • Plugin version: stable & 4.0.0-beta
  • OS Grafana is installed on: -
  • User OS & Browser: firefox / chrome
@SpencerTorres
Copy link
Collaborator

Hello! Thank you for submitting a detailed issue, I was able to easily reproduce this.

It's unfortunate that the UI error isn't as detailed, this is something I want to change in a future update. However, it does appear the underlying error gets returned to the browser in the network log. I also verified this to be the error in the plugin logs:

health check failed:
rpc error: code = Unknown desc = clickhouse
[execute]:: 500 code: Code: 452.
DB::Exception: Setting max_execution_time should not be changed. (SETTING_CONSTRAINT_VIOLATION)
(version 23.12.2.59 (official build))

It appears the query timeout is being set to a number that violates the setting constraint. Setting the "query timeout" to 0 seems to fix it. I was also able to get it to work by setting it to 1 (I assume the demo server wants to prevent queries that run longer than 1 second)

query timeout being set to 0

Let me know if this fixes your issue. I'll make note about enhancing the error feedback. Thanks!

@silentsokolov
Copy link
Author

Yep, this setting fixes the error.

@Habeeb556
Copy link

Hello! Thank you for submitting a detailed issue, I was able to easily reproduce this.

It's unfortunate that the UI error isn't as detailed, this is something I want to change in a future update. However, it does appear the underlying error gets returned to the browser in the network log. I also verified this to be the error in the plugin logs:

health check failed:
rpc error: code = Unknown desc = clickhouse
[execute]:: 500 code: Code: 452.
DB::Exception: Setting max_execution_time should not be changed. (SETTING_CONSTRAINT_VIOLATION)
(version 23.12.2.59 (official build))

It appears the query timeout is being set to a number that violates the setting constraint. Setting the "query timeout" to 0 seems to fix it. I was also able to get it to work by setting it to 1 (I assume the demo server wants to prevent queries that run longer than 1 second)

query timeout being set to 0

Let me know if this fixes your issue. I'll make note about enhancing the error feedback. Thanks!

Same issue here, and this setting resolved the error.

@shqnayaz
Copy link

shqnayaz commented Aug 13, 2024

@Habeeb556 @SpencerTorres , I have a same problem, I am unable to locate where is the query timeout settings in grafana,
please advice.

@Habeeb556
Copy link

@shqnayaz open the "Additional settings" in the data source.

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

No branches or pull requests

5 participants