GItlab:Internal API available: FAILED - Internal API error 502

Internal API available: FAILED - Internal API error 502

背景

安装gitlab时候,8080端口被jenkins应用占用,启动gitlab时页面报502错误。
服务器运行gitlab检查:gitlab-rake gitlab:check 后发现有报错

Internal API available: FAILED - Internal API error (502)
gitlab-shell self-check failed
Try fixing it:
Make sure GitLab is running;
Check the gitlab-shell configuration file:
sudo -u git -H editor /opt/gitlab/embedded/service/gitlab-shell/config.yml
Please fix the error above and rerun the checks.

解决方法

修改/etc/gitlab/gitlab.rb 中puma端口(我的做法是放开puma所有配置,仅供参考)
[root@ZDHYW-154 gitlab]# cat /etc/gitlab/gitlab.rb | grep -E -v “#|$”
external_url ‘http://10.13.101.154:8092’
#gitlab_workhorse[‘auth_backend’] = “http://localhost:8080”
puma[‘enable’] = true
puma[‘ha’] = false
puma[‘worker_timeout’] = 60
puma[‘worker_processes’] = 2
puma[‘min_threads’] = 4
puma[‘max_threads’] = 4
puma[‘listen’] = ‘127.0.0.1’
puma[‘port’] = 8081
puma[‘socket’] = ‘/var/opt/gitlab/gitlab-rails/sockets/gitlab.socket’
puma[‘somaxconn’] = 1024
puma[‘pidfile’] = ‘/opt/gitlab/var/puma/puma.pid’
puma[‘state_path’] = ‘/opt/gitlab/var/puma/puma.state’
puma[‘log_directory’] = “/var/log/gitlab/puma”
puma[‘per_worker_max_memory_mb’] = 850
puma[‘exporter_enabled’] = false
puma[‘exporter_address’] = “127.0.0.1”
puma[‘exporter_port’] = 8083

然后gitlab-ctl reconfigure
gitlab-ctl restart

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值