Login page redirection

Hello,

When I connect to the PMM login page, I enter “admin” as both username and password, and then it redirects me to set a new password. Once that is done, it redirects me back to the login page, and I cannot log in. When I set [auth.anonymous] enabled = true, it redirects me to the dashboard, but unauthorized messages appear.

The domain is hosted by a client, and I want to know if we need to inform them to allow some specific paths.

Thanks for help

Hi @Zineb_Naji

What version of PMM is it?

Could you also check the contents of the [database] section of Grafana config, which is located in /etc/grafana/grafana.ini? Do you see something similar to the following?

[database]
# You can configure the database connection by specifying type, host, name, user and password
# as separate properties or as on string using the url properties.

# Either "mysql", "postgres" or "sqlite3", it's your choice
type = postgres
host = localhost
user = grafana

I’m trying to figure out which database - sqlite3 or PostgreSQL - is PMM connecting to in your case?

Hey, thanks for your response

yes , the section is present in my conf file

##################### Grafana Configuration #####################
[database]
type = postgres
host = localhost
user = grafana

The version of PMM : I use this image percona/pmm-server:2

You can try the following:

  1. restart Grafana: supervisorctl restart grafana
  2. start tailing the logs: tail -f /srv/logs/grafana.log
  3. from another terminal, run change-admin-password <new-password>

Then check for error messages in the logtail. If the above does not help, you will most probably be able to see an error in the logs.

Password change: Works when using the following command, but it does not affect browser login:

docker exec -t container_name change-admin-password admin12345

Observed issue: Although the curl command returns an HTTP 200 response, accessing the site via a browser always redirects to /graph/login.

curl -I https://admin:admin12345@example.com/graph/dashboards
Result: HTTP/1.1 200 OK

I don’t really know what could trigger such a behavior. Maybe try logging in from a different host, or even a different browser, or both.

Have you tried to clean browser cache?