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

[BUG]Graphs not saving #2863

Open
itinneed2022 opened this issue Oct 18, 2024 · 5 comments
Open

[BUG]Graphs not saving #2863

itinneed2022 opened this issue Oct 18, 2024 · 5 comments
Labels

Comments

@itinneed2022
Copy link

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
image

image
image

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)
@niol
Copy link
Contributor

niol commented Oct 23, 2024

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)

@itinneed2022
Copy link
Author

The server side logs have nothing in them about saved graphs :(

@itinneed2022
Copy link
Author

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.

@itinneed2022
Copy link
Author

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?

@itinneed2022
Copy link
Author

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.

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

No branches or pull requests

2 participants