Admin login in docker image not possible
Hi, I think, there is something wrong with the docker-compose (starting in version 2.2.0 till latest). It is not possible to login as admin after install
cells_1 | 2021-05-16T19:10:43.552Z ERROR pydio.grpc.oauth Could not create authorize response {"error": "invalid_request", "debug": ""} cells_1 | 2021-05-16T19:10:43.552Z ERROR pydio.rest.frontend Failed to create auth code {"error": "error"} cells_1 | 2021-05-16T19:10:44.011Z ERROR pydio.grpc.oauth Could not create authorize response {"error": "invalid_request", "debug": ""} cells_1 | 2021-05-16T19:10:44.011Z ERROR pydio.grpc.oauth Failed to create auth code {"error": "error"} cells_1 | 2021-05-16T19:10:44.011Z INFO Login failed with {"id":"","code":0,"detail":"invalid_request","status":""} cells_1 | 2021-05-16T19:10:44.120Z ERROR pydio.rest.frontend Rest Error 401 {"error": "{\"id\":\"login.failed\",\"code\":401,\"detail\":\"Login failed\",\"status\":\"Unauthorized\"}"}
A wrong username / wrong password however produce different error messages, indicating, that username/password is wrong. It seems to be an issue with the image.
Multiple people in the forum already have been reporting this issue, without replies however. Thus I thought would make sense posting it here.
Please see also: https://forum.pydio.com/t/login-failed-with-invalid-request-after-clean-installation/3766 https://forum.pydio.com/t/login-failed-with-invalid-request-after-clean-installation/3841
The solution provided "docker-compose down and up again" does not work for everyone.
Hello, thanks for reporting.
I do not think it is a global "admin cannot log after install issue": we are using a lot of these images internally and we can definitively log in, as admin and as simple user.
Yet, we would definitively be interested in cornering the problem and solve it ASAP if there is something to fix in the image and/or the code.
Could you please provide more details so that we can reproduce? How do you start your docker image? How does it reach the DB?
Hello, the same issue is for me too (after containr up\down). Using Docker-compose with below configuration I run the container. I was able to open installer using url ...:8080. On the DB configuration page Ihave entered host (mysqldbase) and pydio username\pwd (adminuser\adminpassword). After installation in the login form the Login failed is displayed once credentionals were entered. In the log the following error is displayed: cells_1 | 2021-09-08T18:51:12.740Z INFO Login failed with {"id":"","code":0,"detail":"invalid_request","status":""}
If incorrect password entered in the form on log the following different record appear: cells_1 | 2021-09-08T18:54:06.760Z INFO Login failed with {"id":"","code":0,"detail":"password does not match","status":""}
I have added mydocker-comfig.yml in attachment. The proxy-network is a bridge network with 172.20.0.0/16. docker-compose version 1.29.1, build c34c88b2 docker-compose.yml.txt
Please reply which information is required to solve the issue. From Cells container I able to ping mysql server using their hostname mysqldbase: /var/cells # ping mysqldbase PING mysqldbase (172.20.0.9): 56 data bytes 64 bytes from 172.20.0.9: seq=0 ttl=64 time=0.137 ms
In the mysqldbase container it's possible to open cells database using mysql cli and then open table idm_user_idx_tree - record with admin user exists, that means that during setup connection between cells and mysql works. Instead ofhostname mysqldbase I tried to enter IP address - result is the same.
I set CELLS_LOGS_LEVEL=debug and the followin log (added in attachment) is displayed after docker-compse up and when I enter credentionals. log.txt
uname -a Linux hostname 5.4.0-81-generic #91-Ubuntu SMP Thu Jul 15 19:09:17 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
/var/cells # cells version Pydio Cells Home Edition Version: 2.2.9 Built: 01 Jul 21 16:47 +0000 Git commit: cf8dab5674c7ec0aa9237b657f006146c9c16f6e OS/Arch: linux/amd64 Go version: go1.15.13
Hello,
you could try the following to further dig and diagnose (I advise to get out the debug log level - it is not necessary at this point):
-
What happens if you restart the "cells" image only with smth like:
docker-compose restart cells.- Do you see any error when the process starts?
- Can you login ?
-
Can you try a similar deployment with the latest dev version (
pydio/cells:unstable): we have added a more robust service starter for such setups and we know wait and retry if the DB is not ready
Also, at this point:
- the explicitly defined network is not necessary
- you should double check upon re-install that you have correctly cleaned the host FS: as you are mountig local folders for both mysql and cells, these folder should be empty before first start
By the way, in your compose file, the CELLS_EXTERNAL env var is not correct and should rather be: https://shared.home
By the way, you were right, it is a much better option to use the forum for your issue, I will also answer there and we should continue our discussion there also.
Bruno, thanks for your help. I have changed only CELLS_EXTERNAL ('https://' added in .yml) and after that login was successful using :latest version.
Also I disabled debug log level, then run "docker-compose restart cells" and after restart login was successful too. In log file there are no errors, just [Note] for mysql: when restart is started "Aborted connection" is displayed. Log is here: restart_log.txt
Also login was successful when I set CELLS_NO_TLS=1 and CELLS_EXTERNAL=http://shared.home.
For pydio/cells:unstable:
- I have removed explicity defined network and clear local folders for both mysql and cells. .yml is here - docker-compose.yml.txt
- Installation server was started and setup was successfully opened.
- After all was filled the "Server is starting" is displayed. Much userfrendly than in :latest version.
In my case when the login form appears Login was failed for first attempt, then I have entered wrong password to see which message will be in log in that case. The message was the same as in first case with correct password. After sametime in log " INFO pydio.grpc.oauth started" and "INFO pydio.web.oauth started" are displayed and only after that messsages login was successfull. May be Login form should be displayed only when pydio.grpc.oauth is started, not earlier. Maybe there was a some delay on my hardware (I tried two times, behaviour was the same - Login form is opened prior pydio.grpc\web.oauth were started). StartLog for :unstable is here: unstable_install_log.txt
Thanks!
For me if I use the default "admin" user during installation I can login but if I customize the username to something else login will fail. Weird.