
我嘗試透過運行sudo apt-get update
和 來更新 GitLab sudo apt-get install gitlab-ce
。安裝過程中一切似乎都很好,但安裝完成後,nginx 停止工作,我無法啟動它。
運行後:sudo gitlab-ctl status
,我得到這個:
run: gitlab-workhorse: (pid 4378) 8613s; run: log: (pid 937) 9953s
run: logrotate: (pid 19116) 1412s; run: log: (pid 933) 9953s
down: nginx: 0s, normally up, want up; run: log: (pid 943) 9953s
run: postgresql: (pid 4456) 8581s; run: log: (pid 939) 9953s
run: redis: (pid 4466) 8581s; run: log: (pid 935) 9953s
run: sidekiq: (pid 4474) 8578s; run: log: (pid 940) 9953s
run: unicorn: (pid 4496) 8576s; run: log: (pid 931) 9953s
我嘗試運行sudo gitlab-ctl reconfigure
並重新啟動。那沒有幫助。我也嘗試過sudo gitlab-ctl restart nginx
,這給了我這個:
timeout: down: nginx: 0s, normally up, want up
有任何想法嗎?謝謝!
答案1
嘗試運行sudo gitlab-ctl tail
以查看所有錯誤。
我犯了一個愚蠢的錯誤,在之前編輯 GitLab 實例時沒有為 GitLab 註冊表子網域建立憑證。
查看錯誤後,我發現nginx正在等待讀取檔案並卡在此處:
==> /var/log/gitlab/nginx/current <==
2019-03-05_09:17:42.23918 nginx:[emerg] BIO_new_file(「/etc/gitlab/ssl/registry.gitlab.xxx.com.crt」)失敗(SSL:錯誤:02001002:系統函式庫:fopen:沒有這樣的檔案或目錄:fopen('/etc/gitlab/ssl/registry.gitlab.xxx.com.crt','r')錯誤:2006D080:BIO例程:BIO_new_file:沒有這樣的檔案)
我只能說*摀臉*。在執行 LetsEncrypt 修復我的配置後,我得到了修復。