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 unavailable after Save&Test #1604

Closed
wanit2 opened this issue Mar 30, 2023 · 38 comments
Closed

Plugin unavailable after Save&Test #1604

wanit2 opened this issue Mar 30, 2023 · 38 comments
Labels
Milestone

Comments

@wanit2
Copy link

wanit2 commented Mar 30, 2023

Describe the bug
Good afternoon! When I try to connect a data source using the Save&Test button, I get an error like "plugin unavailable". Important point: I installed the your plugin not using "grafana-cli plugins install alexanderzobnin-zabbix-app", becouse I don't have access to internet from my organization, I simply download it, unpack and copy to directory /var/lib/grafana/plugins and restart grafana (systemctl restart grafana-server). My OS is Red Hat Enterprise Linux 8.7. Please tell me what i did wrong?

Expected behavior
Connection success or somthing else like this.

Screenshots
Plugin unavailable

Network data
logger=cleanup t=2023-03-30T17:00:00.735709025+03:00 level=info msg="Completed cleanup jobs" duration=22.879712ms
logger=cleanup t=2023-03-30T17:10:00.733447897+03:00 level=info msg="Completed cleanup jobs" duration=20.527127ms
logger=cleanup t=2023-03-30T17:20:00.733508887+03:00 level=info msg="Completed cleanup jobs" duration=20.646333ms
logger=context userId=1 orgId=1 uname=admin t=2023-03-30T17:28:47.448931142+03:00 level=error msg="Datasource has already been updated by someone else. Please reload and try again" error="trying to update old version of datasource" remote_addr=172.18.10.31 traceID=
logger=context userId=1 orgId=1 uname=admin t=2023-03-30T17:28:47.459906881+03:00 level=info msg="Request Completed" method=PUT path=/api/datasources/uid/Kfslluf4k status=409 remote_addr=172.18.10.31 time_ms=234 duration=234.790866ms size=107 referer=http://sbb-zabbix. ХХХХХХ:3000/datasources/edit/Kfslluf4k handler=/api/datasources/uid/:uid
logger=context userId=1 orgId=1 uname=admin t=2023-03-30T17:28:53.228384855+03:00 level=info msg="Request Completed" method=GET path=/api/live/ws status=-1 remote_addr=172.18.10.31 time_ms=32 duration=32.283468ms size=0 referer= handler=/api/live/ws
logger=context userId=1 orgId=1 uname=admin t=2023-03-30T17:29:00.842645185+03:00 level=warn msg="Plugin unavailable" error="plugin unavailable" traceID=
logger=context userId=1 orgId=1 uname=admin t=2023-03-30T17:29:00.84272287+03:00 level=error msg="Request Completed" method=POST path=/api/datasources/1/resources/zabbix-api status=503 remote_addr=172.18.10.31 time_ms=79 duration=79.323021ms size=46 referer=http://sbb-ХХХХХХ.net:3000/datasources/edit/Kfslluf4k handler=/api/datasources/:id/resources/*

Software versions

Grafana Zabbix Grafana-Zabbix Plugin
9.4.7 6.4.0 4.3.1
@alexanderzobnin
Copy link
Collaborator

Hi! What exactly you downloaded? Zip from release page? This line from logs looks interesting:

logger=context userId=1 orgId=1 uname=admin t=2023-03-30T17:28:47.448931142+03:00 level=error msg="Datasource has already been updated by someone else. Please reload and try again" error="trying to update old version of datasource" remote_addr=172.18.10.31 traceID=

@wanit2
Copy link
Author

wanit2 commented Mar 31, 2023

I downloaded last version - Grafana-Zabbix 4.3.1 from page https://github.com/alexanderzobnin/grafana-zabbix/releases.
The line from log means that two persons managed web-page under one accont "admin".

@virenderdubey
Copy link

We have used Grafana Docker Image which is alpine-based and so not able to use this Zabbix plugin. It always gives the error - Pluging Unavailable.
On Grafana logs it says -- EROR [04-02|11:10:00] Could not start plugin logger=plugin.manager pluginId=alexanderzobnin-zabbix-datasource err="fork/exec /var/lib/grafana/plugins/alexanderzobnin-zabbix-app/zabbix-plugin_linux_amd64: no such file or directory"

However plugin is available on this path -
bash-5.1# ls -l /var/lib/grafana/plugins/alexanderzobnin-zabbix-app/zabbix-plugin_linux_amd64
-rwxr-xr-x 1 grafana root 14856192 Apr 2 10:56 /var/lib/grafana/plugins/alexanderzobnin-zabbix-app/zabbix-plugin_linux_amd64
bash-5.1#

