gitlab无法保存项目。请稍后再试

时间:2013-12-07 01:13:34

标签: redis gitlab

我只是想在我的gitlab实例上创建一个新的存储库。 我收到此错误消息:

无法保存项目。请稍后再试

我检查了包含此内容的日志:

Completed 200 OK in 599.9ms (Views: 571.8ms | ActiveRecord: 6.2ms)
Started GET "/projects/new" for 127.0.0.1 at 2013-12-07 01:59:43 +0100
Processing by ProjectsController#new as HTML
  Rendered projects/_errors.html.haml (2.2ms)
  Rendered projects/new.html.haml within layouts/navless (154.3ms)
  Rendered layouts/_head.html.haml (2.4ms)
  Rendered layouts/_search.html.haml (40.6ms)
  Rendered layouts/_head_panel.html.haml (50.5ms)
  Rendered layouts/_flash.html.haml (0.2ms)
Completed 200 OK in 223.1ms (Views: 214.9ms | ActiveRecord: 2.2ms)
Started POST "/projects" for 127.0.0.1 at 2013-12-07 01:59:56 +0100
Processing by ProjectsController#create as JS
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=", "project"=>{"name"=>"repository", "path"=>"", "namespace_id"=>"6", "import_url"=>"", "description"=>""}, "commit"=>"Create project"}
  Rendered projects/_errors.html.haml (2.2ms)
  Rendered projects/create.js.haml (6.6ms)
Completed 200 OK in 476.6ms (Views: 226.9ms | ActiveRecord: 2.7ms)

无法真正看到日志中的任何问题。 我还检查了环境: 捆绑exec rake gitlab:env:info RAILS_ENV =生产     (在/ home / git / gitlab中)

System information
System:         Debian 7.2
Current User:   git
Using RVM:      no
Ruby Version:   1.9.3p194
Gem Version:    1.8.23
Bundler Version:1.3.5
Rake Version:   10.1.0

GitLab information
Version:        6.3.1
Revision:       09c6f66
Directory:      /home/git/gitlab
DB Adapter:     mysql2
URL:            https://scm.domain.tld
HTTP Clone URL: https://scm.domain.tld/some-project.git
SSH Clone URL:  git@scm.domain.tld:some-project.git
Using LDAP:     no
Using Omniauth: no

GitLab Shell
Version:        1.7.9
Repositories:   /home/git/repositories/
Hooks:          /home/git/gitlab-shell/hooks/
Git:            /usr/bin/git

我也运行了这个命令: 捆绑exec rake gitlab:检查RAILS_ENV =生产

Checking Environment ...

Git configured for git user? ... yes
Has python2? ... yes
python2 is supported version? ... yes

Checking Environment ... Finished

Checking GitLab Shell ...

GitLab Shell version >= 1.7.9 ? ... OK (1.7.9)
Repo base directory exists? ... yes
Repo base directory is a symlink? ... no
Repo base owned by git:git? ... yes
Repo base access is drwxrws---? ... yes
update hook up-to-date? ... yes
update hooks in repos are links: ...
group1 / repro1 ... ok
group1 / repro2 ... ok
group2 / repro3 ... ok
group1 / repro4... ok
group2 / repro5 ... ok
group5 / repro6 ... ok
group5 / repro7 ... ok
group3 / repro8 ... ok
group4 / repro9 ... ok
group1 / repro11 ... ok
group1 / repro12 ... ok
Running /home/git/gitlab-shell/bin/check
Check GitLab API access: OK
Check directories and files:
        /home/git/repositories: OK
        /home/git/.ssh/authorized_keys: OK
        /usr/bin/redis-cli: OK
gitlab-shell self-check successful

Checking GitLab Shell ... Finished

Checking Sidekiq ...

Running? ... yes
Number of Sidekiq processes ... 1

Checking Sidekiq ... Finished

Checking GitLab ...

Database config exists? ... yes
Database is SQLite ... no
All migrations up? ... yes
GitLab config exists? ... yes
GitLab config outdated? ... no
Log directory writable? ... yes
Tmp directory writable? ... yes
Init script exists? ... yes
Init script up-to-date? ... yes
projects have namespace: ...
group1 / repro1 ... yes
group1 / repro2 ... yes
group2 / repro3 ... yes
group1 / repro4... yes
group2 / repro5 ... yes
group5 / repro6 ... yes
group5 / repro7 ... yes
group3 / repro8 ... yes
group4 / repro9 ... yes
group1 / repro11 ... yes
group1 / repro12 ... yes
Redis version >= 2.0.0? ... yes
Your git bin path is "/usr/bin/git"
Git version >= 1.7.10 ? ... yes (1.7.10)

Checking GitLab ... Finished

我的Redis安装:

