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 cannot be loaded since version 2.* #243

Closed
pachico opened this issue Jul 20, 2020 · 4 comments · Fixed by #246, #250 or grafana/grafana-plugin-repository#690
Closed

Plugin cannot be loaded since version 2.* #243

pachico opened this issue Jul 20, 2020 · 4 comments · Fixed by #246, #250 or grafana/grafana-plugin-repository#690

Comments

@pachico
Copy link

pachico commented Jul 20, 2020

I have tried to load the plugin for both 2.0.1 and 2.0.2 versions but Grafana wont be able to load them.
Error simply says:

t=2020-07-20T11:46:08+0200 lvl=eror msg="Could not find plugin definition for data source: vertamedia-clickhouse-datasource"

We had to roll back to 1.9.5.

Can you have a look?
Thanks in advance

@Slach
Copy link
Collaborator

Slach commented Jul 20, 2020

@pachico
could you describe your setup environment?
which grafana version do you use?
how you install vertamedia-clickhouse-datasource?

where is your plugin directory (by default /var/lib/grafana/plugins)?

could you share results of the following command?

grep -i -r plugin /etc/grafana

@vblazquez
Copy link

@Slach
grafana 7.1.0
OS: ubuntu 16.04
vertamedia-clickhouse-datasource errors with 2.0.1 and 2.0.2. Version 1.9.5 works smoothly
Plugins installed using cli, grafana-cli plugin install vertamedia-clickhouse-datasource, after install we restart the service

Output for 'grep -i -r plugin /etc/grafana'

/etc/grafana/grafana.ini:# Directory where grafana will automatically scan and look for plugins
/etc/grafana/grafana.ini:plugins = /var/lib/grafana/plugins
/etc/grafana/grafana.ini:# for new vesions (grafana itself and plugins), check is used
/etc/grafana/grafana.ini:# in some UI views to notify that grafana or plugin update exists
/etc/grafana/grafana.ini:[plugins]
/etc/grafana/grafana.ini:# Enter a comma-separated list of plugin identifiers to identify plugins that are allowed to be loaded even if they lack a valid signature.
/etc/grafana/grafana.ini:;allow_loading_unsigned_plugins =

Could it be that version 2.0.* need to be specifically allowed?

@Slach
Copy link
Collaborator

Slach commented Jul 20, 2020

@vblazquez please look https://github.com/Vertamedia/clickhouse-grafana#quick-start
add

[plugins]
allow_loading_unsigned_plugins=vertamedia-clickhouse-datasource

to grafana.ini

and run something like this

systemctl stop grafana-server
grafana-cli plugins install vertamedia-clickhouse-datasource 2.0.2
systemctl start grafana-server

@Slach
Copy link
Collaborator

Slach commented Jul 21, 2020

I tried to reproduce update scenario

    set -xeuo pipefail
    export DEBIAN_FRONTEND=noninteractive

    apt-get update
    apt-get install --no-install-recommends -y apt-transport-https ca-certificates software-properties-common curl
    apt-get install --no-install-recommends -y htop ethtool mc curl wget jq socat git


    # clickhouse
    apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E0C56BD4
    echo "deb http://repo.clickhouse.tech/deb/stable/ main/" | tee -a /etc/apt/sources.list.d/clickhouse.list
    apt-get update
    apt-get install --no-install-recommends -y clickhouse-client clickhouse-server

    # grafana
    wget -q -O - https://packages.grafana.com/gpg.key | apt-key add -
    echo "deb https://packages.grafana.com/oss/deb beta main" | tee -a /etc/apt/sources.list.d/grafana.list
    apt-get update
    apt-get install --no-install-recommends -y grafana


    systemctl stop grafana-server
    grafana-cli plugins install vertamedia-clickhouse-datasource 1.9.5
    systemctl start grafana-server
    grafana-cli plugins ls

    echo "GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS=vertamedia-clickhouse-datasource" | tee -a /etc/default/grafana-server

    systemctl stop grafana-server
    grafana-cli plugins update vertamedia-clickhouse-datasource
    systemctl start grafana-server
    grafana-cli plugins ls

with

    echo "GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS=vertamedia-clickhouse-datasource" | tee -a /etc/default/grafana-server

2.0.2 works fine with Grafana 7.1.0
please comment and reopen the issue if this error still reproduce

