-
-
Notifications
You must be signed in to change notification settings - Fork 13.9k
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
Grafana - Migration failed err: pq: relation \"UQE_user_login\" already exists" #64281
Comments
Appears to be a known bug upstream in Grafana/PostgreSQL with specific versions of PostgreSQL. https://community.grafana.com/t/error-starting-grafana-with-a-new-postgresql-10-9-database/18670 |
Ok bugs are always there but why did it make it into the stable channel? Are there no automatic tests? The combination of PostgreSQL and Grafana should not be so rare. |
The test doesn't seem to use a database at all. I'm not familiar with In the meantime it looks like your solution is to downgrade |
Yes, that's correct. Grafana needs a database to store users and dashboards. By default it is configured to use sqlite3. External data sources can be e.g. Prometheus or InfluxDB. It's no problem for me. In the meantime I have replaced PostgreSQL with MariaDB. The Nix module for MySQL is much better than PostgreSQL... |
I also noticed that the group field under "/var/lib/grafana" are not set correctly. Shouldn't "root:root" be used?
This is not true for "gitea" either? |
Taking a quick look at the module code it doesn't automatically provision a database for the user and leaves that up to them. The test should be expanded to cover at least The ownership should be |
Should I create a new issue for it? |
I'll likely take a look at this, so you can probably just leave it here. I might ping you for some testing, if you don't mind. |
I'll be glad to help. |
@dR3b Well I hit a bit of a roadblock in automatically provisioning databases for grafana. According to https://community.hortonworks.com/articles/33401/how-to-set-up-grafana-to-use-mysql-database-rather.html with a mysql database the grafana user requires the In the meantime it seems there is a workaround for your specific issue. |
@WilliButz As the maintainer of the |
@aanderse Thank's for highlighting me, I'll extend the test in the next days 👍 |
@aanderse
It creates the DB and everything works. |
@dR3b as mentioned the problem only applies to specific |
Hello!
Postgres 9.6.14 |
@ekbfh As mentioned in the linked workaround your two options are to either pin Please let us know if you need help on either of those solutions. |
@aanderse where is the workaround link? I can't downgrade my postgres version :( |
@jaimebrolesi up a few comments: #64281 (comment) |
@aanderse I upgraded my pg to 11.5 and it worked like a charm! Thanks ;) |
It's worked for me I using zalando postgres operator, PG version was 11.4. After I updated postgres to 11.5. grafana started as usual. |
Thank you for your contributions.
|
Issue description
Steps to reproduce
Install Grafana and PostgreSQL 11/10:
The user “grafana” can log in to postgresql. This works and entries are also created:
Any ideas?
Thanks
Technical details
The text was updated successfully, but these errors were encountered: