阿里云专有网络GitLab6.3.1启动报错 master failed to start
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了阿里云专有网络GitLab6.3.1启动报错 master failed to start,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含3481字,纯文字阅读大概需要5分钟。
内容图文
帮朋友搭建Gitlab环境,前面所有步骤均正常操作,但是在启动时候,报错: master failed to start, check stderr log for details。
硬件环境:阿里云ECS主机
网络:专有网络
启动时现象:
[git@iZ2ze2wsg ~]$ /etc/init.d/gitlab restart Removing stale Unicorn web server pid. This is most likely caused by the web server crashing the last time it ran. Shutting down Unicorn. GitLab is not running. Starting both the GitLab Unicorn and Sidekiq. The GitLab Unicorn web server with pid 31138 is running. The GitLab Sidekiq job dispatcher with pid 31146 is running. GitLab and all its components are up and running. #过几秒钟后,弹出以下提示,并且服务自动停止 [git@iZ2ze2wsg ~]$ master failed to start, check stderr log for details
错误日志:# tail -30f /home/git/gitlab/log/unicorn.stderr.log 找到报错信息
# tail -30f /home/git/gitlab/log/unicorn.stderr.log I, [2017-08-29T11:31:52.962540 #31138] INFO -- : Refreshing Gem list I, [2017-08-29T11:32:06.664874 #31138] INFO -- : listening on addr=/home/git/gitlab/tmp/sockets/gitlab.socket fd=16 F, [2017-08-29T11:32:06.665194 #31138] FATAL -- : error adding listener addr=*.*.*.*:9000 Errno::EADDRNOTAVAIL: Cannot assign requested address - bind(2) ...
错误中显示,无法绑定IP及监听端口,于是
# ifconfig eth0 Link encap:Ethernet HWaddr 00:16:3E:30:FB:BB inet addr:172.17.68.96 Bcast:172.17.79.255 Mask:255.255.240.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:638415 errors:0 dropped:0 overruns:0 frame:0 TX packets:345807 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:758309941 (723.1 MiB) TX bytes:44165060 (42.1 MiB) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:568244 errors:0 dropped:0 overruns:0 frame:0 TX packets:568244 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:76679508 (73.1 MiB) TX bytes:76679508 (73.1 MiB)
因为是单主机,一般创建的时候都会选择阿里云的经典网络,未成想。。他用的专有网络,只有内网IP:172.17.68.96,原因找到了,接下来修改gitlab相关配置
[git@iZ2ze2wsg config]$cd /home/git/gitlab/config [git@iZ2ze2wsg config]$vim gitlab.yml host: 172.17.68.96 port: 9000 [git@iZ2ze2wsg config]$vim unicorn.rb listen "172.17.68.96:9000", :tcp_nopush => true [git@iZ2ze2wsg config]$ vim ../../gitlab-shell/config.yml gitlab_url: "http://eip:9000/"
注:eip为阿里云分配的弹性公网IP,请自行更换成自己的eip
重启gitlab
[git@iZ2ze2wsg config]$ /etc/init.d/gitlab restart Removing stale Unicorn web server pid. This is most likely caused by the web server crashing the last time it ran. Shutting down Unicorn. GitLab is not running. Starting both the GitLab Unicorn and Sidekiq. The GitLab Unicorn web server with pid 31283 is running. The GitLab Sidekiq job dispatcher with pid 31291 is running. GitLab and all its components are up and running.
查看日志,也未再有错误提示,显示有ready ,正常!
# tail -30f /home/git/gitlab/log/unicorn.stderr.log I, [2017-08-29T11:49:28.139597 #31283] INFO -- : Refreshing Gem list I, [2017-08-29T11:49:41.865250 #31283] INFO -- : listening on addr=/home/git/gitlab/tmp/sockets/gitlab.socket fd=16 I, [2017-08-29T11:49:41.869768 #31283] INFO -- : listening on addr=172.17.68.96:9000 fd=17 I, [2017-08-29T11:49:41.875595 #31283] INFO -- : master process ready I, [2017-08-29T11:49:41.887061 #31309] INFO -- : worker=1 ready I, [2017-08-29T11:49:41.881496 #31307] INFO -- : worker=0 ready
访问 http://eip:9000/ 成功!
本文出自 “大瑞” 博客,请务必保留此出处http://darui.blog.51cto.com/3168426/1960777
原文:http://darui.blog.51cto.com/3168426/1960777
内容总结
以上是互联网集市为您收集整理的阿里云专有网络GitLab6.3.1启动报错 master failed to start全部内容,希望文章能够帮你解决阿里云专有网络GitLab6.3.1启动报错 master failed to start所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。