@Slach Slach closed this as completed Jul 21, 2020
This was referenced Jul 21, 2020
Slach added a commit that referenced this issue Jul 24, 2020
# 2.0.3 (2020-07-24)

## Enhancements:
* add setup notes for Grafana 7.x to README
* add SQL preprocessing logic on browser side with <% js code subset %>, #186, thanks @fgbogdan
* improve alerts query processing for use case when `query(query_name, from, to)` time range is less than visible dashboard time range, see #237
* improve alerts json parsing in golang part for case when we have string fields in response which interprets as series name, see #230
* properly parsing POST queries in golang part of plugin, #228, thanks @it1804


## Fixes:
* add Vagrantfile for statefull environment and allow to upgrade scenario like  grafana 7.1.0 + grafana-cli upgrade-all
  * fix #244
  * fix #243
* add multiple dashboard examples for github issues:
  * fix #240 
  * fix #135 
  * fix #245 
  * fix #238   
  * fix #232
  * fix #127
  * fix #141
Slach added a commit to Altinity/grafana-plugin-repository that referenced this issue Jul 24, 2020
## Enhancements:
* add setup notes for Grafana 7.x to README
* add SQL preprocessing logic on browser side with <% js code subset %>, Altinity/clickhouse-grafana#186, thanks @fgbogdan
* improve alerts query processing for use case when `query(query_name, from, to)` time range is less than visible dashboard time range, see Altinity/clickhouse-grafana#237
* improve alerts json parsing in golang part for case when we have string fields in response which interprets as series name, see Altinity/clickhouse-grafana#230
* properly parsing POST queries in golang part of plugin, Altinity/clickhouse-grafana#228, thanks @it1804

## Fixes:
* add Vagrantfile for statefull environment and allow to upgrade scenario like  grafana 7.1.0 + grafana-cli upgrade-all
  * fix Altinity/clickhouse-grafana#244
  * fix Altinity/clickhouse-grafana#243
* add multiple dashboard examples for github issues:
  * fix Altinity/clickhouse-grafana#240
  * fix Altinity/clickhouse-grafana#135
  * fix Altinity/clickhouse-grafana#245
  * fix Altinity/clickhouse-grafana#238
  * fix Altinity/clickhouse-grafana#232
  * fix Altinity/clickhouse-grafana#127
  * fix Altinity/clickhouse-grafana#141

Signed-off-by: Eugene Klimov <eklimov@altinity.com>
Slach added a commit to Altinity/grafana-plugin-repository that referenced this issue Aug 13, 2020
# 2.1.0 (2020-08-13)

## Enhancement:
* add "Skip comments" checkbox to query editor to pass SQL comments to server, fix Altinity/clickhouse-grafana#265
* add setup notes for Grafana 7.x to README
* add SQL preprocessing logic on browser side with <% js code subset %>, Altinity/clickhouse-grafana#186, thanks @fgbogdan
* improve alerts query processing for use case when `query(query_name, from, to)` time range is less than visible dashboard time range, see Altinity/clickhouse-grafana#237
* improve alerts json parsing in golang part for case when we have string fields in response which interprets as series name, see Altinity/clickhouse-grafana#230
* properly parsing POST queries in golang part of plugin, Altinity/clickhouse-grafana#228, thanks @it1804

## Fixes:
* fix corner cases for $macro + subquery, see Altinity/clickhouse-grafana#276 and Altinity/clickhouse-grafana#277
* fix parallel query execution, see Altinity/clickhouse-grafana#273
* fix identifiers quotes, see Altinity/clickhouse-grafana#276, Altinity/clickhouse-grafana#277
* fix plugin.json for pass `grafana-plugin-repository` plugin validator
* fix multi-value variables behavior - Altinity/clickhouse-grafana#252
* add Vagrantfile for statefull environment and allow to upgrade scenario like  grafana 7.1.0 + grafana-cli upgrade-all
  * fix Altinity/clickhouse-grafana#244
  * fix Altinity/clickhouse-grafana#243
* add multiple dashboard examples for github issues:
  * fix Altinity/clickhouse-grafana#240
  * fix Altinity/clickhouse-grafana#135
  * fix Altinity/clickhouse-grafana#245
  * fix Altinity/clickhouse-grafana#238
  * fix Altinity/clickhouse-grafana#232
  * fix Altinity/clickhouse-grafana#127
  * fix Altinity/clickhouse-grafana#141

Signed-off-by: Eugene Klimov <eklimov@altinity.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants