[BUG]Graphs not saving
Describe the bug When creating a graph, I see the "Save to My Graphs - Result Graph saved successfully" message, but the graph neither appears under "My Graphs" nor is there an entry in the graphitedb.
To Reproduce Steps to reproduce the behavior: Login to Graphite-Web, select a couple of datapoints, and save the graph as any name.
Expected behavior A graph should appear under "My Graphs" by the name given.
Screenshots
Environment (please complete the following information):
- OS flavor: Red Hat Enterprise 9
- Graphite-web version 1.1.1
- Django/Python version Python 3.9
- Setup type From Sources this was an upgrade from a prior version of Red Hat.
Additional context Here are the permissions for the graphite user in the database:
mysql> show grants for graphite_user@localhost;
+--------------------------------------------------------------------------+
| Grants for graphite_user@localhost |
+--------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO `graphite_user`@`localhost` |
| GRANT ALL PRIVILEGES ON `graphitedb`.* TO `graphite_user`@`localhost` |
| GRANT ALL PRIVILEGES ON `graphite_prod`.* TO `graphite_user`@`localhost` |
+--------------------------------------------------------------------------+
3 rows in set (0.01 sec)
Works for me with graphite-web 1.1.10. You should look into:
- web browser Developer tools for failing requests.
- server side logs (application server or graphite logs)
The server side logs have nothing in them about saved graphs :(
I do see this in the error log:
[Mon Oct 28 15:23:04.075030 2024] [access_compat:error] [pid 134845] [client 10.192.152.205:63034] AH01797: client denied by server configuration: /app/graphite/conf/graphite.wsgi, referer: https://graphite.mycompany.com/composer?showTarget=CI_unixsys.aadprddb02_mycompany_com.cpu-0.percent-idle&width=586&height=308&target=CI_unixsys.aadprddb02_mycompany_com.cpu-0.percent-idle
It shows up anytime I click a graph or try to save one.
I found the issue, I'm missing tables:
+----------------------------+
| Tables_in_graphitedb |
+----------------------------+
| account_mygraph |
| account_profile |
| account_variable |
| account_view |
| account_window |
| auth_group |
| auth_group_permissions |
| auth_permission |
| auth_user |
| auth_user_groups |
| auth_user_user_permissions |
| dashboard_dashboard |
| dashboard_dashboard_owners |
| dashboard_template |
| dashboard_template_owners |
| django_admin_log |
| django_content_type |
| django_migrations |
| django_session |
| events_event |
| tagging_tag |
| tagging_taggeditem |
| tags_series |
| tags_seriestag |
| tags_tag |
| tags_tagvalue |
| url_shortener_link |
+----------------------------+
Actual database:
+--------------------------------------+
| Tables_in_graphite_restore_from_prod |
+--------------------------------------+
| account_mygraph |
| account_profile |
| account_variable |
| account_view |
| account_window |
| auth_group |
| auth_group_permissions |
| auth_permission |
| auth_user |
| auth_user_groups |
| auth_user_user_permissions |
| dashboard_dashboard |
| dashboard_dashboard_owners |
| django_admin_log |
| django_content_type |
| django_migrations |
| django_session |
| events_event |
| tagging_tag |
| tagging_taggeditem |
+--------------------------------------+
graphite_restore_from_prod is a copy of my production db I put on my dev server. graphitedb is the original dev setup. Is there anyway to add the missing tables?
I'm trying to run the migration:
PYTHONPATH=/opt/graphite/webapp /app/graphite/lib/python3.9/site-packages/django/bin/django-admin.py migrate --no-input --settings=graphite.settings --fake-initial
But I'm getting:
django.db.utils.OperationalError: (1050, "Table 'dashboard_dashboard' already exists")
Any advice? I copied this database from my red hat 7 setup which was on the same version of Graphite.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.