Any suggestion to resolve this ?

@wanit2
Copy link
Author

wanit2 commented Apr 3, 2023

Aleksander, what additional info do you need, for solving this problem? Should we send you any logs or something that can help? Thanks!

@wanit2
Copy link
Author

wanit2 commented Apr 3, 2023

Hi! What exactly you downloaded? Zip from release page? This line from logs looks interesting:

logger=context userId=1 orgId=1 uname=admin t=2023-03-30T17:28:47.448931142+03:00 level=error msg="Datasource has already been updated by someone else. Please reload and try again" error="trying to update old version of datasource" remote_addr=172.18.10.31 traceID=

We have used Grafana Docker Image which is alpine-based and so not able to use this Zabbix plugin. It always gives the error - Pluging Unavailable. On Grafana logs it says -- EROR [04-02|11:10:00] Could not start plugin logger=plugin.manager pluginId=alexanderzobnin-zabbix-datasource err="fork/exec /var/lib/grafana/plugins/alexanderzobnin-zabbix-app/zabbix-plugin_linux_amd64: no such file or directory"

However plugin is available on this path - bash-5.1# ls -l /var/lib/grafana/plugins/alexanderzobnin-zabbix-app/zabbix-plugin_linux_amd64 -rwxr-xr-x 1 grafana root 14856192 Apr 2 10:56 /var/lib/grafana/plugins/alexanderzobnin-zabbix-app/zabbix-plugin_linux_amd64 bash-5.1#

Any suggestion to resolve this ?

Sorry, I have no idea, may be you need to check permissions to the path /var/lib/grafana/plugins/alexanderzobnin-zabbix-app/zabbix-plugin_linux_amd64

@1977er
Copy link

1977er commented Apr 27, 2023

I can reproduce this:

  • Grafana 9.5.1 on Debian Bullseye with nginx 1.24.0 as proxy
  • Zabbix 6.0.17
  • Plugin 4.3.1

I tried

  • dis-/reenabling of the plugin within Grafana
  • removing and reinstalling the plugin via grafana-cli (including service restarts)
  • playing with file ownerships, checking file permissions
  • set loglevel to trace, but no further loginfo than the original issue author stated above

Save&Test always ends in Plugin unavailable.

Can you suggest other things I can try?

@aeliusrs
Copy link

aeliusrs commented Aug 4, 2023

I have the exact same error on Grafana 9.5.5 with zabbix-plugin 4+

I use Nixos as OS, the permission are correctly set on the directory, I've double check the permission settings with another plugins that work.

@randimam
Copy link

randimam commented Aug 11, 2023

Hi @alexanderzobnin , I'm doing a test to integrate zabbix items on grafana dashboard. I'm working RHEL8 server and I'm getting this error always.

image

I've followed following troubleshooting steps but they didn't works;

**1. Firewall disabled & connectivity ok. (ping zabbix_server_ip & telnet zabbix_server_ip 80 are fine)

  1. Review Configuration & it's ok. (curl -k -u username:password http://zabbix_server_ip/zabbix/api_jsonrpc.php is getting Success)

  2. Check Plugin Version Compatibility. It's also good. (grafana-10.0.3 & alexanderzobnin-zabbix-app 4.3.1)

  3. Check Permissions and Ownership of the Zabbix data source directory. (/var/lib/grafana/plugins/)**

image

**5. Restart Grafana, After making any changes or adjustments.

  1. And check Grafana Logs;**
    Aug 11 16:00:07 test grafana[6716]: logger=plugin.instrumentation t=2023-08-11T16:00:07.416588307+05:30 level=info msg="Plugin Request Completed" status=error duration=11.018µs pluginId=alexanderzobnin-zabbix-datasource endpo>
    Aug 11 16:00:07 test grafana[6716]: logger=context userId=1 orgId=1 uname=admin t=2023-08-11T16:00:07.416643571+05:30 level=warn msg="Plugin unavailable" error="plugin unavailable" traceID=
    Aug 11 16:00:07 test grafana[6716]: logger=context userId=1 orgId=1 uname=admin t=2023-08-11T16:00:07.416682722+05:30 level=error msg="Request Completed" method=POST path=/api/datasources/4/resources/zabbix-api status=503 rem>

Is this related to RHEL8 OS?

