###GitLabに詳しい方いますか?
事象:先ほど、apt-get upgrade
を行いGitLabのアップデートを行おうとした際に、エラーが発生し、下記のURLのHPを元にいろいろと修正を行っていました。
- http://qiita.com/hiko_t/items/8757ef19d55c5cbc4714
- http://obel.hatenablog.jp/entry/20161116/1479242090
1の方のURLに載っていた
$ sudo rm /var/lib/dpkg/info/gitlab-ce.p* $ sudo dpkg --configure gitlab-ce
の処理を行い、やってみましたが、ブラウザからアクセスをすると502エラーとなってしまいます。
なので、その後、2のURLに載っていた
# gitlab-ctl stop # rm /var/opt/gitlab/gitlab-rails/sockets/gitlab.socket # gitlab-ctl restart
を実行しました。今考えればもっとよく読んでいればよかったかなと思いますが後の祭りで、gitlab.socket
ファイルが無いのでやはり502エラーとなってしまいました。
gitlab.socketを再作成する方法、もしくは事象の修正方法等が分かる方がいれば教えて頂きたいです。
また、Unicornのログを見るとPermission denied
となっているので、権限系のエラーなのかもしれません。
もしもお分かりになる方がいたらお教え名がいます。
###発生している問題・エラーメッセージ
gitlab-ctl tail unicorn
==> /var/log/gitlab/unicorn/current <== 2016-12-29_04:11:03.74888 master failed to start, check stderr log for details 2016-12-29_04:11:04.76111 failed to start a new unicorn master 2016-12-29_04:11:04.76697 starting new unicorn master ==> /var/log/gitlab/unicorn/unicorn_stderr.log <== I, [2016-12-29T13:11:05.152155 #1669] INFO -- : Refreshing Gem list ==> /var/log/gitlab/unicorn/unicorn_stdout.log <== bundler: failed to load command: unicorn (/opt/gitlab/embedded/service/gem/ruby/2.3.0/bin/unicorn) ==> /var/log/gitlab/unicorn/unicorn_stderr.log <== Errno::EACCES: Permission denied @ rb_sysopen - /opt/gitlab/embedded/service/gitlab-rails/.gitlab_workhorse_secret /opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/workhorse.rb:126:in `initialize' /opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/workhorse.rb:126:in `open' /opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/workhorse.rb:126:in `write_secret' /opt/gitlab/embedded/service/gitlab-rails/config/initializers/gitlab_workhorse_secret.rb:4:in `rescue in <top (required)>' /opt/gitlab/embedded/service/gitlab-rails/config/initializers/gitlab_workhorse_secret.rb:1:in `<top (required)>' /opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:268:in `load' /opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:268:in `block in load' /opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:240:in `load_dependency' /opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:268:in `load' /opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/engine.rb:652:in `block in load_config_initializer' /opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/notifications.rb:166:in `instrument' /opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/engine.rb:651:in `load_config_initializer' /opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/engine.rb:616:in `block (2 levels) in <class:Engine>' /opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/engine.rb:615:in `each' /opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/engine.rb:615:in `block in <class:Engine>' /opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/initializable.rb:30:in `instance_exec' /opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/initializable.rb:30:in `run' /opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/initializable.rb:55:in `block in run_initializers' /opt/gitlab/embedded/lib/ruby/2.3.0/tsort.rb:228:in `block in tsort_each' /opt/gitlab/embedded/lib/ruby/2.3.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component' /opt/gitlab/embedded/lib/ruby/2.3.0/tsort.rb:422:in `block (2 levels) in each_strongly_connected_component_from' /opt/gitlab/embedded/lib/ruby/2.3.0/tsort.rb:431:in `each_strongly_connected_component_from' /opt/gitlab/embedded/lib/ruby/2.3.0/tsort.rb:421:in `block in each_strongly_connected_component_from' /opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/initializable.rb:44:in `each' /opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/initializable.rb:44:in `tsort_each_child' /opt/gitlab/embedded/lib/ruby/2.3.0/tsort.rb:415:in `call' /opt/gitlab/embedded/lib/ruby/2.3.0/tsort.rb:415:in `each_strongly_connected_component_from' /opt/gitlab/embedded/lib/ruby/2.3.0/tsort.rb:349:in `block in each_strongly_connected_component' /opt/gitlab/embedded/lib/ruby/2.3.0/tsort.rb:347:in `each' /opt/gitlab/embedded/lib/ruby/2.3.0/tsort.rb:347:in `call' /opt/gitlab/embedded/lib/ruby/2.3.0/tsort.rb:347:in `each_strongly_connected_component' /opt/gitlab/embedded/lib/ruby/2.3.0/tsort.rb:226:in `tsort_each' /opt/gitlab/embedded/lib/ruby/2.3.0/tsort.rb:205:in `tsort_each' /opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/initializable.rb:54:in `run_initializers' /opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/application.rb:352:in `initialize!' /opt/gitlab/embedded/service/gitlab-rails/config/environment.rb:5:in `<top (required)>' /opt/gitlab/embedded/service/gitlab-rails/config.ru:19:in `require' /opt/gitlab/embedded/service/gitlab-rails/config.ru:19:in `block in <main>' /opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/rack-1.6.5/lib/rack/builder.rb:55:in `instance_eval' /opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/rack-1.6.5/lib/rack/builder.rb:55:in `initialize' /opt/gitlab/embedded/service/gitlab-rails/config.ru:1:in `new' /opt/gitlab/embedded/service/gitlab-rails/config.ru:1:in `<main>' /opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/unicorn-5.1.0/lib/unicorn.rb:56:in `eval' /opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/unicorn-5.1.0/lib/unicorn.rb:56:in `block in builder' /opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/unicorn-5.1.0/lib/unicorn/http_server.rb:752:in `build_app!' /opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/unicorn-5.1.0/lib/unicorn/http_server.rb:129:in `start' /opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/unicorn-5.1.0/bin/unicorn:126:in `<top (required)>' /opt/gitlab/embedded/service/gem/ruby/2.3.0/bin/unicorn:22:in `load' /opt/gitlab/embedded/service/gem/ruby/2.3.0/bin/unicorn:22:in `<top (required)>' ==> /var/log/gitlab/unicorn/current <== 2016-12-29_04:11:09.83501 master failed to start, check stderr log for details 2016-12-29_04:11:10.84271 failed to start a new unicorn master 2016-12-29_04:11:10.84904 starting new unicorn master ==> /var/log/gitlab/unicorn/unicorn_stderr.log <== I, [2016-12-29T13:11:11.233307 #1692] INFO -- : Refreshing Gem list ^C/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/omnibus-ctl-0.3.6/lib/omnibus-ctl.rb:435:in `system': Interrupt from /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/omnibus-ctl-0.3.6/lib/omnibus-ctl.rb:435:in `tail' from /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/omnibus-ctl-0.3.6/lib/omnibus-ctl.rb:575:in `run' from /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/omnibus-ctl-0.3.6/bin/omnibus-ctl:31:in `<top (required)>' from /opt/gitlab/embedded/bin/omnibus-ctl:22:in `load' from /opt/gitlab/embedded/bin/omnibus-ctl:22:in `<main>'
cat /var/log/gitlab/gitlab-workhorse/current | less
2016-12-29_04:32:33.37881 2016/12/29 13:32:33 error: GET "/ユーザー名/プロジェクト名/info/refs?service=git-upload-pack": badgateway: failed after 0s: dial unix /var/opt/gitlab/gitlab-rails/sockets/gitlab.socket: connect: connection refused 2016-12-29_04:32:33.37882 2016/12/29 13:32:33 ErrorPage: serving predefined error page: 502 2016-12-29_04:32:33.37883 サーバー名@ - - [2016-12-29 13:32:33.378442789 +0900 JST] "GET /ユーザー名/プロジェクト名/info/refs?service=git-upload-pack HTTP/1.1" 502 2662 "" "git/2.7.4.windows.1" 0.000317 2016-12-29_04:32:37.93419 2016/12/29 13:32:37 error: GET "/グループ名/アプリケーション名.git/info/refs?service=git-upload-pack": preAuthorizeHandler newUpstreamRequest: newRequest: sign JWT: secret.JWTTokenString: secret.setBytes: read "/opt/gitlab/embedded/service/gitlab-rails/.gitlab_workhorse_secret": open /opt/gitlab/embedded/service/gitlab-rails/.gitlab_workhorse_secret: permission denied 2016-12-29_04:32:37.93421 サーバー名@ - - [2016-12-29 13:32:37.934017388 +0900 JST] "GET /グループ名/アプリケーション名.git/info/refs?service=git-upload-pack HTTP/1.1" 500 22 "" "git/2.7.4.windows.1" 0.000116
###試したこと
- 復元
対象のファイルの復元を試みましたが、復元できませんでした。。。
- ファイルの作成
最初はgitlab.socket not found
というエラーだったので、単純にgitlab.socket
ファイルを作成してみました。一応chmod
とchown
を行いました。(chown
に関してはgit:gitlab-www
としました。)
###補足情報
OS:Ubuntu16.04.1 LTS (Xenial Xerus)
環境:KVM
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。