虚拟机部署gitlab 接口502 含泪做笔记 ==> /var/log/gitlab/nginx/gitlab_error.log <== 2023/09/04 16:45:44 [crit] 42817#0: *2 connect() to unix://var/opt/gitlab/gitlab-rails/sockets/gitlab.socket failed
行不通勿喷,谢谢!!
**虚拟机部署gitlab 接口502 **
gitlab-ctl tail
查看具体报错信息:
==> /var/log/gitlab/nginx/gitlab_error.log <==
2023/09/04 16:45:44 [crit] 42817#0: *2 connect() to unix://var/opt/gitlab/gitlab-rails/sockets/gitlab.socket failed (13: Permission denied) while connecting to upstream, client: 192.168.0.110, server: 192.168.0.110, request: "GET / HTTP/1.1", upstream: "http://unix://var/opt/gitlab/gitlab-rails/sockets/gitlab.socket:/", host: "192.168.0.110:8090"
Nginx 在连接到上游服务器时出现了权限被拒绝的错误,
解决办法:给那个对应的文件加权限
chmod -R o+x /var/opt/gitlab/gitlab-rails/
已解决!!!!!!!!
前置错误!!
Linux下安装GitLab仓库,史上最详细的教程来啦~:https://blog.csdn.net/smilehappiness/article/details/106353324
1.安装各种教程安装后还是会502,各种解决方法都不行,一直502
==> /var/log/gitlab/gitlab-workhorse/current <==
{"correlation_id":"01H9FJ43YQVARMHV4BZCEHSH6A","duration_ms":0,"error":"badgateway: failed to receive response: dial unix /var/opt/gitlab/gitlab-rails/sockets/gitlab.socket: connect: connection refused","level":"error","method":"GET","msg":"","time":"2023-09-04T15:39:42+08:00","uri":"/-/metrics"}
{"content_type":"text/html; charset=utf-8","correlation_id":"01H9FJ43YQVARMHV4BZCEHSH6A","duration_ms":0,"host":"127.0.0.1:8080","level":"info","method":"GET","msg":"access","proto":"HTTP/1.1","referrer":"","remote_addr":"127.0.0.1:0","remote_ip":"127.0.0.1","route":"^/-/","status":502,"system":"http","time":"2023-09-04T15:39:42+08:00","ttfb_ms":0,"uri":"/-/metrics","user_agent":"Prometheus/2.46.0","written_bytes":3044}
后面自行使用nginx部署
实际上,这个快速部署的gitlab-ce软件包内是自带nginx的,然而实际服务器部署的话,我们常常需要部署在系统原生的nginx上,我们可以按照这样的方式进行操作:参考:https://www.cnblogs.com/HansBug/p/9813627.html
自行使用nginx部署后才是上面的报错信息,加权限后就可以了,网上教程都是基于这个!!!!!
gitlab如何查看初始化root密码
https://www.cnblogs.com/ianlab/p/17132228.html
密码要大于8位数:如果提示了以下内容,请重置密码为更复杂的
/opt/gitlab/embedded/lib/ruby/gems/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/validatio ns.rb:80:in
`raise_validation_error': Validation failed:
Password must not contain commonly us
ed combinations of words and letters (ActiveRecord::RecordInvalid)