@aeliusrs
Copy link

hello all !

i've found the solution, and the cause.

on my side it was because the system is hardened and the mount option on /var/lib was set to noexec.

if you got this error try to change the Plugin path of grafana, i set mine on /srv/ and it work perfectly

@randimam
Copy link

randimam commented Aug 14, 2023

Thanks @aeliusrs. Now it's working! :)

[root@test srv]# mkdir grafana
[root@test plugins]# cd grafana
[root@test grafana]# mkdir plugins
[root@test grafana]# cd plugins
[root@test plugins]# grafana cli --pluginsDir "/srv/grafana/plugins" plugins install alexanderzobnin-zabbix-app
[root@test plugins]# chown -R grafana:grafana /srv/grafana
[root@test plugins]# ll
total 4
drwxr-x--- 6 grafana grafana 4096 Aug 14 16:21 alexanderzobnin-zabbix-app
[root@test plugins]# pwd
/srv/grafana/plugins

@HammaBamma
Copy link

I tried all the above and still have the plugin unavailable issue with 4.4.0 on a 10.1.0 Grafana Server. Banging my head trying to think of other things it might be but the output in grafana isn't verbose enough to state why it's unavailable..

@tranquillechat
Copy link

Hello,
Same here grafana 10.1.0, zabbix 6.4.5, plugin 4.4.0 > plugin unavailable when testing the connection to the api.

logger=context userId=1 orgId=1 uname=admin t=2023-08-25T15:52:32.131126354+02:00 level=warn msg="Plugin unavailable" error="plugin unavailable" traceID= logger=context userId=1 orgId=1 uname=admin t=2023-08-25T15:52:32.131275517+02:00 level=error msg="Request Completed" method=POST path=/api/datasources/1/resources/zabbix-api status=503 remote_addr=192.168.1.5 time_ms=1 duration=1.664189ms size=46 referer=https://192.168.1.6:3000/connections/datasources/edit/sxx2cQIGk handler=/api/datasources/:id/resources/*

@aeliusrs
Copy link

guys guys guys, can you return ls -l of the plugin path ? and also check your ACL on it with getfacl ?

also ensure your plugin directy is not on a disk with noexec option, check also SELinux or AppArmor

@tranquillechat
Copy link

The problem appear after an upgrade to grafana 10.0.3 with no plugin upgrade (4.3.0).
Grafana 10.0.3, plugin 4.3.0 > get the plugin unavailable.
Upgrade to 10.1.0 and plugin to 4.4.0 > get the plugin unavailable.

Here the ACL
I already change the owner:group to grafana. I dont have touch the ACL.

root@zabbix2:/var/lib/grafana/plugins# ls -lsa
total 52
4 drwxr-x--- 13 grafana grafana 4096 août 25 16:16 .
4 drwxr-xr-x 7 grafana grafana 4096 août 25 16:16 ..
4 drwxr-xr-x 6 grafana grafana 4096 août 25 10:19 alexanderzobnin-zabbix-app
4 drwxr-xr-x 4 grafana grafana 4096 mars 14 2022 blackmirror1-statusbygroup-panel
4 drwxr-xr-x 3 grafana grafana 4096 mars 14 2022 grafana-clock-panel
4 drwxr-xr-x 4 grafana grafana 4096 mars 14 2022 grafana-image-renderer
4 drwxr-xr-x 3 grafana grafana 4096 juin 22 16:53 grafana-polystat-panel
4 drwxr-xr-x 7 grafana grafana 4096 août 3 11:16 grafana-worldmap-panel
4 drwxr-xr-x 3 grafana grafana 4096 août 3 11:13 marcusolsson-json-datasource
4 drwxr-xr-x 3 grafana grafana 4096 août 1 09:51 mtanda-histogram-panel
4 drwxr-xr-x 3 grafana grafana 4096 août 3 11:07 simpod-json-datasource
4 drwxr-xr-x 5 grafana grafana 4096 juin 22 16:56 snuids-trafficlights-panel
4 drwxr-xr-x 4 grafana grafana 4096 mars 14 2022 vonage-status-panel

root@zabbix2:/var/lib/grafana/plugins# getfacl .

file: .

owner: grafana

group: grafana

user::rwx
group::r-x
other::---

root@zabbix2:/var/lib/grafana/plugins# getfacl alexanderzobnin-zabbix-app/

file: alexanderzobnin-zabbix-app/

owner: grafana

group: grafana

user::rwx
group::r-x
other::r-x

