Gitlab 6.0 – Gitlab service is not running

I have installed gitlab 6 though the puppet module located here:

I have created the following puppet manifest based on the example here:

root@gitlab2:/etc/puppet# cat /etc/puppet/manifests/site.pp
stage  { 'first': before => Stage['main'] }
stage  { 'last': require => Stage['main'] }

class { 'apt': stage => first; }
class { 'redis': stage => main; }
class { 'nginx': stage => main; }

class {
    'ruby':
    stage => main,
    version => $ruby_version,
    rubygems_update => false;
}

class {
    'ruby::dev':
    stage => main,
    require => Class['ruby']
}

if $::lsbdistcodename == 'quantal' {
    package {
      ['build-essential','libssl-dev','libgdbm-dev','libreadline-dev',
      'libncurses5-dev','libffi-dev','libcurl4-openssl-dev']:
        ensure => installed;
    }

    $ruby_version = '4.9'

    exec {
      'ruby-version':
        command     => '/usr/bin/update-alternatives --set ruby /usr/bin/ruby1.9.1',
        user        => root,
        logoutput   => 'on_failure';
      'gem-version':
        command     => '/usr/bin/update-alternatives --set gem /usr/bin/gem1.9.1',
        user        => root,
        logoutput   => 'on_failure';
    }
  } else {
    $ruby_version = '1:1.9.3'
  }


class { 'mysql::server': stage => main;}

mysql::db { 'gitlabdb':
        ensure => 'present',
        user    => 'gitlab',
        password => 'foo',
        host    => 'localhost',
        grant   => ['all'],
}

class {
  'gitlab':
  git_email           => 'git@someserver.net',
  git_comment         => 'GitLab',
  gitlab_branch       => '6-0-stable',
  gitlabshell_branch  => 'v1.4.0',
  gitlab_dbtype       => 'mysql',
  gitlab_dbname       => 'gitlabdb',
  gitlab_dbuser       => 'gitlab',
  gitlab_dbpwd        => 'foo',
  gitlab_dbhost       => 'localhost',
  gitlab_dbport       => '3306',
  ldap_enabled        => false,
  ldap_host           => 'foo',
  ldap_base           => 'dc=foo,dc=foo',
  ldap_uid            => 'uid',
  ldap_port           => '636',
  ldap_method         => 'ssl',
  ldap_bind_dn        => 'foo',
  ldap_bind_password => 'foo',
}

I have the following puppet modules installed

root@gitlab2:/etc/puppet# puppet module list
/etc/puppet/modules
├── fsalum-redis (v0.0.6)
├── gitlab (???)
├── nginx (???)
├── puppetlabs-apt (v1.2.0)
├── puppetlabs-gcc (v0.1.0)
├── puppetlabs-mysql (v0.9.0)
├── puppetlabs-ruby (v0.0.2)
└── puppetlabs-stdlib (v4.1.0)

The gitlab module is from here:

root@gitlab2:/etc/puppet/modules/gitlab# git remote -v
origin  https://github.com/sbadia/puppet-gitlab.git (fetch)
origin  https://github.com/sbadia/puppet-gitlab.git (push)
root@gitlab2:/etc/puppet/modules/gitlab# git branch
* master

I had to use guilherme’s nginx module instead of jfryman/puppet-nginx module because issue #22 has not been pulled into the puppet forge module yet.

root@gitlab2:/etc/puppet/modules/nginx# git remote -v
origin  https://github.com/guilherme/puppet-nginx.git (fetch)
origin  https://github.com/guilherme/puppet-nginx.git (push)

I have gotten the puppet module to install without errors, but I still get a 502 Bad Gateway error when I navigate to the server (10.2.192.28 )

According to the logs, nginx is unable to connect to the socket. Sure enough the socket file is not present.

tail /var/log/nginx/gitlab_error.log
2013/09/07 01:26:59 [crit] 1042#0: *3 connect() to unix:/home/git/gitlab/tmp/sockets/gitlab.socket failed (2: No such file or directory) while connecting to upstream, client: 10.1.11.12, server: gitlab2.ac, request: "GET / HTTP/1.1", upstream: "http://unix:/home/git/gitlab/tmp/sockets/gitlab.socket:/", host: "10.2.192.28"
2013/09/07 01:32:00 [crit] 1042#0: *6 connect() to unix:/home/git/gitlab/tmp/sockets/gitlab.socket failed (2: No such file or directory) while connecting to upstream, client: 10.1.11.12, server: gitlab2.ac, request: "GET / HTTP/1.1", upstream: "http://unix:/home/git/gitlab/tmp/sockets/gitlab.socket:/", host: "10.2.192.28"

According to google this can happen when the gitlab process is not running.


Why will the gitlab process not stay running?

root@gitlab2:/var/log/nginx# service gitlab start && service gitlab status
GitLab service started
GitLab service is not running.

I’ve tried the suggestion offered here:

root@gitlab2:~# sudo -u git -H touch /home/git/gitlab/config/puma.rb

Any ideas how to troubleshoot why the gitlab process dies?
Any ideas how to fix the 502 error?
Is there anything blatantly wrong with how I am installing gitlab?

Running on an Ubuntu 12.10 Openstack VM with ports 22 and 80 opened to the internal network.

  • Puppet Modules - Best Practices for Installing External Modules and Downloading Packages
  • Puppet exec command runs in shell, but not via puppet
  • vim bundles are not installed by vundle exactly in Puppet
  • How to get a result from a Puppet provisioner
  • Pip install doesn't checkout correct branch
  • Manage Keys with Puppet for puppet-vcsrepo
  • any scripts to create access control in gerrit using DSL format
  • Windows + Cygwin + Single Line If Else + Puppet
  • 3 Solutions collect form web for “Gitlab 6.0 – Gitlab service is not running”

    In 6.0 puma got replaced with unicorn, so what you tried won’t work.
    See if there is also any error in /home/git/gitlab/log/unicorn.stderr.log.

    I suggest you try and download the new revamped init script from master here.

    Gitlab no longer uses puma, I fixed this creating a new ubuntu install, and using this puppet module.

    In addition, if you are trying to run Gitlab on a server that is already using port 8080, then you need to change the port number in two files (based on the omnibus install). /var/opt/gitlab/gitlab-shell/config.yaml and /var/opt/gitlab/gitlab-rails/etc/unicorn.rb

    Git Baby is a git and github fan, let's start git clone.