GitLab installation on arch not working (exec rake gitlab:env:info RAILS_ENV=production" shows several errors and server is not responding on port 80 or shell on 8080)

I installed GitLab following the instructions at https://wiki.archlinux.org/index.php/Gitlab#Installation. When I run su - gitlab -s /bin/sh -c "cd '/usr/share/webapps/gitlab'; bundle-2.3 exec rake gitlab:check RAILS_ENV=production" I see the following errors:

Checking GitLab Shell ...

GitLab Shell version >= 5.8.0 ? ... OK (5.8.0)
Repo base directory exists?
default... yes
Repo storage directories are symlinks?
default... no
Repo paths owned by gitlab:root, or gitlab:gitlab?
default... yes
Repo paths access is drwxrws---?
default... yes
hooks directories in repos are links: ... can't check, you have no projects
Running /usr/share/webapps/gitlab-shell/bin/check
Check GitLab API access: FAILED: Failed to connect to internal API
gitlab-shell self-check failed
  Try fixing it:
  Make sure GitLab is running;
  Check the gitlab-shell configuration file:
  sudo -u gitlab -H editor /usr/share/webapps/gitlab-shell/config.yml
  Please fix the error above and rerun the checks.

Checking GitLab Shell ... Finished

Checking Sidekiq ...

Running? ... no
  Try fixing it:
  sudo -u gitlab -H RAILS_ENV=production bin/background_jobs start
  For more information see:
  doc/install/installation.md in section "Install Init Script"
  see log/sidekiq.log for possible errors
  Please fix the error above and rerun the checks.

Checking Sidekiq ... Finished

Checking Reply by email ...

IMAP server credentials are correct? ... yes
Init.d configured correctly? ... no
  Try fixing it:
  Enable mail_room in the init.d configuration.
  For more information see:
  doc/administration/reply_by_email.md
  Please fix the error above and rerun the checks.
MailRoom running? ... can't check because of previous errors

Checking Reply by email ... Finished

Checking LDAP ...

LDAP is disabled in config/gitlab.yml

Checking LDAP ... Finished

Checking GitLab ...

Git configured correctly? ... yes
Database config exists? ... yes
All migrations up? ... yes
Database contains orphaned GroupMembers? ... no
GitLab config exists? ... yes
GitLab config up to date? ... yes
Log directory writable? ... yes
Tmp directory writable? ... yes
Uploads directory exists? ... yes
Uploads directory has correct permissions? ... yes
Uploads directory tmp has correct permissions? ... skipped (no tmp uploads folder yet)
Init script exists? ... no
  Try fixing it:
  Install the init script
  For more information see:
  doc/install/installation.md in section "Install Init Script"
  Please fix the error above and rerun the checks.
Init script up-to-date? ... can't check because of previous errors
Projects have namespace: ... can't check, you have no projects
Redis version >= 2.8.0? ... yes
Ruby version >= 2.3.3 ? ... yes (2.4.1)
Git version >= 2.7.3 ? ... yes (2.14.1)
Active users: ... 1

Checking GitLab ... Finished

When I try to access the gitlab server on port 80 with the FQDN I get no response (but the port is open in iptables). I changed the host in gitlab.yml to 127.0.0.1:80 and trying to access it locally with curl gives me “Connection refused”.

As far as I can tell everything is running (systemctl status on gitlab-unicorn, gitlab-gitaly, gitlab-sidekiq, gitlab-workhorse, and gitlab-mailroom show active/running and no errors that I can see).

I managed to get the sidekiq error to go away. I’m not really sure what did it, but I know I changed the ssh port for gitlab-shell as I’m not running ssh on port 22. Unfortunately the gitlab-shell error still remains and I can’t access gitlab on port 80 or the shell on port 8080.

It seems like the webserver (unicorn I think?) just isn’t running, despite the fact that systemctl status gitlab-unicorn shows it’s active, and ps -ef | grep ruby shows ruby-2.3 /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/bin/unicorn_rails -c /usr/share/webapps/gitlab/config/unicorn.rb -E production running.

I stopped the unicorn service, changed the shell for the gitlab account, and logged in as that user. I wasn’t able to run ruby-2.3 /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/bin/unicorn_rails -c /usr/share/webapps/gitlab/config/unicorn.rb -E production so I installed unicorn, unicorn-worker-killer, and rake. But running that command gives me an error in unicorn.stderr.log:

/usr/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/spec_set.rb:87:in `block in materialize': Could not find rake-12.0.0 in any of the sources (Bundler::GemNotFound)
	from /usr/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/spec_set.rb:81:in `map!'
	from /usr/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/spec_set.rb:81:in `materialize'
	from /usr/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/definition.rb:159:in `specs'
	from /usr/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/definition.rb:218:in `specs_for'
	from /usr/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/definition.rb:207:in `requested_specs'
	from /usr/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/runtime.rb:109:in `block in definition_method'
	from /usr/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/runtime.rb:21:in `setup'
	from /usr/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler.rb:101:in `setup'
	from /usr/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/setup.rb:19:in `<top (required)>'
	from /usr/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:133:in `require'
	from /usr/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:133:in `rescue in require'
	from /usr/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:40:in `require'
	from /usr/share/webapps/gitlab/config/boot.rb:6:in `<top (required)>'
	from /usr/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
	from /usr/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
	from /usr/share/webapps/gitlab/config/application.rb:1:in `<top (required)>'
	from /usr/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
	from /usr/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
	from /usr/share/webapps/gitlab/config/environment.rb:2:in `<top (required)>'
	from /usr/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
	from /usr/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
	from config.ru:19:in `block in <main>'
	from /var/lib/gitlab/.gem/ruby/2.4.0/gems/rack-2.0.3/lib/rack/builder.rb:55:in `instance_eval'
	from /var/lib/gitlab/.gem/ruby/2.4.0/gems/rack-2.0.3/lib/rack/builder.rb:55:in `initialize'
	from config.ru:1:in `new'
	from config.ru:1:in `<main>'
	from /var/lib/gitlab/.gem/ruby/2.4.0/gems/unicorn-5.3.0/lib/unicorn.rb:56:in `eval'
	from /var/lib/gitlab/.gem/ruby/2.4.0/gems/unicorn-5.3.0/lib/unicorn.rb:56:in `block in builder'
	from /var/lib/gitlab/.gem/ruby/2.4.0/gems/unicorn-5.3.0/bin/unicorn_rails:139:in `block in rails_builder'
	from /var/lib/gitlab/.gem/ruby/2.4.0/gems/unicorn-5.3.0/lib/unicorn/http_server.rb:796:in `build_app!'
	from /var/lib/gitlab/.gem/ruby/2.4.0/gems/unicorn-5.3.0/lib/unicorn/http_server.rb:139:in `start'
	from /var/lib/gitlab/.gem/ruby/2.4.0/gems/unicorn-5.3.0/bin/unicorn_rails:209:in `<top (required)>'
	from /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/bin/unicorn_rails:22:in `load'
	from /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/bin/unicorn_rails:22:in `<main>'

However, I started gitlab-unicorn from systemd, and now when running curl on localhost:8080 I get:
<html><body>You are being <a href="http://localhost:8080/users/sign_in">redirected</a>.</body></html>

Running the check still gives me the same gitlab-shell error, and the sidekiq error is back again…

Really not sure where to go from here. Any suggestions?

I eventually got it working on a clean Arch install. I’m not really sure what the issues were, as I installed it via pacman and couldn’t get it working, installed via source and ran into errors with node, and then installed again via pacman.