Error executing action `run` on resource 'bash[migrate gitlab-rails database]

hi all iam new to gitlab , iam trying to install gitlab ce on my local machine but iam getting this following error when i run

sudo gitlab-ctl reconfigure

iam getting this below error :

Warnings:
Environment variable LANG specifies a non-UTF-8 locale. GitLab requires UTF-8 encoding to function properly. Please check your locale settings.

Running handlers:
There was an error running gitlab-ctl reconfigure:

bash[migrate gitlab-rails database] (gitlab::database_migrations line 54) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received ‘1’
---- Begin output of “bash” “/tmp/chef-script20200724-28154-12h8vf3” ----
STDOUT: rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:

PG::DuplicateTable: ERROR: relation “abuse_reports” already exists
/opt/gitlab/embedded/service/gitlab-rails/db/migrate/20171230123729_init_schema.rb:18:in up' /opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/db.rake:49:in block (3 levels) in <top (required)>’
/opt/gitlab/embedded/bin/bundle:23:in load' /opt/gitlab/embedded/bin/bundle:23:in

Caused by:
ActiveRecord::StatementInvalid: PG::DuplicateTable: ERROR: relation “abuse_reports” already exists
/opt/gitlab/embedded/service/gitlab-rails/db/migrate/20171230123729_init_schema.rb:18:in up' /opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/db.rake:49:in block (3 levels) in <top (required)>’
/opt/gitlab/embedded/bin/bundle:23:in load' /opt/gitlab/embedded/bin/bundle:23:in

Caused by:
PG::DuplicateTable: ERROR: relation “abuse_reports” already exists
/opt/gitlab/embedded/service/gitlab-rails/db/migrate/20171230123729_init_schema.rb:18:in up' /opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/db.rake:49:in block (3 levels) in <top (required)>’
/opt/gitlab/embedded/bin/bundle:23:in load' /opt/gitlab/embedded/bin/bundle:23:in
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
== 20171230123729 InitSchema: migrating =======================================
– enable_extension(“plpgsql”)
-> 0.0044s
– enable_extension(“pg_trgm”)
-> 0.0035s
– create_table(“abuse_reports”, {:id=>:serial})
STDERR:
---- End output of “bash” “/tmp/chef-script20200724-28154-12h8vf3” ----
Ran “bash” “/tmp/chef-script20200724-28154-12h8vf3” returned 1

my changes to the file :slight_smile:

sudo vim /etc/gitlab/gitlab.rb
external_url 'https://git.xx.pw'

nginx[‘redirect_http_to_https’] = true
nginx[‘ssl_certificate’] = “/etc/letsencrypt/live/git.xxx.pw/fullchain.pem”
nginx[‘ssl_certificate_key’] = “/etc/letsencrypt/live/git.xx.pw/privkey.pem”
nginx[‘ssl_dhparam’] = "/etc/gitlab/ssl/dhparams.pem

can anyone help me with this issue

Running handlers:
There was an error running gitlab-ctl reconfigure:

bash[migrate gitlab-rails database] (gitlab::database_migrations line 54) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received ‘1’
---- Begin output of “bash” “/tmp/chef-script20200724-1017-1e08pdu” ----
STDOUT: rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:

PG::DuplicateTable: ERROR: relation “abuse_reports” already exists
/opt/gitlab/embedded/service/gitlab-rails/db/migrate/20171230123729_init_schema.rb:18:in up' /opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/db.rake:49:in block (3 levels) in <top (required)>’
/opt/gitlab/embedded/bin/bundle:23:in load' /opt/gitlab/embedded/bin/bundle:23:in

Caused by:
ActiveRecord::StatementInvalid: PG::DuplicateTable: ERROR: relation “abuse_reports” already exists
/opt/gitlab/embedded/service/gitlab-rails/db/migrate/20171230123729_init_schema.rb:18:in up' /opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/db.rake:49:in block (3 levels) in <top (required)>’
/opt/gitlab/embedded/bin/bundle:23:in load' /opt/gitlab/embedded/bin/bundle:23:in

Caused by:
PG::DuplicateTable: ERROR: relation “abuse_reports” already exists
/opt/gitlab/embedded/service/gitlab-rails/db/migrate/20171230123729_init_schema.rb:18:in up' /opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/db.rake:49:in block (3 levels) in <top (required)>’
/opt/gitlab/embedded/bin/bundle:23:in load' /opt/gitlab/embedded/bin/bundle:23:in
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
== 20171230123729 InitSchema: migrating =======================================
– enable_extension(“plpgsql”)
-> 0.0033s
– enable_extension(“pg_trgm”)
-> 0.0031s
– create_table(“abuse_reports”, {:id=>:serial})
STDERR:
---- End output of “bash” “/tmp/chef-script20200724-1017-1e08pdu” ----
Ran “bash” “/tmp/chef-script20200724-1017-1e08pdu” returned 1

Running handlers complete
Chef Client failed. 3 resources updated in 32 seconds

anyone

re ran the whole installation resolved now