Return_Code 2019-06-10 13:07 采纳率: 0%
浏览 1455

gitlab启动报502错误 使用默认的postgresql数据库 未使用mysql数据库

端口未占用,启动都成功的,使用的是默认的postgresql数据库

gitlab-ctl reconfigure 重新构建也都成功没问题

查看gitlab 日志 gitlab-ctl tail unicorn 提示

==> /var/log/gitlab/unicorn/unicorn_stderr.log <==
I, [2019-06-10T12:52:27.162323 #8789]  INFO -- : Refreshing Gem list

==> /var/log/gitlab/unicorn/unicorn_stdout.log <==
bundler: failed to load command: unicorn (/opt/gitlab/embedded/bin/unicorn)

==> /var/log/gitlab/unicorn/unicorn_stderr.log <==
LoadError: No such file to load -- active_record/connection_adapters/mysql/column
  /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/activesupport-5.0.7.1/lib/active_support/dependencies.rb:293:in `require'
  /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/activesupport-5.0.7.1/lib/active_support/dependencies.rb:293:in `block in require'
  /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/activesupport-5.0.7.1/lib/active_support/dependencies.rb:257:in `block in load_dependency'
  /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/activesupport-5.0.7.1/lib/active_support/dependencies.rb:663:in `new_constants_in'
  /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/activesupport-5.0.7.1/lib/active_support/dependencies.rb:257:in `load_dependency'
  /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/activesupport-5.0.7.1/lib/active_support/dependencies.rb:293:in `require'
  /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/activerecord-5.0.7.1/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:3:in `<top (required)>'
  /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/activesupport-5.0.7.1/lib/active_support/dependencies.rb:293:in `require'
  /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/activesupport-5.0.7.1/lib/active_support/dependencies.rb:293:in `block in require'
  /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/activesupport-5.0.7.1/lib/active_support/dependencies.rb:257:in `block in load_dependency'
  /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/activesupport-5.0.7.1/lib/active_support/dependencies.rb:663:in `new_constants_in'
  /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/activesupport-5.0.7.1/lib/active_support/dependencies.rb:257:in `load_dependency'
  /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/activesupport-5.0.7.1/lib/active_support/dependencies.rb:293:in `require'
  /opt/gitlab/embedded/service/gitlab-rails/lib/mysql_zero_date.rb:10:in `<top (required)>'
  /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/activesupport-5.0.7.1/lib/active_support/dependencies.rb:478:in `load'
  /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/activesupport-5.0.7.1/lib/active_support/dependencies.rb:478:in `block in load_file'
  /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/activesupport-5.0.7.1/lib/active_support/dependencies.rb:663:in `new_constants_in'
  /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/activesupport-5.0.7.1/lib/active_support/dependencies.rb:477:in `load_file'
  /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/activesupport-5.0.7.1/lib/active_support/dependencies.rb:375:in `block in require_or_load'
  /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/activesupport-5.0.7.1/lib/active_support/dependencies.rb:37:in `block in load_interlock'
  /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/activesupport-5.0.7.1/lib/active_support/dependencies/interlock.rb:12:in `block in loading'
  /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/activesupport-5.0.7.1/lib/active_support/concurrency/share_lock.rb:150:in `exclusive'
  /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/activesupport-5.0.7.1/lib/active_support/dependencies/interlock.rb:11:in `loading'
  /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/activesupport-5.0.7.1/lib/active_support/dependencies.rb:37:in `load_interlock'
  /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/activesupport-5.0.7.1/lib/active_support/dependencies.rb:358:in `require_or_load'
  /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/activesupport-5.0.7.1/lib/active_support/dependencies.rb:336:in `depend_on'
  /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/activesupport-5.0.7.1/lib/active_support/dependencies.rb:252:in `require_dependency'
  /opt/gitlab/embedded/service/gitlab-rails/config/application.rb:21:in `<class:Application>'
  /opt/gitlab/embedded/service/gitlab-rails/config/application.rb:8:in `<module:Gitlab>'
  /opt/gitlab/embedded/service/gitlab-rails/config/application.rb:7:in `<top (required)>'
  /opt/gitlab/embedded/service/gitlab-rails/config/environment.rb:3:in `require_relative'
  /opt/gitlab/embedded/service/gitlab-rails/config/environment.rb:3:in `<top (required)>'
  /opt/gitlab/embedded/service/gitlab-rails/config.ru:23:in `require'
  /opt/gitlab/embedded/service/gitlab-rails/config.ru:23:in `block in <main>'
  /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/rack-2.0.6/lib/rack/builder.rb:55:in `instance_eval'
  /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/rack-2.0.6/lib/rack/builder.rb:55:in `initialize'
  /opt/gitlab/embedded/service/gitlab-rails/config.ru:1:in `new'
  /opt/gitlab/embedded/service/gitlab-rails/config.ru:1:in `<main>'
  /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/unicorn-5.4.1/lib/unicorn.rb:56:in `eval'
  /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/unicorn-5.4.1/lib/unicorn.rb:56:in `block in builder'
  /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/unicorn-5.4.1/lib/unicorn/http_server.rb:795:in `build_app!'
  /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/unicorn-5.4.1/lib/unicorn/http_server.rb:139:in `start'
  /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/unicorn-5.4.1/bin/unicorn:126:in `<top (required)>'
  /opt/gitlab/embedded/bin/unicorn:23:in `load'
  /opt/gitlab/embedded/bin/unicorn:23:in `<top (required)>'

==> /var/log/gitlab/unicorn/current <==
2019-06-10_04:52:31.53925 master failed to start, check stderr log for details
2019-06-10_04:52:32.54230 failed to start a new unicorn master
2019-06-10_04:52:32.55118 starting new unicorn master

有哪位大神遇到这种问题帮忙看下,谢谢~!

  • 写回答

1条回答

  • Leon-D 2019-07-17 14:14
    关注

    我也遇到这个问题,通过日志LoadError: No such file to load -- active_record/connection_adapters/mysql/column可以看出,是缺少_active_record/connection_adapters/mysql/column_类库了,从日志 /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/activesupport-5.0.7.1/ 可以看出你的rails是5.0版本的,可以去github:https://github.com/rails/rails/tree/5-0-stable下载整个rails5.0工程,打开压缩包如图
    图片说明
    把mysql文件上传到_/opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/activerecord-5.0.7.1/lib/active_record/connection_adapters_目录下:如图
    图片说明
    执行gitlab-ctl reconfigure,后再重启 gitlab-ctl restart即可

    评论

报告相同问题?

悬赏问题

  • ¥20 XP系统在重新启动后进不去桌面,一直黑屏。
  • ¥15 opencv图像处理,需要四个处理结果图
  • ¥15 无线移动边缘计算系统中的系统模型
  • ¥15 深度学习中的画图问题
  • ¥15 java报错:使用mybatis plus查询一个只返回一条数据的sql,却报错返回了1000多条
  • ¥15 Python报错怎么解决
  • ¥15 simulink如何调用DLL文件
  • ¥15 关于用pyqt6的项目开发该怎么把前段后端和业务层分离
  • ¥30 线性代数的问题,我真的忘了线代的知识了
  • ¥15 有谁能够把华为matebook e 高通骁龙850刷成安卓系统,或者安装安卓系统