首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Gitlab 6.0 - Gitlab服务没有运行

Gitlab 6.0 - Gitlab服务没有运行
EN

Stack Overflow用户
提问于 2013-09-07 02:44:29
回答 3查看 5K关注 0票数 1

我已经通过傀儡模块就在这里安装了gitlab 6:

我基于这里的例子创建了以下傀儡清单:

代码语言:javascript
复制
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',
}

我安装了以下木偶模块

代码语言:javascript
复制
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)

gitlab模块是从这里:

代码语言:javascript
复制
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

我不得不使用guilherme的nginx模块,而不是jfryman/ puppet模块,因为第22期还没有进入木偶锻造模块。

代码语言:javascript
复制
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)

我已经没有错误地安装了傀儡模块,但是当我导航到服务器时仍然会出现502个坏网关错误(10.2.192.28 )

根据日志,nginx无法连接到套接字。确实,套接字文件不存在。

代码语言:javascript
复制
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"

根据google的说法,当gitlab进程没有运行时,这种情况就会发生。

为什么gitlab进程不能继续运行?

代码语言:javascript
复制
root@gitlab2:/var/log/nginx# service gitlab start && service gitlab status
GitLab service started
GitLab service is not running.

我已经尝试过这个建议,在此提供:

代码语言:javascript
复制
root@gitlab2:~# sudo -u git -H touch /home/git/gitlab/config/puma.rb

知道如何排除gitlab进程死亡的原因吗?

有什么办法修正502错误吗?

我安装gitlab有什么明显的问题吗?

在Ubuntu12.10 Openstack上运行,端口为22和80,开放给内部网络。

EN

回答 3

Stack Overflow用户

回答已采纳

发布于 2014-01-17 16:21:33

Gitlab不再使用puma,我修复了这个问题,创建了一个新的ubuntu安装,并使用了傀儡模块。

票数 0
EN

Stack Overflow用户

发布于 2013-09-07 23:25:14

在6.0时,pumaunicorn所取代,所以您所尝试的都不会奏效。查看/home/git/gitlab/log/unicorn.stderr.log中是否也有任何错误。

我建议您尝试从master 这里下载新的修改后的init脚本。

票数 1
EN

Stack Overflow用户

发布于 2014-04-25 11:51:42

此外,如果您试图在已经使用端口8080的服务器上运行Gitlab,则需要在两个文件中更改端口号(基于总括安装)。/var/opt/gitlab/gitlab-shell/config.yaml/var/opt/gitlab/gitlab-rails/etc/unicorn.rb

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/18669160

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档