IBM / ibm-spectrum-scale-bridge-for-grafana

This tool allows the IBM Storage Scale users to perform performance monitoring for IBM Storage Scale devices using third-party applications such as Grafana or Prometheus software.
Apache License 2.0
30 stars 17 forks source link

zimonGrafana issue with V8.0 and Python 3.11 #225

Closed ps20renar closed 3 months ago

ps20renar commented 3 months ago

Describe the bug Zimon-Grafana has problems with python3.11

To Reproduce Steps to reproduce the behavior:

  1. install python3.11-3.11.2-2.el8_8.2.x86_64
  2. Systemctl start zimonGrafana
  3. journalctl -u zimonGrafana
  4. See error

Expected behavior No python errors

Screenshots May 30 22:10:25 sfs00125.lan.huk-coburg.de zimonGrafana[3249995]: 2024-05-30 22:10 - MainThread - INFO - server started May 30 23:42:47 sfs00125.lan.huk-coburg.de zimonGrafana[3249995]: Exception in thread CP Server Thread-7: May 30 23:42:47 sfs00125.lan.huk-coburg.de zimonGrafana[3249995]: Traceback (most recent call last): May 30 23:42:47 sfs00125.lan.huk-coburg.de zimonGrafana[3249995]: File "/usr/local/lib/python3.11/site-packages/cheroot/server.py", line 1277, in communicate May 30 23:42:47 sfs00125.lan.huk-coburg.de zimonGrafana[3249995]: req.parse_request() May 30 23:42:47 sfs00125.lan.huk-coburg.de zimonGrafana[3249995]: File "/usr/local/lib/python3.11/site-packages/cheroot/server.py", line 710, in parse_request May 30 23:42:47 sfs00125.lan.huk-coburg.de zimonGrafana[3249995]: success = self.read_request_line() May 30 23:42:47 sfs00125.lan.huk-coburg.de zimonGrafana[3249995]: ^^^^^^^^^^^^^^^^^^^^^^^^ May 30 23:42:47 sfs00125.lan.huk-coburg.de zimonGrafana[3249995]: File "/usr/local/lib/python3.11/site-packages/cheroot/server.py", line 769, in read_request_line May 30 23:42:47 sfs00125.lan.huk-coburg.de zimonGrafana[3249995]: self.simple_response( May 30 23:42:47 sfs00125.lan.huk-coburg.de zimonGrafana[3249995]: File "/usr/local/lib/python3.11/site-packages/cheroot/server.py", line 1115, in simple_response May 30 23:42:47 sfs00125.lan.huk-coburg.de zimonGrafana[3249995]: self.conn.wfile.write(EMPTY.join(buf)) May 30 23:42:47 sfs00125.lan.huk-coburg.de zimonGrafana[3249995]: File "/usr/local/lib/python3.11/site-packages/cheroot/makefile.py", line 68, in write May 30 23:42:47 sfs00125.lan.huk-coburg.de zimonGrafana[3249995]: res = super().write(val, *args, **kwargs) May 30 23:42:47 sfs00125.lan.huk-coburg.de zimonGrafana[3249995]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ May 30 23:42:47 sfs00125.lan.huk-coburg.de zimonGrafana[3249995]: File "/usr/local/lib/python3.11/site-packages/cheroot/makefile.py", line 24, in write May 30 23:42:47 sfs00125.lan.huk-coburg.de zimonGrafana[3249995]: self._flush_unlocked() May 30 23:42:47 sfs00125.lan.huk-coburg.de zimonGrafana[3249995]: File "/usr/local/lib/python3.11/site-packages/cheroot/makefile.py", line 33, in _flush_unlocked May 30 23:42:47 sfs00125.lan.huk-coburg.de zimonGrafana[3249995]: n = self.raw.write(bytes(self._write_buf)) May 30 23:42:47 sfs00125.lan.huk-coburg.de zimonGrafana[3249995]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ May 30 23:42:47 sfs00125.lan.huk-coburg.de zimonGrafana[3249995]: File "/usr/lib64/python3.11/socket.py", line 724, in write May 30 23:42:47 sfs00125.lan.huk-coburg.de zimonGrafana[3249995]: return self._sock.send(b) May 30 23:42:47 sfs00125.lan.huk-coburg.de zimonGrafana[3249995]: ^^^^^^^^^^^^^^^^^^ May 30 23:42:47 sfs00125.lan.huk-coburg.de zimonGrafana[3249995]: File "/usr/lib64/python3.11/ssl.py", line 1243, in send May 30 23:42:47 sfs00125.lan.huk-coburg.de zimonGrafana[3249995]: return self._sslobj.write(data) May 30 23:42:47 sfs00125.lan.huk-coburg.de zimonGrafana[3249995]: ^^^^^^^^^^^^^^^^^^^^^^^^ May 30 23:42:47 sfs00125.lan.huk-coburg.de zimonGrafana[3249995]: ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:2393) May 30 23:42:47 sfs00125.lan.huk-coburg.de zimonGrafana[3249995]: During handling of the above exception, another exception occurred: May 30 23:42:47 sfs00125.lan.huk-coburg.de zimonGrafana[3249995]: Traceback (most recent call last): May 30 23:42:47 sfs00125.lan.huk-coburg.de zimonGrafana[3249995]: File "/usr/lib64/python3.11/threading.py", line 1038, in _bootstrap_inner May 30 23:42:47 sfs00125.lan.huk-coburg.de zimonGrafana[3249995]: self.run() May 30 23:42:47 sfs00125.lan.huk-coburg.de zimonGrafana[3249995]: File "/usr/local/lib/python3.11/site-packages/cheroot/workers/threadpool.py", line 120, in run May 30 23:42:47 sfs00125.lan.huk-coburg.de zimonGrafana[3249995]: keep_conn_open = conn.communicate() May 30 23:42:47 sfs00125.lan.huk-coburg.de zimonGrafana[3249995]: ^^^^^^^^^^^^^^^^^^

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

