Gitlab reconfigure error

Hi, I have the self-hosted gitlab instance running in the my server and i wanted to change the external url in the gitlab.rb file and then i run the following command gitlab-ctl reconfigure

Then i got the following errors

 Error executing action `run` on resource 'ruby_block[directory resource: /var/opt/gitlab/git-data/repositories]'
There was an error running gitlab-ctl reconfigure:

storage_directory[/var/opt/gitlab/git-data/repositories] (gitlab::gitlab-rails line 57) had an error: Mixlib::ShellOut::ShellCommandFailed: ruby_block[directory resource: /var/opt/gitlab/git-data/repositories] (/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/resources/storage_directory.rb line 34) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of stat --printf='%U' $(readlink -f /var/opt/gitlab/git-data/repositories) ----
STDOUT: 
STDERR: stat: missing operand
Try 'stat --help' for more information.
---- End output of stat --printf='%U' $(readlink -f /var/opt/gitlab/git-data/repositories) ----
Ran stat --printf='%U' $(readlink -f /var/opt/gitlab/git-data/repositories) returned 1

Gitlab instance running without any issues and i can see all the services are running in Gitlab.

Any idea about this behavior ? TIA

I don’t see a connection between that error message and trying to change the external URL. Did you happen to try a gitlab-ctl reconfigure before changing that? Can you perhaps try changing it back?

The readlink command in the error message makes very little sense to me - and fails on the (old) GitLab servers we (still) have around that stored data locally (i.e. used /var/opt/gitlab/git-data), so I’m more surprised this is even attempted than that it fails.

It might just be that I can’t find my way round the cookbooks used when reconfiguring gitlab, but I can’t find anywhere in them where readlink is used.

What GitLab version do you run?

Hi,

I’m using the Gitlab v14.2.3-ee