日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 运维知识 > linux >内容正文

linux

linux nginx 503,GitLab网页500/502/503错误–Nginx无法启动问题排查

發(fā)布時(shí)間:2025/3/15 linux 28 豆豆
生活随笔 收集整理的這篇文章主要介紹了 linux nginx 503,GitLab网页500/502/503错误–Nginx无法启动问题排查 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

讓小湯裝個(gè)GitLab,折騰了一周了還沒弄好,網(wǎng)站一直是50x錯(cuò)誤,看了下情況是nginx服務(wù)掛了。這里記錄一下排查的步驟。

首先看看gitlab服務(wù)的情況:

gitlab-ctl status

。。。。

run: logrotate: (pid 19388) 838s; run: log: (pid 1746) 2102s

finish: mailroom: (pid 30439) 5s; run: log: (pid 1659) 2132s

down: nginx: 1s, normally up, want up; run: log: (pid 1687) 2120s

run: node-exporter: (pid 19578) 829s; run: log: (pid 1979) 2092s

。。。。

看來(lái)是nginx服務(wù)down了,試試看手動(dòng)重啟nginx:

gitlab-ctl start nginx && gitlab-ctl status

。。。

run: nginx: (pid 972) 7s; run: log: (pid 971) 7s

。。。

開啟成功了,但是網(wǎng)頁(yè)依舊500錯(cuò)誤,再看status發(fā)現(xiàn)nginx又掛掉了,說(shuō)明nginx服務(wù)內(nèi)部出現(xiàn)了問(wèn)題,繼續(xù)排查。

看看nginx的日志(完整的日志在這里/var/log/gitlab/nginx/current,但是也可以通過(guò)tail看實(shí)時(shí)的情況):

gitlab-ctl tail nginx

。。。

==> /var/log/gitlab/nginx/current <==

2019-11-24_20:19:12.23865 nginx: [emerg] cannot load certificate "/etc/gitlab/ssl/registry.code.cloudraft.cn.crt": BIO_new_file() failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/etc/gitlab/ssl/registry.code.cloudraft.cn.crt','r') error:2006D080:BIO routines:BIO_new_file:no such file)

。。。

找到問(wèn)題了,缺了個(gè)證書文件,補(bǔ)上就好了。用lsof看看端口監(jiān)聽情況

lsof -i:443

COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME

nginx 5153 root 10u IPv4 547257 0t0 TCP *:https (LISTEN)

nginx 5161 gitlab-www 10u IPv4 547257 0t0 TCP *:https (LISTEN)

nginx 5162 gitlab-www 10u IPv4 547257 0t0 TCP *:https (LISTEN)

nginx 5163 gitlab-www 10u IPv4 547257 0t0 TCP *:https (LISTEN)

This article is under CC BY-NC-SA 4.0 license.

Please quote the original link:https://www.liujason.com/article/396.html

總結(jié)

以上是生活随笔為你收集整理的linux nginx 503,GitLab网页500/502/503错误–Nginx无法启动问题排查的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。