Helene commented 3 months ago

Hi @ps20renar, somehow I can not recreate the issue on my system. Grafana-bridge working fine with python3.11.

Could you please paste here the ouput from following commands

# hostnamectl
# pip3.11 list
# python3.11
Python 3.11.2 (main, Feb 17 2023, 09:28:16) [GCC 8.5.0 20210514 (Red Hat 8.5.0-18)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.version
'3.11.2 (main, Feb 17 2023, 09:28:16) [GCC 8.5.0 20210514 (Red Hat 8.5.0-18)]'
>>> sys.version_info
sys.version_info(major=3, minor=11, micro=2, releaselevel='final', serial=0)
>>>
ps20renar commented 3 months ago

hostnamectl Static hostname: node.domain.de Icon name: computer-server Chassis: server Machine ID: 21b954..........d7f97 Boot ID: 2a54a..........2b1a695 Operating System: Red Hat Enterprise Linux 8.8 (Ootpa) CPE OS Name: cpe:/o:redhat:enterprise_linux:8::baseos Kernel: Linux 4.18.0-477.51.1.el8_8.x86_64 Architecture: x86-64

pip3.11 list Package Version


annotated-types 0.7.0 autocommand 2.2.2 cffi 1.15.1 charset-normalizer 2.1.0 cheroot 10.0.0 CherryPy 18.9.0 cryptography 37.0.2 idna 3.4 inflect 7.0.0 jaraco.collections 5.0.0 jaraco.context 4.3.0 jaraco.functools 4.0.0 jaraco.text 3.12.0 lxml 4.9.2 mod-wsgi 4.9.4 more-itertools 10.2.0 numpy 1.23.5 pip 22.3.1 ply 3.11 portend 3.2.0 psycopg2 2.9.3 pycparser 2.20 pydantic 2.7.1 pydantic_core 2.18.2 PyMySQL 1.0.2 PySocks 1.7.1 pytz 2024.1 PyYAML 6.0 requests 2.28.1 SciPy 1.10.0 setuptools 65.5.1 six 1.16.0 tempora 5.5.1 typing_extensions 4.11.0 urllib3 1.26.12 wheel 0.38.4 zc.lockfile 3.0.post1

python3 Python 3.11.2 (main, Sep 14 2023, 10:46:13) [GCC 8.5.0 20210514 (Red Hat 8.5.0-18)] on linux Type "help", "copyright", "credits" or "license" for more information.

import sys sys.version '3.11.2 (main, Sep 14 2023, 10:46:13) [GCC 8.5.0 20210514 (Red Hat 8.5.0-18)]' sys.version_info sys.version_info(major=3, minor=11, micro=2, releaselevel='final', serial=0)

Helene commented 3 months ago

Hallo @ps20renar, I compared Python packages you are using and I have on my mashine. See the differences below. 2 Packages might be causing the problem: cheroot and requests.

Please execute:

pip3.11 install cheroot --upgrade
pip3.11 install requests --upgrade
systemctl restart grafana-bridge

If the problem still exists, I need all logs from /var/log/ibm_bridge_for_grafana

Python packages differences

ps20renar commented 3 months ago

Hallo Helene, this seems to fix this issue, let the issue open for some days I give feedback on Thusday. Regards

ps20renar commented 3 months ago

Hallo Helene, you can close the issue all runs fine. Thanks Renar