Default root password problem with AWS EC2 GitLab Ubuntu AMI

Hi,

Please help with GitLab issue with root password.

In AWS cloud I deployed EC2 instance for Gitlab server on AWS cloud using this AMI:
GitLab-Ubuntu-20-04-2021.12.18.115439-prod-7hry6zkv5keeu.

After starting EC2 instance I ssh to EC2 instance and updated Ubuntu OS:
sudo apt-get update

To change root password I edited the file /etc/gitlab/gitlab.rb and set the password on this line and saved the file:
gitlab_rails[‘initial_root_password’] =

Confirmed the password using this command:
sudo cat /etc/gitlab/gitlab.rb | grep -i root

Stopped and started GitLab server. When I try to login as root I get 500 error.

I ran this command to update root password. Still getting 500 error when login.
sudo gitlab-rake ‘gitlab:password:reset[root]’

Root password didn’t get updated in the file /etc/gitlab/gitlab.rb

Thank you
Narayanan

Hi,

can you share the HTTP 500 error context from the logs? This means that something is wrong on the server side, maybe a typo in the configuration, or otherwise missing quotes.

Cheers,
Michael

Hi @dnsmichi Thanks for your response. I was unable to share log files without sanitizing those first. Documentation in this link did not work in my AWS infrastructure: AWS implementation patterns | GitLab and it caused confusion.

I got the default root password using this command on GitLab Linux server. I keep using this when I need to login as root to do admin work:
sudo cat /etc/gitlab/initial_root_password

ubuntu@ip-NNN-MM-LL-KKK:~$ sudo cat /etc/gitlab/initial_root_password

WARNING: This value is valid only in the following conditions

1. If provided manually (either via GITLAB_ROOT_PASSWORD environment variable or via gitlab_rails['initial_root_password'] setting in gitlab.rb, it was provided before database was seeded for the first time (usually, the first reconfigure run).**

2. Password hasn’t been changed manually, either via UI or via command line.**

If the password shown here doesn’t work, you must reset the admin password following Reset a user's password | GitLab**

Password: xxxyyzzzaaabbbcccdddeee

NOTE: This file will be automatically deleted in the first reconfigure run after 24 hours.**

ubuntu@ip-NNN-MM-LL-KKK:~$**

Try typing url directly to admin console after you login?

Like this: domain.gitlab.com/admin

It takes me to the admin area, dashboard.

The log lines from the timestamp when the HTTP 500 happens in the browser would be helpful. Plus minus 10 lines. Otherwise, I don’t know how we can help investigate further.