"uninitialized constant Gitlab::GitlabShell"

Problem to solve

So… I’m a bit new to self-hosting Gitlab, so I’ve had the absolute pleasure of trying to learn Ruby syntax and how everything could be managed via Docker Compose. I’ve been trying to push my project up to my instance of Gitlab CE, but I keep running into issues where the connections are forcibly closed. As it turns out, most of the ruby variables I set either using the GITLAB_OMNIBUS_CONFIG variable or gitlab.rb file simply aren’t picked up and applied by gitlab-ctl. I wiped away what I was working on so far, built a brand new instance with docker volumes instead of bind mounts, and tried to troubleshoot as thoroughly as I could. I even omitted my custom gitlab.rb and the Omnibus environment variable. Every time I try to run my instance, I get this error from gitlab-ctl: "uninitialized constant Gitlab::GitlabShell". It appears whether I run gitlab-ctl reconfigure + show-config or just show-config. I’ve ran this in the latest build, nightly build, and even older images that were known to be working. Does anyone have any suggestions as to how I can proceed. I have this running out of my file server (OpenMediaVault) with all of the correct permissions needed, if that helps.

Steps to reproduce

  1. docker compose up -d
  2. docker exec -it gitlab-ctl show-config

Configuration

Here is a redacted version of my gitlab.rb configuration file (appropriately called with multiline YAML when testing the environment variable):

external_url ‘http://<external_URL>’
gitlab_rails[‘time_zone’] = ‘America/Chicago’
gitlab_rails[‘smtp_enable’] = true
gitlab_rails[‘smtp_address’] = ‘smtp[.]gmail[.]com’
gitlab_rails[‘smtp_port’] = 587
gitlab_rails[‘smtp_user_name’] = “@gmail.com
gitlab_rails[‘smtp_password’] = “<app_password>”
gitlab_rails[‘smtp_domain’] = ‘smtp[.]gmail[.]com’
gitlab_rails[‘smtp_authentication’] = “login”
gitlab_rails[‘smtp_enable_starttls_auto’] = true
gitlab_rails[‘gitlab_email_from’] = ‘@gmail.com
gitlab_rails[‘smtp_tls’] = false
gitlab_rails[‘smtp_openssl_verify_mode’] = ‘none’
gitlab_rails[‘lfs_enabled’] = true
gitlab_rails[‘initial_root_password’] = ‘<root_password>’
gitlab_workhorse[‘api_queue_duration’] = “3600s”
nginx[‘enable’] = true
nginx[‘listen_https’] = true
nginx[‘listen_port’] = 443
nginx[‘hsts_max_age’] = 0
nginx[‘client_max_body_size’] = ‘0’
nginx[‘redirect_http_to_https’] = true
nginx[‘ssl_dhparam’] = nil
nginx[‘proxy_read_timeout’] = 3600
nginx[‘proxy_connect_timeout’] = 3600
gitlab_rails[‘gitlab_port’] = 443
patroni[‘retry_timeout’] = 1000

Versions

Please add an x whether options apply, and add the version information.

  • Self-managed X
  • GitLab.com SaaS
  • Dedicated

Versions

  • Nightly
  • Latest
  • 18.4
  • 16.5

Hello, I have a similar issue.

I get the same error message only when I run show-config, however reconfigure works fine for me.
I use omnibus installation using rpm package.

@Profiteer did you manage to solve this issue ?

Thanks.

For versions before 18.8, the workaround is to edit the file 
/opt/gitlab/embedded/cookbooks/show-config.rb 
and change the string 
package::show_config 
to 
gitlab::show_config