root@zabbix2:/var/lib/grafana/plugins/alexanderzobnin-zabbix-app# ls -lsa
total 132420
4 drwxr-xr-x 6 grafana grafana 4096 août 25 10:19 .
4 drwxr-x--- 13 grafana grafana 4096 août 25 16:16 ..
40 -rw-r--r-- 1 grafana grafana 37580 août 25 10:19 CHANGELOG.md
4 drwxr-xr-x 3 grafana grafana 4096 août 25 10:19 datasource
18236 -rwxr-xr-x 1 grafana grafana 18671904 août 25 10:19 gpx_zabbix-plugin_darwin_amd64
18148 -rwxr-xr-x 1 grafana grafana 18580690 août 25 10:19 gpx_zabbix-plugin_darwin_arm64
16284 -rwxr-xr-x 1 grafana grafana 16674816 août 25 10:19 gpx_zabbix-plugin_freebsd_amd64
15680 -rwxr-xr-x 1 grafana grafana 16056320 août 25 10:19 gpx_zabbix-plugin_freebsd_arm64
16356 -rwxr-xr-x 1 grafana grafana 16748544 août 25 10:19 gpx_zabbix-plugin_linux_amd64
15296 -rwxr-xr-x 1 grafana grafana 15663104 août 25 10:19 gpx_zabbix-plugin_linux_arm
15680 -rwxr-xr-x 1 grafana grafana 16056320 août 25 10:19 gpx_zabbix-plugin_linux_arm64
16644 -rwxr-xr-x 1 grafana grafana 17042944 août 25 10:19 gpx_zabbix-plugin_windows_amd64.exe
4 drwxr-xr-x 2 grafana grafana 4096 août 25 10:19 img
12 -rw-r--r-- 1 grafana grafana 11379 août 25 10:19 LICENSE
4 -rw-r--r-- 1 grafana grafana 3891 août 25 10:19 MANIFEST.txt
4 -rw-r--r-- 1 grafana grafana 921 août 25 10:19 module.js
4 -rw-r--r-- 1 grafana grafana 3807 août 25 10:19 module.js.map
4 drwxr-xr-x 3 grafana grafana 4096 août 25 10:19 panel-triggers
4 -rw-r--r-- 1 grafana grafana 1696 août 25 10:19 plugin.json
4 -rw-r--r-- 1 grafana grafana 3671 août 25 10:19 README.md
4 drwxr-xr-x 2 grafana grafana 4096 août 25 10:19 styles

I dont have any noexec on the /var/lib
appamor is enable, but, not link with grafana or zabbix
AND, i have 2 others clients with the same environnement, same version zabbix, grafana, plugin, and i dont have the issue.

