Unable to login after installation

I have installed Metabase via Docker on Ubuntu. After successful installation, the super admin username & passwords are not working. Getting message password not matching with the stored password.

I have reinstalled many times but still no luck. In database i can see the user record is existing & is_superuser, is_active both are marked as "t".

Did lots of search on the forum, google, chatgpt before posting here.

Any help is really appreciated.

Try Redirecting…

Hi @Luiggi,

Thanks for your reply. The link you shared seems to be more related to the settings from the admin panel. Let me know if i am missing anything about the redirect setting somewhere.

Below is the log that I get when I try to login (with correct username & password)
metabase_1 | 2023-04-10 11:11:07,783 DEBUG middleware.log :: POST /api/session 200 152.7 ms (9 DB calls) App DB connections: 0/7 Jetty threads: 4/50 (3 idle, 0 queued) (94 total active threads) Queries in flight: 0 (0 queued)
metabase_1 | 2023-04-10 11:11:07,891 WARN metabase.email :: Failed to send email
metabase_1 | clojure.lang.ExceptionInfo: SMTP host is not set. {:cause :smtp-host-not-set}
metabase_1 | at metabase.email$fn__74956$send_message_or_throw_BANG___74961$fn__74965.invoke(email.clj:125)
metabase_1 | at metabase.email$fn__74956$send_message_or_throw_BANG___74961.invoke(email.clj:119)
metabase_1 | at metabase.email$send_message_BANG_.invokeStatic(email.clj:162)
metabase_1 | at metabase.email$send_message_BANG_.doInvoke(email.clj:148)
metabase_1 | at clojure.lang.RestFn.invoke(RestFn.java:619)
metabase_1 | at metabase.email.messages$send_login_from_new_device_email_BANG_.invokeStatic(messages.clj:198)
metabase_1 | at metabase.email.messages$send_login_from_new_device_email_BANG_.invoke(messages.clj:184)
metabase_1 | at metabase.models.login_history$maybe_send_login_from_new_device_email$fn__75777.invoke(login_history.clj:85)
metabase_1 | at clojure.core$binding_conveyor_fn$fn__5823.invoke(core.clj:2047)
metabase_1 | at clojure.lang.AFn.call(AFn.java:18)
metabase_1 | at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
metabase_1 | at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
metabase_1 | at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
metabase_1 | at java.base/java.lang.Thread.run(Unknown Source)
metabase_1 | 2023-04-10 11:11:08,004 DEBUG middleware.log :: GET /api/user/current 401 335.3 µs (0 DB calls)
metabase_1 | "Unauthenticated"

And following the url redirection that i get in the browser when I try to login

http://ipaddress/auth/login?redirect=%2F

that log is Metabase saying that it doesn't have an email server configured, please check Managing people and groups

@Luigi, I guessed that and as I am not able to login to the frontend so unable to set the SMTP details.

I had multiple tried to build multiple containers by putting following details in the env but unable to see whether it is accepting the SMTP details or not. I gone through all of the PostgreSQL Database but couldnt fine any mail related setting being stored in the database.

PYTHONUNBUFFERED=0
POSTGRES_PASSWORD=<<complex & long password>>
MB_SMTP_HOST=smtp.gmail.com
MB_SMTP_PORT=465
MB_SMTP_STARTTLS=true
MB_SMTP_USERNAME=<>@gmail.com
MB_SMTP_PASSWORD=<>
MB_SMTP_FROM_ADDRESS=<>@gmail.com
MB_SMTP_FROM_NAME=Your Name
MB_ENCRYPTION_SECRET_KEY=<<44 char long key>>

please try resetting the admin password as I sent in the article

Sorry if it appears I am asking for spoon feeding but I am not.
I had gone through all the articles available even before posting here and gone through again as you sent the link.

May be I am missing something obvious.

The link your shared is redirecting to

I searched the same article on google and even that is redirect to above link (expected)

On the account setting page there is no link to reset the passord. Though it had link to following article

This article suggest to ensure if user is active (need to login the frontend, which I am not)
and secondly share the steps for metabase cloud, mine is on-prem installation.

I had found another article but that was relate to H2.

Can you please point to the portion of the article I maybe missing or how can I enable the reset token via SQL query?

Please see the following article: Managing people and groups, which is how to reset the admin password

I logged in the docker container and run the command :
java -jar metabase.jar reset-password email@example.com

it generated the token and i browsed to the link, which was
https://metabase.example.com/auth/reset_password/<<token without [[[ ]]]>>
something like
https://metabase.example.com/auth/reset_password/1_7db2b600-d538-4aeb-b4f7-0cf5b1970d89

I was able to reset the password, but again not able to login .

Same error persist.

I think may be we should focus on setting up the SMTP details in the container.

the smtp settings have nothing to do with the problem you're seeing. Please post the guide that you used for running Metabase, the version you're running, and now post a video of what you're seeing.

I'm pretty sure there's something on your browser doing nasty things, please type the password you're using in a text file to check that what you're typing is exactly what you're inserting when you reset the password

Though i tried different system, different browsers but it was not working. So I am ruling out cookies issue.
I tried multiple versions of Metabase, so it wasn't version issue too.
I deleted and recreated containers like 10-15 times - for both - Metabase & Postgres. Nothing worked.
Eventually, I ended up wiping out the VPS and did fresh installation. So that worked.

I don't have logical explanation on why it was not working earlier and why it started now. But thats what worked for me. Maybe this will help anyone who is facing similar problem.

sorry to disagree, but recommending to wipe the infrastructure and starting over is not something that's recommended by anyone in Metabase. There was clearly something going on somewhere on your installation that was causing this issues.

Before posting my query to the forum, I spent lot of time on Forum past topics, Google, ChatGPT. After posting the query on the forum, I logically moved forward with the troubleshooting. @Luiggi you were fantastic help and very prompt in responding to my queries.

I am never in the favor of wiping the infrastructure and it was last resort for me too. As it was testing server so it was okay for me. But after wiping out the server, same docker-compose.yml worked like charm and with few minutes everything was up & running.