我所遇到的GitLab 502问题的解决
2015-02-11 20:17
218 查看
今天在阿里云上配置GitLab,不过一直出现错误502错误。
502
GitLab is not responding.
Please contact your GitLab administrator if this problem persists.
经过一个下午的查找终于发现了错误,原来是在服务器上还开启了一个tomcat服务,占用了8080端口,使GitLab的unicorn服务不能开启。
最后在/etc/gitlab/gitlab.rb 中做出如下修改
再
这里记录一下解决问题的大概经过,也算给自己长经验。
安装好GitLab,开启服务,发现有502错误。这是开始寻找解决办法,各种百度。
1.找到
2.这时我跑到GitLab的官网去寻找解决办法,https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md
ctrl+f 502 找到官方教程中说502出现的问题
Note that on a single-core server it may take up to a minute to restart Unicorn and Sidekiq. Your GitLab instance will give a 502 error until Unicorn is up again.
It is also possible to start, stop or restart individual components.
Unicorn supports zero-downtime reloads. These can be triggered as follows:
Note that you cannot use a Unicorn reload to update the Ruby runtime.
尝试用上面两个命令解决,发现没有用。
这时我怒了,不断的输入
3.这时差不多找到了问题的所在了,应该就是unicorn的问题。然后看官方教程,可以使用
4.好了,终于发现了问题的所在。这时候的选择就变成了是把原来8080端口的服务给杀了还是将unicorn的端口换一个呢。这个就看自己的具体需求了。我这边是将unicorn端口换成了9090,方法就是开头讲的方法了。
502
GitLab is not responding.
Please contact your GitLab administrator if this problem persists.
经过一个下午的查找终于发现了错误,原来是在服务器上还开启了一个tomcat服务,占用了8080端口,使GitLab的unicorn服务不能开启。
最后在/etc/gitlab/gitlab.rb 中做出如下修改
unicorn['port'] = 9090
再
gitlab-ctl reconfigure重启配置,这样GitLab服务器就可以正常运行了。
这里记录一下解决问题的大概经过,也算给自己长经验。
安装好GitLab,开启服务,发现有502错误。这是开始寻找解决办法,各种百度。
1.找到
/var/log/gitlab/nginx中的错误日志文件,发现有如下错误
/var/opt/gitlab/gitlab-rails/sockets/gitlab.socket failed (2: No such file or directory),然后用 nc命令创建了这个socket文件,最终权限设为
srwxrwxrwx,用户和组设置为git:git,但发现这个方法行不通。
2.这时我跑到GitLab的官网去寻找解决办法,https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md
ctrl+f 502 找到官方教程中说502出现的问题
Note that on a single-core server it may take up to a minute to restart Unicorn and Sidekiq. Your GitLab instance will give a 502 error until Unicorn is up again.
It is also possible to start, stop or restart individual components.
sudo gitlab-ctl restart sidekiq
Unicorn supports zero-downtime reloads. These can be triggered as follows:
sudo gitlab-ctl hup unicorn
Note that you cannot use a Unicorn reload to update the Ruby runtime.
尝试用上面两个命令解决,发现没有用。
这时我怒了,不断的输入
gitlab-ctl status,发现unicorn的pid一直在变大。而其他几个服务的pid没有变化。
3.这时差不多找到了问题的所在了,应该就是unicorn的问题。然后看官方教程,可以使用
gitlab-ctl tail unicorn来跟踪unicorn的状态,这时候悲催的发现原来时8080端口被占用了
E, [2015-02-11T17:27:57.818492 #26687] ERROR -- : adding listener failed addr=127.0.0.1:8080 (in use) E, [2015-02-11T17:27:57.818621 #26687] ERROR -- : retrying in 0.5 seconds (4 tries left) E, [2015-02-11T17:27:58.318902 #26687] ERROR -- : adding listener failed addr=127.0.0.1:8080 (in use) E, [2015-02-11T17:27:58.318998 #26687] ERROR -- : retrying in 0.5 seconds (3 tries left) E, [2015-02-11T17:27:58.819309 #26687] ERROR -- : adding listener failed addr=127.0.0.1:8080 (in use) E, [2015-02-11T17:27:58.819423 #26687] ERROR -- : retrying in 0.5 seconds (2 tries left) E, [2015-02-11T17:27:59.319954 #26687] ERROR -- : adding listener failed addr=127.0.0.1:8080 (in use) E, [2015-02-11T17:27:59.320076 #26687] ERROR -- : retrying in 0.5 seconds (1 tries left)
4.好了,终于发现了问题的所在。这时候的选择就变成了是把原来8080端口的服务给杀了还是将unicorn的端口换一个呢。这个就看自己的具体需求了。我这边是将unicorn端口换成了9090,方法就是开头讲的方法了。
相关文章推荐
- 我所遇到的GitLab 502问题的解决
- 解决国内安装GitLab时gem命令遇到的问题
- 解决GitLab提交MergeRequest时,提示502 GitLab is not responding.的问题
- GitLab 502问题的解决
- Linux上安装gitlab所遇到的问题及解决方法
- 搭建gitlab社区版遇到的问题解决
- 在汇编程序中获得命令行参数(已经解决了以前遇到的问题)
- 遇到的两例CDO.Message Error问题的解决
- 制作web安装文件时遇到的几个小问题及其解决思路
- 在VS.NET 2003中建立项目时遇到的两个问题及解决方法 (转贴)
- JDBC链接sql server数据库遇到的问题和解决方法
- Java使用Oracle遇到的最大游标超出问题及其解决方法
- 解决IE经常出现“Microsoft Internet Explorer遇到问题需要关闭……”的信息提示
- Eclipse启动遇到的问题获得解决
- 用python编写ASP脚本时遇到的问题,初步的解决方法,目前正在寻找更好的解决办法。
- 使用最新的cvs及cvsweb,遇到的问题解决办法。
- 制作web安装文件时遇到的几个小问题及其解决思路(续一)
- 解决在Eclipse中配置JBoss、Tomcat等插件时遇到的问题
- 在使用BizTalk时遇到一个很郁闷的问题 之解决篇
- 我遇到的一些问题【解决了贴出来当积累了】