In verbose mode :
logger=accesscontrol.evaluator t=2023-08-25T16:13:32.24542264+02:00 level=debug msg="matched scope" userscope=datasources:* targetscope=datasources:uid:sxx2cQIGk
logger=datasources t=2023-08-25T16:13:32.245567265+02:00 level=debug msg="Received command to update data source" url=http://127.0.0.1/zabbix/api_jsonrpc.php
logger=datasource t=2023-08-25T16:13:32.245596246+02:00 level=debug msg="Applying default URL parsing for this data source type" type=alexanderzobnin-zabbix-datasource url=http://127.0.0.1/zabbix/api_jsonrpc.php
logger=sqlstore.session t=2023-08-25T16:13:32.246029951+02:00 level=debug msg="reusing existing session" transaction=true
logger=sqlstore.session t=2023-08-25T16:13:32.280070643+02:00 level=debug msg="reusing existing session" transaction=true
logger=secrets.kvstore t=2023-08-25T16:13:32.286331714+02:00 level=debug msg="got secret value" orgId=1 type=datasource namespace=Zabbix
logger=sqlstore.session t=2023-08-25T16:13:32.292574451+02:00 level=debug msg="reusing existing session" transaction=true
logger=sqlstore.session t=2023-08-25T16:13:32.299409347+02:00 level=debug msg="reusing existing session" transaction=true
logger=secrets.kvstore t=2023-08-25T16:13:32.299859228+02:00 level=debug msg="secret value updated" orgId=1 type=datasource namespace=Zabbix
logger=sqlstore.transactions t=2023-08-25T16:13:32.299890929+02:00 level=debug msg="skip committing the transaction because it belongs to a session created in the outer scope"
logger=sqlstore.transactions t=2023-08-25T16:13:32.29991124+02:00 level=debug msg="skip committing the transaction because it belongs to a session created in the outer scope"
logger=secrets.kvstore t=2023-08-25T16:13:32.31627007+02:00 level=debug msg="got secret value from cache" orgId=1 type=datasource namespace=Zabbix
logger=auth t=2023-08-25T16:13:32.316372268+02:00 level=debug msg="token needs rotation" tokenId=119 authTokenSeen=true rotatedAt=2023-08-25T16:02:16+02:00
logger=auth t=2023-08-25T16:13:32.329967454+02:00 level=debug msg="auth token rotated" affected=1 auth_token_id=119 userId=1
logger=auth.client.session t=2023-08-25T16:13:32.33003228+02:00 level=debug msg="rotated session token" user=user:1
logger=auth t=2023-08-25T16:13:32.356036453+02:00 level=debug msg="seen token" tokenId=119 userId=1 clientIP=192.168.1.57 userAgent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36" authToken=1468c1526552036e0a5e8cff38aa215f8a2048b2223e782b3462406ef6add109
logger=accesscontrol.service t=2023-08-25T16:13:32.35630771+02:00 level=debug msg="using cached permissions" key=rbac-permissions-1-user-1
logger=accesscontrol.service t=2023-08-25T16:13:32.366679742+02:00 level=debug msg="using cached permissions" key=rbac-permissions-1-user-1
logger=accesscontrol.evaluator t=2023-08-25T16:13:32.366934463+02:00 level=debug msg="matched scope" userscope=datasources:* targetscope=datasources:uid:sxx2cQIGk
logger=secrets.kvstore t=2023-08-25T16:13:32.367468191+02:00 level=debug msg="got secret value from cache" orgId=1 type=datasource namespace=Zabbix
logger=accesscontrol.service t=2023-08-25T16:13:32.375008943+02:00 level=debug msg="using cached permissions" key=rbac-permissions-1-user-1
logger=datasources t=2023-08-25T16:13:32.375184228+02:00 level=debug msg="Querying for data source via SQL store" id=1 orgId=1
logger=secrets.kvstore t=2023-08-25T16:13:32.375568842+02:00 level=debug msg="got secret value from cache" orgId=1 type=datasource namespace=Zabbix
logger=context userId=1 orgId=1 uname=admin t=2023-08-25T16:13:32.375696355+02:00 level=warn msg="Plugin unavailable" error="plugin unavailable" traceID=
logger=context userId=1 orgId=1 uname=admin t=2023-08-25T16:13:32.375753387+02:00 level=error msg="Request Completed" method=POST path=/api/datasources/1/resources/zabbix-api status=503 remote_addr=192.168.1.57 time_ms=1 duration=1.258659ms size=46 referer=https://192.168.1.63:3000/connections/datasources/edit/sxx2cQIGk handler=/api/datasources/:id/resources/*

At the line "logger=datasource t=2023-08-25T16:13:32.245596246+02:00 level=debug msg="Applying default URL parsing for this data source type" type=alexanderzobnin-zabbix-datasource url=http://127.0.0.1/zabbix/api_jsonrpc.php", this is correct or the reference is for an older plugin version or this is just a reference name ?

Thanks you by advance

@NIBORSON
Copy link

NIBORSON commented Aug 25, 2023

Hello guys
I have the same problem

Zabbix_server (Zabbix) 6.4.6
Grafana Server Version 10.0.3 (on the same server)
grafana-zabbix plugin 4.4.0

OS= Oracle Linux 8.8
5.4.17-2136.321.4.1.el8uek.x86_64

@aeliusrs
Copy link

@tranquillechat,

j'avais le meme cas, ma solution comme expliqué plus haut et de bouger le répertoire de pkugin de grafana vers /srv ou /opt, y a pas mal de système qui ont des sécurité sur /var/lib

un autre point qui peu etre problèmatique c'est l'architecture de ton système, est-ce que tu peu me faire un uname -a et un ls dans le répertoire du plugins ?

@ThomasJPF
Copy link

ThomasJPF commented Aug 25, 2023

Estou com esse mesmo problema, plugin 4.4.0, zabbix, 6.2.9, grafana Grafana v10.1.0. Instalo e fica aparecendo Plugin unavailable na conexão ja existente.

Dei reboot na minha maquina e voltou sem o plugin, tento instalar agora, e fica dando esse erro na versão mais recente, tentei instalar uma versão anterior via cli, porem sem resultado, eu instalo o plugin, a pasta aparece no local dos plugins, tudo la dentro certinho, mas não aparece na interface, fica como se o plugin não estivesse instalado.

