grafana-kafka-datasource icon indicating copy to clipboard operation
grafana-kafka-datasource copied to clipboard

[BUG] Plugin Unavailable

Open daya-kulkarni opened this issue 1 year ago • 11 comments

Describe the bug I am trying to use the backend plugin on version 9.3.4 and 9.4.2. In both cases I am getting an error that says that plugin in availble when i try to create and save the new datasource. I have installed the plugin two ways one one grafana version i have installed the folder way (manually) in the plugins dir and the other version via the grafana-cli command. Both show the datasource as an option but dont let me actually use it as I see the error below (in screenshot).

To Reproduce Steps to reproduce the behavior:

  1. Go to Setting
  2. Click on datasources
  3. Click on add new datasource button
  4. Search/filter for Kafka and click on datasource
  5. Add server (broker --> localhost:9092)
  6. Click save and test
  7. See error

Expected behavior We should see the plugin be available and say datasouce added (green message)

Screenshots image Desktop Information:

  • OS: Ubuntu 20.04
  • Browser: chrome
  • Plugin Version: 0.2.0
  • Grafana Version: 9.4.2 && 9.3.4

Addtional Context Do I need certain permissions that the server runs at?

daya-kulkarni avatar Mar 13 '23 23:03 daya-kulkarni

I use Grafana that version is 9.4.3,the same error also appears,that sucks!

ustbly avatar Mar 27 '23 02:03 ustbly

This is also happening when running grafana from a docker image. Any clue about what the root cause might be?

tanis2000 avatar Apr 18 '23 10:04 tanis2000

Anyone have resolved the problem?

jessechencx avatar May 29 '23 12:05 jessechencx

I found out what the issue is. At least in my case. It looks like the Grafana docker image is built for arm64 (I am running it on an Apple Silicon chip) but the plugin is only amd64, which means that it will fail badly.

One workaround is to force the Grafana instance to run with the amd64 image. It will be slower but it will work.

My compose file looks like the following:

version: '2'
services:
  grafana:
    image: 'grafana/grafana-oss:latest'
    ports:
      - '3000:3000'
    environment:
      - GF_INSTALL_PLUGINS=hamedkarbasi93-kafka-datasource
    platform: 'linux/amd64'

tanis2000 avatar May 29 '23 15:05 tanis2000

I think it cause of this

lvl=eror msg="Failed to start plugin" logger=plugins.backend pluginId=hamedkarbasi93-kafka-datasource error="fork/exec /var/lib/grafana/plugins/hamedkarbasi93-kafka-datasource/gpx_kafka-datasource_linux_arm64: no such file or directory"

but in my plugins dir it was gpx_kafka-datasource_linux_amd64