Package: redis-server
Source: redis
Version: 2:2.4.14-1
Installed-Size: 568
Maintainer: Chris Lamb <lamby@debian.org>
Architecture: amd64
Depends: libc6 (>= 2.7), libjemalloc1 (>= 2.1.1), adduser
Description-de: Persistente Schlüssel-Wert-Datenbank mit Netzwerkschnittstelle
 Redis ist eine Datenbank für Schlüssel-Wert-Paare. Sie ähnelt memcache,
 wobei die Datenmenge jedoch nicht flüchtig ist. Redis bietet zusätzlich
 native Unterstützung für die atomare Manipulation und Abfrage von
 Datenstrukturen wie Listen und Sets.
 .
 Der Datensatz wird vollständig im Speicher abgelegt und periodisch auf die
 Festplatte geschrieben.
Homepage: http://redis.io/
Description-md5: 9160ed1405585ab844f8750a9305d33f
Tag: implemented-in::c, role::program
Section: database
Priority: optional
Filename: pool/main/r/redis/redis-server_2.4.14-1_amd64.deb
Size: 234586
MD5sum: df2658e5243f8a99bc2205c16a154d0d
SHA1: 727b82f94497a578d35cc26a9bc29d141ff7131a
SHA256: 79e461471d7fa8ee046c441a184d1541ad343e9edf172a4d61659212eb4f4609

我在日志中没有任何有用的东西,也不知道从哪里开始。 请帮忙

以下是我的配置文件:

production: &base
  gitlab:
    host: scm.domain.tld
    port: 443
    https: true
    email_from: build@domain.tld
    support_email: support@localhost
    default_projects_limit: 10
    signup_enabled: false
    default_projects_features:
      issues: false
      merge_requests: true
      wiki: false
      wall: false
      snippets: false
      public: false
  issues_tracker:
  gravatar:
    enabled: true
  omniauth:
    allow_single_sign_on: false
    block_auto_created_users: true
    providers:
  satellites:
    path: /home/git/gitlab-satellites/
  backup:
    path: "tmp/backups"
  gitlab_shell:
    repos_path: /home/git/repositories/
    hooks_path: /home/git/gitlab-shell/hooks/
    upload_pack: true
    receive_pack: true
  git:
    bin_path: /usr/bin/git
    max_size: 5242880 # 5.megabytes
    timeout: 10
  extra:

我的unicorn.rb

worker_processes 3
working_directory "/home/git/gitlab" 
listen "/home/git/gitlab/tmp/sockets/gitlab.socket", :backlog => 64
listen "127.0.0.1:8088", :tcp_nopush => true
timeout 30
pid "/home/git/gitlab/tmp/pids/unicorn.pid"
stderr_path "/home/git/gitlab/log/unicorn.stderr.log"
stdout_path "/home/git/gitlab/log/unicorn.stdout.log"
preload_app true
GC.respond_to?(:copy_on_write_friendly=) and
  GC.copy_on_write_friendly = true
check_client_connection false

before_fork do |server, worker|
  defined?(ActiveRecord::Base) and
    ActiveRecord::Base.connection.disconnect!
  old_pid = "#{server.config[:pid]}.oldbin"
  if old_pid != server.pid
    begin
      sig = (worker.nr + 1) >= server.worker_processes ? :QUIT : :TTOU
      Process.kill(sig, File.read(old_pid).to_i)
    rescue Errno::ENOENT, Errno::ESRCH
    end
  end
end

after_fork do |server, worker|
  defined?(ActiveRecord::Base) and
    ActiveRecord::Base.establish_connection
end

gitlab-shell config

user: git
gitlab_url: "https://scm.domain.tld/"
http_settings:
  self_signed_cert: false
repos_path: "/home/git/repositories"
auth_file: "/home/git/.ssh/authorized_keys"
redis:
  bin: /usr/bin/redis-cli
  host: 127.0.0.1
  port: 6379
  namespace: resque:gitlab
log_level: INFO
audit_usernames: false

2 个答案:

答案 0 :(得分:2)

您有一些类似的问题:

  • issue 5023:解决了,我在gitlab.yml"host: localhost""host: 127.0.0.1"进行了两项更改,并将"repos_path"更改为正确的路径。

  • issue 3328:我使用了Ubuntu method under Sidekiq,它对我有用 您需要一个不同版本的redis-server我猜。

  • issue 3743:MacOSx遇到了一些问题。所以我把mac换成了Ubuntu。我成功安装了它。

答案 1 :(得分:2)

在研究并启用sql日志后,我发现了核心问题。 它不是gitlab.yml中的设置。

他们只告诉前端网站可用的前端,或者它是否使用https或哪个端口。

我从6.2更新到6.3,昨天更新到6.3.1

我认为更新脚本会运行良好。 但他们没有

gitlab删除了一个项目表列。 他们删除了列default_branch。 我将列设置为default_branch可以为null,并且它再次开始工作。

感谢您的帮助。

克里斯

相关问题