@ThomasJPF
Copy link

I have the same problem, plugin 4.4.0, zabbix, 6.2.9, grafana Grafana v10.1.0. I install it and it keeps showing Plugin unavailable in the existing connection.

I rebooted my machine and it came back without the plugin, I try to install it now, and it keeps giving this error in the latest version, I tried to install a previous version via cli, but without result, I install the plugin, the folder appears in the plugins location, everything in there, but it doesn't appear in the interface, it's as if the plugin wasn't installed.

@tranquillechat
Copy link

@aeliusrs,

I tried your solution with /srv/grafana/plugins/ with rights grafana:grafana on /srv/grafana, set grafana.ini to load this plugin folder, but same result.

I revert, same result, but here what you ask :)

root@zabbix2:/var/lib/grafana/plugins/alexanderzobnin-zabbix-app# uname -a
Linux zabbix2 5.4.0-156-generic #173-Ubuntu SMP Tue Jul 11 07:25:22 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
root@zabbix2:/var/lib/grafana/plugins/alexanderzobnin-zabbix-app# ls
CHANGELOG.md gpx_zabbix-plugin_darwin_arm64 gpx_zabbix-plugin_linux_amd64 gpx_zabbix-plugin_windows_amd64.exe MANIFEST.txt panel-triggers styles
datasource gpx_zabbix-plugin_freebsd_amd64 gpx_zabbix-plugin_linux_arm img module.js plugin.json
gpx_zabbix-plugin_darwin_amd64 gpx_zabbix-plugin_freebsd_arm64 gpx_zabbix-plugin_linux_arm64 LICENSE module.js.map README.md

Thank you,

@aeliusrs
Copy link

humm this binary gpx_zabbix-plugin_freebsd_amd64 should do the trick, can you tried to execute it manually ?

like ./gpx_zabbix-plugin_freebsd_amd64 in the directory ? it might give you more insight about what goes wrong

@HammaBamma
Copy link

That worked.. I ran the file directly, my Libc was not up as much as it was required to be, mainly cuz I was running on a box I hadn't wanted to do a release upgrade on for awhile.. Resolved my problem, and all is well in the world.. LibC out of date, who would have thunk it.. ;) .

@1977er
Copy link

1977er commented Aug 26, 2023

humm this binary gpx_zabbix-plugin_freebsd_amd64 should do the trick, can you tried to execute it manually ?

That was helpful, thank you. In addition to strace, which gave me a EACCESS, Permission denied, although x attribute was set, I could finally identify a noexec option on the mountpoint the plugin directory was mounted to.

@tranquillechat
Copy link

Hello,

So, for me, when i tried ./gpx_zabbix-plugin_linux_amd64
Plugin cant launch do to dependencies or version.

root@zabbix2:/var/lib/grafana/plugins/alexanderzobnin-zabbix-app# ./gpx_zabbix-plugin_linux_amd64
./gpx_zabbix-plugin_linux_amd64: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by ./gpx_zabbix-plugin_linux_amd64)
./gpx_zabbix-plugin_linux_amd64: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by ./gpx_zabbix-plugin_linux_amd64)

GLIBC - installed is 2.31 and is not compatible, after research i decide to upgrade to 22.04 from 20.04 (ubuntu mate, dont ask me why is on mate...)

After successful update > Problem solved.
Plugins located in : /var/lib/grafana/plugins

GLIBC version after upgrade :

root@zabbix2:/home/administrator#  ldd --version
ldd (Ubuntu GLIBC 2.35-0ubuntu3.1) 2.35
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.

image

So, to have a more specific error, you need to launch the plugin regarding your environnement :

root@zabbix2:/var/lib/grafana/plugins/alexanderzobnin-zabbix-app# ls -lsa
total 132420
    4 drwxr-xr-x  6 grafana grafana     4096 août  25 22:29 .
    4 drwxr-x--- 13 grafana grafana     4096 août  25 22:29 ..
   40 -rw-r--r--  1 grafana grafana    37580 août  25 22:29 CHANGELOG.md
    4 drwxr-xr-x  3 grafana grafana     4096 août  25 22:29 datasource