it need arm64 cause of running on apple silicon but this plugin didn`t available on arm64 just amd64 so we have to change our docker platform like @tanis2000 's saying (on my above) and it was good solutions

0BVer avatar Jun 09 '23 07:06 0BVer

same error,any clues to fix it ?

Grafana version: Grafana v10.0.3 (eb8dd72637) OS version: WSL (Ubuntu-18.04)

image

error log:

ERROR[08-16|10:00:06] Plugin unavailable      logger=context userId=1 orgId=1 uname=admin error="plugin unavailable" remote_addr=[::1] traceID=
ERROR[08-16|10:00:06] Request Completed       logger=context userId=1 orgId=1 uname=admin method=GET path=/api/datasources/uid/de842521-1119-4baa-9537-743196b59b83/health status=503 remote_addr=[::1] time_ms=0 duration=611.497µs size=45 referer=http://localhost:3000/datasources/edit/de842521-1119-4baa-9537-743196b59b83 handler=/api/datasources/uid/:uid/health

caolizhi avatar Aug 16 '23 02:08 caolizhi

I tried to force the platform as stated but the problem still persists. I also tried installing both versions OSS and Enterprise on my local machine to verify that it wasn't somenthing from docker, but always the same problem.

I found out what the issue is. At least in my case. It looks like the Grafana docker image is built for arm64 (I am running it on an Apple Silicon chip) but the plugin is only amd64, which means that it will fail badly.

One workaround is to force the Grafana instance to run with the amd64 image. It will be slower but it will work.

My compose file looks like the following:

version: '2'
services:
  grafana:
    image: 'grafana/grafana-oss:latest'
    ports:
      - '3000:3000'
    environment:
      - GF_INSTALL_PLUGINS=hamedkarbasi93-kafka-datasource
    platform: 'linux/amd64'

image

Error log

poc-grafana-grafana-1  | logger=http.server t=2023-12-13T17:41:07.995532093Z level=error msg="Failed to parse user ID" error="identifier is not initialized"
poc-grafana-grafana-1  | logger=plugin.hamedkarbasi93-kafka-datasource t=2023-12-13T17:46:01.646671212Z level=info msg="CheckHealth called" request="map[PluginContext:map[AppInstanceSettings:<nil> DataSourceInstanceSettings:map[BasicAuthEnabled:false BasicAuthUser: Database: DecryptedSecureJSONData:<nil> ID:1 JSONData:map[bootstrapServers:localhost:9094] Name:Kafka-Broker UID:dd866e42-dd74-4acd-b0d8-a7a5e2841aff URL: Updated:2023-12-13T17:46:01Z User:] OrgID:1 PluginID:hamedkarbasi93-kafka-datasource User:map[Email:admin@localhost Login:admin Name:admin Role:Admin]]]"
poc-grafana-grafana-1  | logger=context userId=1 orgId=1 uname=admin t=2023-12-13T17:46:01.85672401Z level=info msg="Request Completed" method=GET path=/api/datasources/uid/dd866e42-dd74-4acd-b0d8-a7a5e2841aff/health status=400 remote_addr=172.23.0.1 time_ms=221 duration=221.316205ms size=61 referer=http://localhost:3000/connections/datasources/edit/dd866e42-dd74-4acd-b0d8-a7a5e2841aff handler=/api/datasources/uid/:uid/health

sergiotravassos avatar Dec 13 '23 17:12 sergiotravassos

I ran the arch command and got x86_64, but I still can't use the plugins.

peipei30 avatar Dec 29 '23 07:12 peipei30

Hi

It looks like this project is not being maintaned any more. I was looking at putting some time into fixing the bugs and adding some more features. Would anyone support this by helping with testing ?

Thansk

john

jpbourke avatar Feb 06 '24 17:02 jpbourke

[root@bigdata114 hamedkarbasi93-kafka-datasource]# ./gpx_kafka-datasource_linux_amd64 ./gpx_kafka-datasource_linux_amd64: /lib64/libm.so.6: version GLIBC_2.29' not found (required by ./gpx_kafka-datasource_linux_amd64) ./gpx_kafka-datasource_linux_amd64: /lib64/libc.so.6: version GLIBC_2.25' not found (required by ./gpx_kafka-datasource_linux_amd64) You have mail in /var/spool/mail/root [root@bigdata114 hamedkarbasi93-kafka-datasource]# ldd --version ldd (GNU libc) 2.17

my glibc version not high enough

gaohan0524 avatar Jul 03 '24 07:07 gaohan0524

[root@bigdata114 hamedkarbasi93-kafka-datasource]# ./gpx_kafka-datasource_linux_amd64 ./gpx_kafka-datasource_linux_amd64: /lib64/libm.so.6: version GLIBC_2.29' not found (required by ./gpx_kafka-datasource_linux_amd64) ./gpx_kafka-datasource_linux_amd64: /lib64/libc.so.6: version GLIBC_2.25' not found (required by ./gpx_kafka-datasource_linux_amd64) You have mail in /var/spool/mail/root [root@bigdata114 hamedkarbasi93-kafka-datasource]# ldd --version ldd (GNU libc) 2.17

my glibc version not high enough

I see the same on RHEL 8

royborgen avatar Sep 09 '24 10:09 royborgen