Logining into the Docker image upon completion of local install

Hi Guys,

Ok so I followed all the instructions on your website for deploying retool locally and I have successfully done that.

I can reach the signup page and I enter my email address and password that I want to use, then it redirects me to the page where you enter your full name, which I do and then instead of continuing it just loops back and asks to enter my email and password which I do then again it asks me to enter my full name which I do and once again it takes me to the page to enter my email and password.

This seems to be an infinite loop.

Any ideas on how to fix this?

Peter

Self-hosted Retool quickstart

Hi @peterkaz, welcome to the forum! :wave:

This is definitely unexpected.

  • Which Self-hosted version did we deploy locally?
  • Try changing the path to locahost:3000/login, and singing in with the credentials you used already, we may be getting redirected back to /signup for some reason.
  • Are we getting any errors when we try to sign up?

Could you include a screen recording of this loop? Thank you in advance.

Hi Paulo,

Thanks for the welcome.

The versione that I have deployed internally is 3.75.12

I signed up successfully and I have tried to login using both the domain name:3000/login as well as just the IP address:3000/login

The result is always the same. It accepts my credentials and then redirects me to the page where I am to enter my full name and once I have done that it then loops me back to the login page again.

There is nothing special about the loop hence nothing to see if I were to record it.

Not one error is presented, just a constant loop as described above.

Is there any log I can check to perhaps get a better Idea of what's happening?

Kind regards

Any ideas gents?

Hi @peterkaz, sorry for the waiting.

It may be related to the COOKIE_INSECURE environmental variable. Set it to true if your Retool deployment uses a non-HTTPS URL or IP address:

Pardon my ignorance but where would I look to find the COOKIE_INSECURE environment variable?

You can find all environmental variables in your docker.env file. If no extra variables were added, you'll find it around line 41.

Lovely, I'll check now

Thanks

1 Like

apologies for asking, but I can't seem to remember the docker.env file resides under which directory?

Ok some further strange behavior has occurred, when I try to login with the account I signed up with, I'm now being told that I have either an incorrect email or password. I thought ok not a problem I'll do a password reset but when I attempt that It tells me that the email address I signed up with does not exist.

All very strange

No need to apologize. :slightly_smiling_face:

the docker.env file is at the root of your on-premise folder

We could try querying the database to see if a user was ever created.

Here is how:

when I try to issue the command exec -it retool-onpremise-postgres-1 /bin/bash

I get

-bash: exec: -i: invalid option
exec: usage: exec [-cl] [-a name] [command [argument ...]] [redirection ...]

nevermind I excluded the sudo component.

This time when I put in the fill command I get this response

Error response from daemon: No such container: retool-onpremise-postgres-1

Your container may have a different name.

  • Ensure that we're in the right directory on the terminal (the root of the onprem folder).
  • run docker-compose ps to list all services that are running.
  • Replace the command with your container's name sudo docker exec -it retool_your-container's_name

We are looking for the postgres one:
Screenshot 2024-12-04 at 5.12.59 PM

Ok made some progress

root@507a1dc037d6:/# psql "dbname=$POSTGRES_DB host=$POSTGRES_HOST user=$POSTGRES_USER password=$POSTGRES_PASSWORD port=$POSTGRES_PORT"
psql (11.13 (Debian 11.13-1.pgdg90+1))
Type "help" for help.

hammerhead_production=#

             Name                                Command               State                    Ports                 

retool-onpremise-master_api_1 docker-entrypoint.sh bash ... Up 0.0.0.0:3000->3000/tcp,:::3000-
>3000/tcp, 3001/tcp, 3002/tcp
retool-onpremise-master_code-executor_1 docker-entrypoint.sh bash ... Up 3004/tcp
retool-onpremise-master_https-portal_1 /init Up 0.0.0.0:443->443/tcp,:::443->443/tcp,
0.0.0.0:80->80/tcp,:::80->80/tcp
retool-onpremise-master_jobs-runner_1 docker-entrypoint.sh bash ... Up 3000/tcp, 3001/tcp, 3002/tcp
retool-onpremise-master_postgres_1 docker-entrypoint.sh postgres Up 5432/tcp
retool-onpremise-master_retooldb- docker-entrypoint.sh postgres Up 5432/tcp
postgres_1
retool-onpremise-master_workflows- docker-entrypoint.sh bash ... Up 3000/tcp, 3001/tcp, 3002/tcp
backend_1
retool-onpremise-master_workflows- docker-entrypoint.sh bash ... Up 3000/tcp, 3001/tcp, 3002/tcp
worker_1

hammerhead_production=# SELECT * FROM pg_user;
usename | usesysid | usecreatedb | usesuper | userepl | usebypassrls | passwd | valuntil | useconfig
----------------------+----------+-------------+----------+---------+--------------+----------+----------+-----------
retool_internal_user | 10 | t | t | t | t | ******** | |
(1 row)

This is all i get when I query the user table

Hey @peterkaz!

It definitely looks like you're not even creating a new user successfully. You mentioned that there's no visible errors when you're in the middle of this loop, but does that include the browser console?

After seeing the postgre result I tend to agree.

Question is how do I either add a user manually or restart the process to get it to register a new user through the web interface?