18236 -rwxr-xr-x  1 grafana grafana 18671904 août  25 22:29 gpx_zabbix-plugin_darwin_amd64
18148 -rwxr-xr-x  1 grafana grafana 18580690 août  25 22:29 gpx_zabbix-plugin_darwin_arm64
16284 -rwxr-xr-x  1 grafana grafana 16674816 août  25 22:29 gpx_zabbix-plugin_freebsd_amd64
15680 -rwxr-xr-x  1 grafana grafana 16056320 août  25 22:29 gpx_zabbix-plugin_freebsd_arm64
16356 -rwxr-xr-x  1 grafana grafana 16748544 août  25 22:29 gpx_zabbix-plugin_linux_amd64
15296 -rwxr-xr-x  1 grafana grafana 15663104 août  25 22:29 gpx_zabbix-plugin_linux_arm
15680 -rwxr-xr-x  1 grafana grafana 16056320 août  25 22:29 gpx_zabbix-plugin_linux_arm64
16644 -rwxr-xr-x  1 grafana grafana 17042944 août  25 22:29 gpx_zabbix-plugin_windows_amd64.exe

Execute like this :
./var/lib/grafana/plugins/alexanderzobnin-zabbix-app/gpx_zabbix-plugin_linux_amd64

root@zabbix2:/var/lib/grafana/plugins/alexanderzobnin-zabbix-app# ./gpx_zabbix-plugin_linux_amd64
{"@level":"debug","@message":"Profiler","@timestamp":"2023-08-26T13:06:12.055048+02:00","enabled":false}
{"@level":"debug","@message":"Starting Zabbix datasource","@timestamp":"2023-08-26T13:06:12.055101+02:00"}
{"@level":"debug","@message":"Serving plugin","@timestamp":"2023-08-26T13:06:12.055124+02:00","plugins":["diagnostics","resource","data"]}
This binary is a plugin. These are not meant to be executed directly.
Please execute the program that consumes these plugins, which will
load any plugins automatically

Here its OK

Thank you very much, especially to @aeliusrs and @HammaBamma

@ThomasJPF
Copy link

ThomasJPF commented Aug 26, 2023

image
Uso Debian, e estou com o mesmo erro, como posso resolver?

I use Debian, and I have the same error, how can I solve it?

image

image

@tranquillechat
Copy link

Uso Debian, e estou com o mesmo erro, como posso resolver?

I dont understand your language :) but

You have the same problem as me, you need to install or upgrade to GLIBC 2.32 minimum.
https://www.gnu.org/software/libc/

Regards,

@ThomasJPF
Copy link

Sorry, I'll try to write in English, it's not very good, but here we go.

I did the installation according to the website, but I keep getting the same error.

image

image

@whys-github
Copy link

new install:
Rocky 8.8
Zabbix 6.0.21
Grafana v10.1.0
Zabbix plugin for Grafana 4.4.0

After enabling the plugin when I try to configure the Zabbix data source I get the plugin unavailable error message:
Screenshot from 2023-08-28 19-31-33

when I try to run gpx_zabbix-plugin_linux_amd64 from the terminal I get this error:

$ /var/lib/grafana/plugins/alexanderzobnin-zabbix-app/gpx_zabbix-plugin_linux_amd64
/var/lib/grafana/plugins/alexanderzobnin-zabbix-app/gpx_zabbix-plugin_linux_amd64: /lib64/libc.so.6: version `GLIBC_2.32' not found (required by /var/lib/grafana/plugins/alexanderzobnin-zabbix-app/gpx_zabbix-plugin_linux_amd64)
/var/lib/grafana/plugins/alexanderzobnin-zabbix-app/gpx_zabbix-plugin_linux_amd64: /lib64/libc.so.6: version `GLIBC_2.34' not found (required by /var/lib/grafana/plugins/alexanderzobnin-zabbix-app/gpx_zabbix-plugin_linux_amd64)

The current glibc package on Rocky Linux 8.8 is glibc-2.28-225.el8.x86_64
According to this reply from the Rocky forums https://forums.rockylinux.org/t/upgrade-glibc-2-28-to-2-29/7558/2

You cannot upgrade your version of glibc. Each release of Rocky Linux is locked to a specific glibc and upgrading will break the system

So what does that mean? do I need to ditch Rocky 8 in favor of Rocky 9 which runs glibc-2.34 or is this a fixable issue?

@HammaBamma
Copy link

That or you need to roll back to another version of this package, that supports an older Libc.. I upgraded my Ubuntu from 16.04 (wayyyy old and out of date), all the way up to 22.04, before it finally had a version of libc that was current and supported by this plugin..

