plane icon indicating copy to clipboard operation
plane copied to clipboard

Can't loging using default username and password

Open susinths opened this issue 2 years ago • 14 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Current behavior

Using docker-compose.yml and when ready, i get error using the default username and password from the documentation.

The container log output contains an error related to Postgres login for user plane, probably where the actual issue is.

Steps to reproduce

Checkout the master branch Run setup.sh http://10.0.2.100 set -a; source .env; set +a; podman-compose -f docker-compose.yml up

Browser

Google Chrome

Version

Self-hosted

susinths avatar Jun 09 '23 16:06 susinths

Hi @susinths, we have update the docker setup for plane you can head over to https://docs.plane.so/self-hosting for the detailed steps and fix. This is due to change in password for PG database.

pablohashescobar avatar Jun 09 '23 16:06 pablohashescobar

Tried that (using docker-compose-hub.yml) and seems the DB connection is ok, but getting: [2023-06-10 00:24:52,691: ERROR/MainProcess] consumer: Cannot connect to redis://plane-redis:6379//: Error -3 connecting to plane-redis:6379. Try again..

susinths avatar Jun 09 '23 18:06 susinths

Hi @susinths, looks like there is double / at the end of the connection string can you check your REDIS_URL configuration once.

pablohashescobar avatar Jun 10 '23 07:06 pablohashescobar

@susinths Another thing that might help you. I've faced it myself. When starting ./setup.sh you explicitly need to add http://. Like:

$ ./setup.sh http://localhost

Still haven't got this up & running. I tried to remove the trailing / from .env and docker-compose.yml with no progress. Also tried to bring up with docker-compose-hub.yml, same issue.

susinths avatar Jun 12 '23 09:06 susinths

A new clone and i get: 2023/06/12 09:12:46 [emerg] 1#1: host not found in upstream "plane-minio" in /etc/nginx/nginx.conf:23 nginx: [emerg] host not found in upstream "plane-minio" in /etc/nginx/nginx.conf:23

Which container is running Nginx? I've tried to look into the containers for the Nginx config, but obviously can't find it.

And at the end i see the following, but there is no port 3000 listening on the host:

Access permission for plane-minio/uploads is set to download "+" echo Starting Plane Frontend.. "+" nodeStarting Plane Frontend.. apps/app/server.js Listening on port 3000

susinths avatar Jun 12 '23 09:06 susinths

Hi @susinths, can you share your docker-compose-hub.yml. I hope you are using docker-compose-hub.yml.

pablohashescobar avatar Jun 12 '23 09:06 pablohashescobar

Still broken in 0.71. Used the latest docker images, env file, and docker-compose-hub.yml file.

shadowjig avatar Jun 15 '23 17:06 shadowjig

Hi @shadowjig, it would be awesome if you could share your browser network logs and also if you could please specify if you are using the provided plane nginx.

pablohashescobar avatar Jun 15 '23 17:06 pablohashescobar

@pablohashescobar I am using the nginx container in the docker-compose file. I changed the nginx port to 8080, but that was only to allow the container to start. Port 80 is already used for another container. I use portainer to maintain my docker containers. Once the plane stack is started, I connected the proxy container to a network so it's accessible on my network. I have a dns resolver and I setup the dns reolution for my domain to that IP of the container. I can get to the login page, but it doesn't log me in. You can see ERR_TOO_MANY_REDIRECTS on the /api/users/me/ endpoint. Attached is the log from my browser.

network_log.txt

shadowjig avatar Jun 16 '23 15:06 shadowjig

@pablohashescobar I see that new docker containers (version 0.8) were built today. So I wanted to give them a try. The default username/password issue appears to be resolved now. But /api/users/me/ endpoint is still broken, and specifically only when using HTTPS. I use nginx proxy manager in front of the proxy that's created in the docker compose file. If I set my NEXT_PUBLIC_API_BASE_URL and WEB_URL variables to https://<host.mydomain.com> then I get an error in my browser that the api/user/me is being served up without HTTPS.

If disable forcing HTTPS in nginx proxy manager. And change the NEXT_PUBLIC_API_BASE_URL and WEB_URL variables to http:// instead of https:// and then bring everything back up and login everything works fine and I'm sent to the onboarding screen to create a user.

Somehow the api/user/me endpoint needs to know it needs to be served back to the browser via https.

shadowjig avatar Jun 28 '23 18:06 shadowjig

Hi @shadowjig, thanks for the confirmation. The problem you mentioned may be due to misconfiguration in the nginx proxy. Just to confirm did the api/sign-in was served through https.

pablohashescobar avatar Jun 29 '23 02:06 pablohashescobar

@pablohashescobar, I tested it this morning, and api/sign-in was served up via http, it was not secure.

On a side note, I attempted to mount the nginx.conf file from the docker host into the proxy container. But it looks like it's overwritten (maybe by a script on container start up). How could I adjust the proxy config to fix the above http/https issue?

shadowjig avatar Jun 29 '23 13:06 shadowjig

HI @shadowjig, there is a env.sh file in nginx/env.sh which builds the nginx.conf using the environment variables during runtime. You may have to tweak that file or you can tweak the nginx.conf.template to the required configuration.

pablohashescobar avatar Jun 30 '23 03:06 pablohashescobar

@pablohashescobar typical docker use cases would involve mounting the files from host to the container. Not changing a script, rebuilding the docker containers and bring up the stack to solve a minor config change like this. I realize you are early in the development of this product, but changing the .sh script to change a minor config item is a bit overkill.

shadowjig avatar Jul 11 '23 15:07 shadowjig

This issue has been resolved, closing this issue now, please feel free to re-open if the issue persists

pablohashescobar avatar Aug 23 '23 16:08 pablohashescobar