graphite-project / graphite-web

A highly scalable real-time graphing system
http://graphite.readthedocs.org/
Apache License 2.0
5.89k stars 1.26k forks source link

Can't load WSGI script in Apache2 [BUG] #2756

Closed jbartak closed 2 years ago

jbartak commented 2 years ago

Describe the bug Can't run graphite-web via Apache WSGI script.

To Reproduce Follow https://graphite.readthedocs.io/en/latest/install-pip.html#installing-in-the-default-location.

Expected behavior Working WSGI script.

Screenshots N/A

Environment (please complete the following information):

Additional context

Click to expand! ``` [Tue May 24 20:14:47.791667 2022] [wsgi:error] [pid 3217473] mod_wsgi (pid=3217473): Failed to exec Python script file '/opt/graphite/conf/graphite.wsgi'. [Tue May 24 20:14:47.791829 2022] [wsgi:error] [pid 3217473] mod_wsgi (pid=3217473): Exception occurred processing WSGI script '/opt/graphite/conf/graphite.wsgi'. [Tue May 24 20:14:47.829560 2022] [wsgi:error] [pid 3217473] Traceback (most recent call last): [Tue May 24 20:14:47.829665 2022] [wsgi:error] [pid 3217473] File "/opt/graphite/conf/graphite.wsgi", line 3, in [Tue May 24 20:14:47.829706 2022] [wsgi:error] [pid 3217473] from graphite.wsgi import application [Tue May 24 20:14:47.829740 2022] [wsgi:error] [pid 3217473] File "/usr/local/lib/python3.9/dist-packages/graphite/__init__.py", line 202 [Tue May 24 20:14:47.829766 2022] [wsgi:error] [pid 3217473] \t\t\t\traise TypeError, "Data passed to Dataset constructor is of unknown dimensions." [Tue May 24 20:14:47.829807 2022] [wsgi:error] [pid 3217473] \t\t\t\t ^ [Tue May 24 20:14:47.829828 2022] [wsgi:error] [pid 3217473] SyntaxError: invalid syntax [Tue May 24 20:14:47.833875 2022] [wsgi:error] [pid 3217471] mod_wsgi (pid=3217471): Failed to exec Python script file '/opt/graphite/conf/graphite.wsgi'. [Tue May 24 20:14:47.834027 2022] [wsgi:error] [pid 3217471] mod_wsgi (pid=3217471): Exception occurred processing WSGI script '/opt/graphite/conf/graphite.wsgi'. [Tue May 24 20:14:47.874735 2022] [wsgi:error] [pid 3217472] mod_wsgi (pid=3217472): Failed to exec Python script file '/opt/graphite/conf/graphite.wsgi'. [Tue May 24 20:14:47.874972 2022] [wsgi:error] [pid 3217472] mod_wsgi (pid=3217472): Exception occurred processing WSGI script '/opt/graphite/conf/graphite.wsgi'. [Tue May 24 20:14:47.903776 2022] [wsgi:error] [pid 3217475] mod_wsgi (pid=3217475): Failed to exec Python script file '/opt/graphite/conf/graphite.wsgi'. [Tue May 24 20:14:47.903933 2022] [wsgi:error] [pid 3217475] mod_wsgi (pid=3217475): Exception occurred processing WSGI script '/opt/graphite/conf/graphite.wsgi'. [Tue May 24 20:14:47.913791 2022] [wsgi:error] [pid 3217471] Traceback (most recent call last): [Tue May 24 20:14:47.913895 2022] [wsgi:error] [pid 3217471] File "/opt/graphite/conf/graphite.wsgi", line 3, in [Tue May 24 20:14:47.913905 2022] [wsgi:error] [pid 3217471] from graphite.wsgi import application [Tue May 24 20:14:47.913936 2022] [wsgi:error] [pid 3217471] File "/usr/local/lib/python3.9/dist-packages/graphite/__init__.py", line 202 [Tue May 24 20:14:47.913961 2022] [wsgi:error] [pid 3217471] \t\t\t\traise TypeError, "Data passed to Dataset constructor is of unknown dimensions." [Tue May 24 20:14:47.914000 2022] [wsgi:error] [pid 3217471] \t\t\t\t ^ [Tue May 24 20:14:47.914019 2022] [wsgi:error] [pid 3217471] SyntaxError: invalid syntax [Tue May 24 20:14:47.920907 2022] [wsgi:error] [pid 3217474] mod_wsgi (pid=3217474): Failed to exec Python script file '/opt/graphite/conf/graphite.wsgi'. [Tue May 24 20:14:47.921031 2022] [wsgi:error] [pid 3217474] mod_wsgi (pid=3217474): Exception occurred processing WSGI script '/opt/graphite/conf/graphite.wsgi'. [Tue May 24 20:14:47.928009 2022] [wsgi:error] [pid 3217475] Traceback (most recent call last): [Tue May 24 20:14:47.939547 2022] [wsgi:error] [pid 3217475] File "/opt/graphite/conf/graphite.wsgi", line 3, in [Tue May 24 20:14:47.939578 2022] [wsgi:error] [pid 3217475] from graphite.wsgi import application [Tue May 24 20:14:47.939617 2022] [wsgi:error] [pid 3217475] File "/usr/local/lib/python3.9/dist-packages/graphite/__init__.py", line 202 [Tue May 24 20:14:47.939644 2022] [wsgi:error] [pid 3217475] \t\t\t\traise TypeError, "Data passed to Dataset constructor is of unknown dimensions." [Tue May 24 20:14:47.939688 2022] [wsgi:error] [pid 3217475] \t\t\t\t ^ [Tue May 24 20:14:47.939708 2022] [wsgi:error] [pid 3217475] SyntaxError: invalid syntax [Tue May 24 20:14:47.942188 2022] [wsgi:error] [pid 3217472] Traceback (most recent call last): [Tue May 24 20:14:47.942284 2022] [wsgi:error] [pid 3217472] File "/opt/graphite/conf/graphite.wsgi", line 3, in [Tue May 24 20:14:47.942295 2022] [wsgi:error] [pid 3217472] from graphite.wsgi import application [Tue May 24 20:14:47.942326 2022] [wsgi:error] [pid 3217472] File "/usr/local/lib/python3.9/dist-packages/graphite/__init__.py", line 202 [Tue May 24 20:14:47.942350 2022] [wsgi:error] [pid 3217472] \t\t\t\traise TypeError, "Data passed to Dataset constructor is of unknown dimensions." [Tue May 24 20:14:47.943534 2022] [wsgi:error] [pid 3217472] \t\t\t\t ^ [Tue May 24 20:14:47.943675 2022] [wsgi:error] [pid 3217472] SyntaxError: invalid syntax [Tue May 24 20:14:47.945078 2022] [wsgi:error] [pid 3217474] Traceback (most recent call last): [Tue May 24 20:14:47.945168 2022] [wsgi:error] [pid 3217474] File "/opt/graphite/conf/graphite.wsgi", line 3, in [Tue May 24 20:14:47.945179 2022] [wsgi:error] [pid 3217474] from graphite.wsgi import application [Tue May 24 20:14:47.945208 2022] [wsgi:error] [pid 3217474] File "/usr/local/lib/python3.9/dist-packages/graphite/__init__.py", line 202 [Tue May 24 20:14:47.945234 2022] [wsgi:error] [pid 3217474] \t\t\t\traise TypeError, "Data passed to Dataset constructor is of unknown dimensions." [Tue May 24 20:14:47.945271 2022] [wsgi:error] [pid 3217474] \t\t\t\t ^ [Tue May 24 20:14:47.945290 2022] [wsgi:error] [pid 3217474] SyntaxError: invalid syntax [Tue May 24 20:14:51.463876 2022] [wsgi:error] [pid 3217473] [remote 127.0.0.1:47198] mod_wsgi (pid=3217473): Failed to exec Python script file '/opt/graphite/conf/graphite.wsgi'. [Tue May 24 20:14:51.464010 2022] [wsgi:error] [pid 3217473] [remote 127.0.0.1:47198] mod_wsgi (pid=3217473): Exception occurred processing WSGI script '/opt/graphite/conf/graphite.wsgi'. [Tue May 24 20:14:51.464270 2022] [wsgi:error] [pid 3217473] [remote 127.0.0.1:47198] Traceback (most recent call last): [Tue May 24 20:14:51.464335 2022] [wsgi:error] [pid 3217473] [remote 127.0.0.1:47198] File "/opt/graphite/conf/graphite.wsgi", line 3, in [Tue May 24 20:14:51.464366 2022] [wsgi:error] [pid 3217473] [remote 127.0.0.1:47198] from graphite.wsgi import application [Tue May 24 20:14:51.464399 2022] [wsgi:error] [pid 3217473] [remote 127.0.0.1:47198] File "/usr/local/lib/python3.9/dist-packages/graphite/__init__.py", line 202 [Tue May 24 20:14:51.464424 2022] [wsgi:error] [pid 3217473] [remote 127.0.0.1:47198] \t\t\t\traise TypeError, "Data passed to Dataset constructor is of unknown dimensions." [Tue May 24 20:14:51.464464 2022] [wsgi:error] [pid 3217473] [remote 127.0.0.1:47198] \t\t\t\t ^ [Tue May 24 20:14:51.464484 2022] [wsgi:error] [pid 3217473] [remote 127.0.0.1:47198] SyntaxError: invalid syntax ```
deniszh commented 2 years ago

Hi @jbartak ,

Could yo please show content of /usr/local/lib/python3.9/dist-packages/graphite/__init__.py file ? I believe it's this package - https://pypi.org/project/graphite/ - which is not part of Graphite and tbh completely mystery to me. Try to unistall it and try again.

jbartak commented 2 years ago

Sure there it is. init.py.txt

Do you mean to reinstall the graphite PIP package?

deniszh commented 2 years ago

Remove it, I think it's not Python 3.9 compatible. It's not part of Graphite, despite the name.

jbartak commented 2 years ago

Damm just removed it and it's working. Thanks!