@ThomasJPF
Copy link

Hi guys, I think I figured out the solution, I'll upload it here later.

@ThomasJPF
Copy link

ThomasJPF commented Aug 29, 2023

It's basically what the friend had already said above, but I'll give details on how to solve it.

Check the version of lld by running the command:

ldd --version

My case I'm using debian, update lld to the latest version, acceptable:

echo "deb http://ftp.debian.org/debian sid main" >> /etc/apt/sources.list
apt-get update
apt-get -t sid install libc6 libc6-dev libc6-dbg

This procedure must be done inside the plugin folder

You must run the GPX that corresponds to your OS:

./gpx_zabbix-plugin_linux_amd64

> root@frontzabbix:/var/lib/grafana/plugins/alexanderzobnin-zabbix-app# ./gpx_zabbix-plugin_linux_amd64 
> {"@level":"debug","@message":"Profiler","@timestamp":"2023-08-29T09:24:50.970009-04:00","enabled":false}
> {"@level":"debug","@message":"Starting Zabbix datasource","@timestamp":"2023-08-29T09:24:50.970615-04:00"}
> {"@level":"debug","@message":"Serving plugin","@timestamp":"2023-08-29T09:24:50.971060-04:00","plugins":["resource","data","diagnostics"]}
> This binary is a plugin. These are not meant to be executed directly.
> Please execute the program that consumes these plugins, which will
> load any plugins automatically

Try to run the plugin again...

Commands must be run with root permission.

@alexanderzobnin
Copy link
Collaborator

Ok, it seems it's a build issue. I compared 4.3.1 and 4.4.0, so 4.3.1 built with go 1.19 and latest one is built with 1.20. There's a relevant issue in golang repo, glibc is a dependency of go when it built with default CGO_ENABLED flag. I double checked and it's possible to skip this and build with CGO_ENABLED=0 which builds executable without dynamic dependency of glibc. So I'll rebuild plugin and perform new release with CGO disabled. It should solve a problem. As was suggested, workarounds are:

  • Upgrade glibc
  • downgrade plugin

This was referenced Aug 29, 2023
@alexanderzobnin
Copy link
Collaborator

I've published a new release that should fix an issue. I tested out on Grafana Cloud, now it works, so please, update and test in your environment.

@onlime
Copy link

onlime commented Aug 30, 2023

🙏 Thanks a lot @alexanderzobnin – Confirming this working on my Debian Bullseye / Grafana 10.1.0
Guess you can close this isue.

@xandrewkz
Copy link

Why I can't update plugin to this version on local server via:
grafana-cli plugins update alexanderzobnin-zabbix-app ?
I have v.4.3.1 now and grafana don't see a newer version in official repo.
Writing "alexanderzobnin-zabbix-app is up to date" and staying on 4.3.1 version...

@randimam
Copy link

Thanks @aeliusrs. Now it's working! :)

[root@test srv]# mkdir grafana [root@test plugins]# cd grafana [root@test grafana]# mkdir plugins [root@test grafana]# cd plugins [root@test plugins]# grafana cli --pluginsDir "/srv/grafana/plugins" plugins install alexanderzobnin-zabbix-app [root@test plugins]# chown -R grafana:grafana /srv/grafana [root@test plugins]# ll total 4 drwxr-x--- 6 grafana grafana 4096 Aug 14 16:21 alexanderzobnin-zabbix-app [root@test plugins]# pwd /srv/grafana/plugins

Need to change plugin directory;

vi /etc/grafana/grafana.ini

systemctl restart grafana-server.service

image

@fullstackdevsalmoh
Copy link

same issue here,
I have grafana installed on win 10
zabbix on debian with link like: http://x.x.x.x:8080/zabbix/api_jsonrpc.php

can anyone help please

@clomarmatheus
Copy link

Estou com mesmo problema, quando tento fazer a integraçao do Zabbix no Grafana da o Erro "plugin unavailable".
Erro

Estou utilizando as versões abaixo:

zabbix_server (Zabbix) 6.0.29
Revision e8261478baa 22 April 2024, compilation time: Apr 22 2024 09:56:25

Pacotes instalados
Nome : grafan
Versão : 9.2.10

CentOS Stream release 8

@clomarmatheus
Copy link

Pessoal consegui resolver o problema, tive que baixar outra versão do Grafana, usei a versão grafana-9.3.6

https://grafana.com/grafana/download/9.3.6?edition=oss

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

No branches or pull requests