Replies: 82 comments 7 replies
-
Are you using our RBAC extension?
Please make sure to try to login using incognito/private mode to ensure no cached cookies remain.
|
Beta Was this translation helpful? Give feedback.
-
Hello, We meet this issue also:
|
Beta Was this translation helpful? Give feedback.
-
Yes, similar experience and I do not use any extension. I have not gone so far as to remove and re-create the service, but it's next on my list. Here are my logs:
I used And still no dice logging in... Edit: and I did try incognito mode & different browsers... but again, no good. |
Beta Was this translation helpful? Give feedback.
-
@benjii can you share the logs of the Portainer container with us? It will help us identify the portainer version as well. @tr1et how did you deploy Portainer? Can you share the entire logs of the Portainer service? |
Beta Was this translation helpful? Give feedback.
-
Same here - it worked perfectly on friday but does not work today - we have rebooted our swarm but this hasn't helped. No server updates have been installed, nor have any containers/images been updated, so I'm baffled as to what has changed to cause this! |
Beta Was this translation helpful? Give feedback.
-
Updated - Now i am unable to login again |
Beta Was this translation helpful? Give feedback.
-
Exactly the same issue as described by @tr1et to the letter. I have tried using "sudo" as suggested by @i2egular but it did not help. |
Beta Was this translation helpful? Give feedback.
-
Have you guys been able to restart the Portainer container/service to see if this fixes the issue? @benjii have you restarted the portainer container after removing the portainer database? |
Beta Was this translation helpful? Give feedback.
-
A recreation of the portainer service does not fix anything, interestingly a restart of the portainer service did help for one out of our four instances |
Beta Was this translation helpful? Give feedback.
-
I have to correct myself: After restarting the portainer instance, logging in is working exactly once, this is reproducible on all systems |
Beta Was this translation helpful? Give feedback.
-
@balta3 what version of Portainer are you using? |
Beta Was this translation helpful? Give feedback.
-
I was using 1.21.0 (Image from 2 months age, ID: da2759008147). Because of the problems of today I pulled the latest tag which is from 3 weeks ago, ID: 2b4ddf654e1c. The UI is showing 1.21.0 still but in docker hub this seems to be 1.22.0 |
Beta Was this translation helpful? Give feedback.
-
@deviantony I have pasted the trimmed logs below (trimmed because it's just the same message all the way through). And to answer your question my procedure for resetting Portainer is as follow (my only Portainer instance runs on my master node);
And I have a similar experience as some others above; I can enter the password and it is accepted (I can even see it when I view the And the logs...
Edit: I even tried a more "direct" way of updating the password. I manually created a hashed password and used |
Beta Was this translation helpful? Give feedback.
-
Experiencing the exact same issue on a 6 month old portainer container. 2-5 "Access denied (err=Access denied to resource) (code=403)" per second and sporadic "Invalid credentials (err=Unauthorized) (code=422)" Is there a "lock-down" feature for possible brute-force attacks than could have been triggered? |
Beta Was this translation helpful? Give feedback.
-
Regarding these The only occasion that can return a It seems that the rate limiter reports the current user (IP) as banned and returns a 403. We use the request I'm still trying to figure out why some users do not have this error message though and only have the invalid credentials message. |
Beta Was this translation helpful? Give feedback.
-
The issue is still present in the latest release. I've set up the Portainer docker instance in a new (Hyper-V) VM which I use exclusively for development and basic monitoring of running containers. The initial setup was successful and I was able to create a new user/password which worked fine the first few times. OS: Kubuntu 22.04 LTS Set up script: # From https://docs.portainer.io/start/install/server/docker/linux
sudo docker volume create portainer_data
sudo docker run -d -p 8000:8000 -p 9443:9443 --name portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:latest POST request to https://localhost:9443/api/auth returns status code 422 and the message containing "Invalid credentials". The user/password combo seemed to work fine the first few times + it is auto-filled from browser store / password manager. My current "solution": removing the volume and reinstalling Portainer |
Beta Was this translation helpful? Give feedback.
-
Share portainer logs when this issue is happening to help troubleshoot. |
Beta Was this translation helpful? Give feedback.
-
Unfortunately I've already wiped the entire setup before reinstalling but I'll provide logs if I can reproduce the bug. |
Beta Was this translation helpful? Give feedback.
-
This can be temporarily fixed by For heimdall user, it's better to create a non admin user and give enviroment access to it and use that separate account to display the portainer status. |
Beta Was this translation helpful? Give feedback.
-
Just ran into this issue today. Here's the issue posted on Heimdall. Had to remove the login creds from Heimdall, then rebooted Heimdall, Portainer, and my Custom OAuth provider. Heimdall absolutely hammers Portainer log in. Prob best to not even use that function. As stated in the issue above, I'm not sure if it's a user related error, I was able to see the stats Heimdall puts out through logging into Portainer, even with OAuth, and hidden login. |
Beta Was this translation helpful? Give feedback.
-
I've also the same issue, i'm using Portainer on a Docker container on a raspbery pi 4. If just after in logout, i'm unable to login with previous password (and without any password too) |
Beta Was this translation helpful? Give feedback.
-
You have this page : https://docs.portainer.io/advanced/reset-admin |
Beta Was this translation helpful? Give feedback.
-
Yes, so there is May 2023 and it's still happening. Clearing web browser cookies for |
Beta Was this translation helpful? Give feedback.
-
Complete UI redesign? Sure! Fixing an actual 4 year old issue? Nah! |
Beta Was this translation helpful? Give feedback.
-
Same issue here, at first I thought something went wrong and reset my password, after the It is happening again. After four year it is something to be considered, as for a production environment, one cannot depend on portainer's will to access. ie: there is a P1 you cannot just hope that portioner won't ban you and you'll have to recreate the password. docker restart didn't work Safari logs:
|
Beta Was this translation helpful? Give feedback.
-
As people are still seeing this issue and posting to this thread - depending on your environment Does your infrastructure frontend your deployed Portainer environment with any session management/traffic routing tools? Cloudflare Zero Trust and Teleport are good examples of these types of tools. Portainer is a thick JS client that runs in the Browser and a Server backend that communicates by API calls. So if the communications path is not fully open the client can show things like the login page, but can not complete the login process as the API calls can not be made. This is made more complicated by the fact that the client is very bad at reporting API layer issues. For our environment which is front-ended by Cloudflare this showed up due to 'panic' config changes made due to Cloudflare's problems last weekend. Some of our session time limits had been cut back. Portainer on one system then started to fail logins and at times would not refresh content. All the menus were shown, but no data was being retrieved from the server, just large numbers of 'fail' messages. I have raised a ticket saying that having the client show better error messages could help in this situation. |
Beta Was this translation helpful? Give feedback.
-
I've been dealing with an issue that's been very time-consuming to diagnose today. I've been getting sporadic 403 'Access Denied' errors, and restarting the Portainer container temporarily solves the problem. However, the issue returns after some time. Upon further investigation, I've found that the 403 response is specific to the The apparent solution is to use access tokens when using the Portainer API. However, certain APIs, specifically the websocket APIs, require the JWT token. Getting the JWT token involves making calls to the |
Beta Was this translation helpful? Give feedback.
-
Hi @kevinbull - thanks for adding to the discussion. I believe the rate limit on the Additionally, the auth tokens themselves have a configurable duration (default to ~8 hours) and you can continue to use a single token for that time. So unless I'm misunderstanding, there should be no need to hit the endpoint every time you're making a request. Let me know! |
Beta Was this translation helpful? Give feedback.
-
Sadly if you dig into the sourcecode you will find that the rate limiter is hardcoded with the following values
I came across it while working for a small company, so it was not more than a future security issue as we had few staff and portainer was not published to the outside world. Such values will never match any company's internal security policies and will cause problems if a gateway is put in front that causes all requests to come from the gateway's IP address. All 3 values should be adjustable so that portainer can be configured to meet its deployer's requirements, with an additional option to just disable the feature. |
Beta Was this translation helpful? Give feedback.
-
Ran into this one today running Portainer CE locally on Docker. Password is stored in a pw manager, so it's not an inability to type thing. Portainer | build_number=163 go_version=1.23.5 image_tag=2.27.0-linux-amd64 nodejs_version=18.20.6 version=2.27.0 webpack_version=5.88.2 yarn_version=1.22.22 I could not log into Portainer via a normal browser - cleared cache history, deleted cookies, nothing. I could log in with Chrome incognito mode of all things. Ended up blowing away my instance to create new (re-used my old password). Still couldn't log into the non-incognito instance. Tried to reset my pw with the incognito instance where I was logged in - password does not match existing password error. I also did some console tracing while I was at it. saw this being passed to the api/auth endpoint and found it pretty interesting. Something seems to be escaping the backslash in the password there. I didn't think to test this escaped pw, sorry. 🤷 Anyways, I've since reset my pw with the pw reset tool, so it's not in a bad state anymore and I can't test if that changed pw would work or not. But I did find the "password does not match existing password" error when I tried to reset it while logged in, and the password mismatch in the API call interesting. |
Beta Was this translation helpful? Give feedback.
-
Bug description
The password that we had been using for Portainer suddenly stopped working (I have been unable to determine why). However, in scouting around and discovering that there is no way to reset the password via the UI, I followed various threads to remedy the issue.
One of those was to remove the data directory / volume. I didn't do that, but I did remove
portainer.db
. This caused Portainer to re-prompt me for a password. I can enter it and create a new user. I have verified that a record is created for theadmin
user and the hashed password is present.When I try to log in immediately after, however, I get
Invalid Credentials
.Expected behavior
I should be able to log in (I think).
Steps to reproduce the issue:
portainer.db
file;Technical details:
docker run -p 9000:9000 portainer/portainer
): Unknown (if I had this my first step would be to remove the existing service and re-create it).Additional context
N/A
Beta Was this translation helpful? Give feedback.
All reactions