[DRE-maint] Bug#955332: gitlab : Gitlab systemdless / apache2

Bardot Jérôme bardot.jerome at gmail.com
Mon Mar 30 02:20:10 BST 2020


Package: gitlab
Version: 12.6.8-1+fto10+1

I try to make gitlab running in a systemdless system and using apache2
instead of nginx.

I have this error :

Traceback (most recent call last):
        13: from /usr/bin/unicorn_rails:209:in `<main>'
        12: from /usr/bin/unicorn_rails:209:in `new'
        11: from /usr/lib/ruby/vendor_ruby/unicorn/http_server.
rb:77:in `initialize'
        10: from /usr/lib/ruby/vendor_ruby/unicorn/http_server.
rb:77:in `new'
         9: from /usr/lib/ruby/vendor_ruby/unicorn/configurator
.rb:77:in `initialize'
         8: from /usr/lib/ruby/vendor_ruby/unicorn/configurator
.rb:92:in `reload'
         7: from /usr/bin/unicorn_rails:202:in `block in <main>
'
         6: from /usr/lib/ruby/2.5.0/fileutils.rb:193:in `mkdir
_p'
         5: from /usr/lib/ruby/2.5.0/fileutils.rb:193:in `each'

         4: from /usr/lib/ruby/2.5.0/fileutils.rb:208:in `block
 in mkdir_p'
         3: from /usr/lib/ruby/2.5.0/fileutils.rb:208:in `rever
se_each'
         2: from /usr/lib/ruby/2.5.0/fileutils.rb:210:in `block
 (2 levels) in mkdir_p'
         1: from /usr/lib/ruby/2.5.0/fileutils.rb:232:in `fu_mk
dir'
/usr/lib/ruby/2.5.0/fileutils.rb:232:in `mkdir': Permission den
ied @ dir_s_mkdir - tmp/cache (Errno::EACCES)
master failed to start, check stderr log for details

After search the error come from

ls -al /run/gitlab/
total 0
drwxr-xr-x  3 root root   60 mars  25 20:09 .
drwxr-xr-x 30 root root 1080 mars  30 00:50 ..
drwxr-xr-x  3 root root   60 mars  25 20:09 sockets

a chown look missing somewhere (or done in systemd unit)

chown gitlab:gitlab /run/gitlab/

after that a restart the directory look like that :

ls -al /run/gitlab/
total 12
drwxr-xr-x  6 gitlab gitlab  200 mars  30 02:27 .
drwxr-xr-x 30 root   root   1080 mars  30 00:50 ..
drwx------  2 gitlab gitlab   40 mars  30 02:23 cache
srwxrwxrwx  1 gitlab gitlab    0 mars  30 02:27 gitlab.socket
-rw-------  1 gitlab gitlab    4 mars  30 02:27 gitlab-workhorse.pid
drwx------  2 gitlab gitlab   40 mars  30 02:23 pids
drwx------  2 gitlab gitlab   40 mars  30 02:23 sessions
-rw-------  1 gitlab gitlab    5 mars  30 02:27 sidekiq.pid
drwxr-xr-x  3 root   root     60 mars  25 20:09 sockets
-rw-------  1 gitlab gitlab    4 mars  30 02:23 unicorn.pid


but the check script

runuser -u gitlab -- sh -c 'cd /usr/share/gitlab && .
/etc/gitlab/gitlab-debian.conf && export DB RAILS_ENV && bundle exec
rake gitlab:check RAILS_ENV=production'

shows :

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.

and the restart always output (service gitlab restart) :

The GitLab Workhorse is not running.

but at least web UI look good. I will try commit/push in few hours.


I also have a bunch of warning during check and not present in restart :

/usr/share/gitlab/lib/gitlab.rb:38: warning: already initialized
constant Gitlab::COM_URL
/usr/share/gitlab/lib/gitlab.rb:38: warning: previous definition of
COM_URL was here
/usr/share/gitlab/lib/gitlab.rb:39: warning: already initialized
constant Gitlab::APP_DIRS_PATTERN
/usr/share/gitlab/lib/gitlab.rb:39: warning: previous definition of
APP_DIRS_PATTERN was here
/usr/share/gitlab/lib/gitlab.rb:40: warning: already initialized
constant Gitlab::SUBDOMAIN_REGEX
/usr/share/gitlab/lib/gitlab.rb:40: warning: previous definition of
SUBDOMAIN_REGEX was here
/usr/share/gitlab/lib/gitlab.rb:41: warning: already initialized
constant Gitlab::VERSION
/usr/share/gitlab/lib/gitlab.rb:41: warning: previous definition of
VERSION was here
/usr/share/gitlab/lib/gitlab.rb:42: warning: already initialized
constant Gitlab::INSTALLATION_TYPE
/usr/share/gitlab/lib/gitlab.rb:42: warning: previous definition of
INSTALLATION_TYPE was here
/usr/share/gitlab/lib/gitlab.rb:43: warning: already initialized
constant Gitlab::HTTP_PROXY_ENV_VARS
/usr/share/gitlab/lib/gitlab.rb:43: warning: previous definition of
HTTP_PROXY_ENV_VARS was here
/usr/share/gitlab/config/initializers/2_app.rb:6: warning: already
initialized constant Gitlab::VERSION
/usr/share/gitlab/lib/gitlab.rb:41: warning: previous definition of
VERSION was here



-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0x053A41EF03878A98.asc
Type: application/pgp-keys
Size: 3098 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-ruby-extras-maintainers/attachments/20200330/34702e3b/attachment-0001.key>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 899 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-ruby-extras-maintainers/attachments/20200330/34702e3b/attachment-0001.sig>


More information about the Pkg-ruby-extras-maintainers mailing list