【发布时间】:2021-07-23 21:26:10
【问题描述】:
我最近被任命为本地安装的新 gitlab 管理员,但我对 gitlab 的经验有限。 不幸的是,前任管理员选择转向更绿色的牧场。
我们的安装如下: gitlab-ee-13.10.3-ee.0.el7.x86_64 继续运行 CentOS Linux 版本 7.9.2009(核心)
不幸的是,我继承了一个损坏的 gitlab,我似乎无法弄清楚如何解决 我们的问题。
我们的 gitlab 网页只返回 502 糟糕,GitLab 响应时间过长。错误
gitlab-rails 控制台
失败并显示错误消息:
Traceback (most recent call last):
56: from bin/rails:4:in `<main>'
55: from bin/rails:4:in `require'
54: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/railties-6.0.3.6/lib/rails/commands.rb:18:in `<top (required)>'
53: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/railties-6.0.3.6/lib/rails/command.rb:46:in `invoke'
52: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/railties-6.0.3.6/lib/rails/command/base.rb:69:in `perform'
51: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/thor-1.1.0/lib/thor.rb:392:in `dispatch'
50: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/thor-1.1.0/lib/thor/invocation.rb:127:in `invoke_command'
49: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/thor-1.1.0/lib/thor/command.rb:27:in `run'
48: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/railties-6.0.3.6/lib/rails/commands/console/console_command.rb:101:in `perform'
47: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/railties-6.0.3.6/lib/rails/command/actions.rb:15:in `require_application_and_environment!'
46: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/railties-6.0.3.6/lib/rails/command/actions.rb:28:in `require_environment!'
45: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/railties-6.0.3.6/lib/rails/application.rb:339:in `require_environment!'
44: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activesupport-6.0.3.6/lib/active_support/dependencies.rb:324:in `require'
43: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activesupport-6.0.3.6/lib/active_support/dependencies.rb:291:in `load_dependency'
42: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activesupport-6.0.3.6/lib/active_support/dependencies.rb:324:in `block in require'
41: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activesupport-6.0.3.6/lib/active_support/dependencies.rb:324:in `require'
40: from /opt/gitlab/embedded/service/gitlab-rails/config/environment.rb:7:in `<top (required)>'
39: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/railties-6.0.3.6/lib/rails/application.rb:363:in `initialize!'
38: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/railties-6.0.3.6/lib/rails/initializable.rb:60:in `run_initializers'
37: from /opt/gitlab/embedded/lib/ruby/2.7.0/tsort.rb:205:in `tsort_each'
36: from /opt/gitlab/embedded/lib/ruby/2.7.0/tsort.rb:226:in `tsort_each'
35: from /opt/gitlab/embedded/lib/ruby/2.7.0/tsort.rb:347:in `each_strongly_connected_component'
34: from /opt/gitlab/embedded/lib/ruby/2.7.0/tsort.rb:347:in `call'
33: from /opt/gitlab/embedded/lib/ruby/2.7.0/tsort.rb:347:in `each'
32: from /opt/gitlab/embedded/lib/ruby/2.7.0/tsort.rb:349:in `block in each_strongly_connected_component'
31: from /opt/gitlab/embedded/lib/ruby/2.7.0/tsort.rb:415:in `each_strongly_connected_component_from'
30: from /opt/gitlab/embedded/lib/ruby/2.7.0/tsort.rb:415:in `call'
29: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/railties-6.0.3.6/lib/rails/initializable.rb:50:in `tsort_each_child'
28: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/railties-6.0.3.6/lib/rails/initializable.rb:50:in `each'
27: from /opt/gitlab/embedded/lib/ruby/2.7.0/tsort.rb:421:in `block in each_strongly_connected_component_from'
26: from /opt/gitlab/embedded/lib/ruby/2.7.0/tsort.rb:431:in `each_strongly_connected_component_from'
25: from /opt/gitlab/embedded/lib/ruby/2.7.0/tsort.rb:422:in `block (2 levels) in each_strongly_connected_component_from'
24: from /opt/gitlab/embedded/lib/ruby/2.7.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
23: from /opt/gitlab/embedded/lib/ruby/2.7.0/tsort.rb:228:in `block in tsort_each'
22: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/railties-6.0.3.6/lib/rails/initializable.rb:61:in `block in run_initializers'
21: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/railties-6.0.3.6/lib/rails/initializable.rb:32:in `run'
20: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/railties-6.0.3.6/lib/rails/initializable.rb:32:in `instance_exec'
19: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/railties-6.0.3.6/lib/rails/engine.rb:624:in `block in <class:Engine>'
18: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/railties-6.0.3.6/lib/rails/engine.rb:624:in `each'
17: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/railties-6.0.3.6/lib/rails/engine.rb:625:in `block (2 levels) in <class:Engine>'
16: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/railties-6.0.3.6/lib/rails/engine.rb:665:in `load_config_initializer'
15: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activesupport-6.0.3.6/lib/active_support/notifications.rb:182:in `instrument'
14: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/railties-6.0.3.6/lib/rails/engine.rb:666:in `block in load_config_initializer'
13: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activesupport-6.0.3.6/lib/active_support/dependencies.rb:318:in `load'
12: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activesupport-6.0.3.6/lib/active_support/dependencies.rb:291:in `load_dependency'
11: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activesupport-6.0.3.6/lib/active_support/dependencies.rb:318:in `block in load'
10: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activesupport-6.0.3.6/lib/active_support/dependencies.rb:318:in `load'
9: from /opt/gitlab/embedded/service/gitlab-rails/config/initializers/0_inject_feature_flags.rb:7:in `<top (required)>'
8: from /opt/gitlab/embedded/service/gitlab-rails/lib/feature.rb:137:in `register_definitions'
7: from /opt/gitlab/embedded/service/gitlab-rails/lib/feature/definition.rb:102:in `reload!'
6: from /opt/gitlab/embedded/service/gitlab-rails/lib/feature/definition.rb:145:in `load_all!'
5: from /opt/gitlab/embedded/service/gitlab-rails/lib/feature/definition.rb:145:in `each_with_object'
4: from /opt/gitlab/embedded/service/gitlab-rails/lib/feature/definition.rb:145:in `each'
3: from /opt/gitlab/embedded/service/gitlab-rails/lib/feature/definition.rb:146:in `block in load_all!'
2: from /opt/gitlab/embedded/service/gitlab-rails/lib/feature/definition.rb:161:in `load_all_from_path!'
1: from /opt/gitlab/embedded/service/gitlab-rails/lib/feature/definition.rb:161:in `each'
/opt/gitlab/embedded/service/gitlab-rails/lib/feature/definition.rb:165:in `block in load_all_from_path!': Feature flag 'usage_data_api' is already defined in '/opt/gitlab/embedded/service/gitlab-rails/config/feature_flags/development/usage_data_api.yml' (Feature::InvalidFeatureFlagError)
并且 gitlab-ctl 重新配置失败:
There was an error running gitlab-ctl reconfigure:
bash[migrate gitlab-rails database] (gitlab::database_migrations line 70) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of "bash" "/tmp/chef-script20210430-15489-165kk34" ----
STDOUT: rake aborted!
Feature::InvalidFeatureFlagError: Feature flag 'usage_data_api' is already defined in '/opt/gitlab/embedded/service/gitlab-rails/config/feature_flags/development/usage_data_api.yml'
/opt/gitlab/embedded/service/gitlab-rails/lib/feature/definition.rb:165:in `block in load_all_from_path!'
/opt/gitlab/embedded/service/gitlab-rails/lib/feature/definition.rb:161:in `each'
/opt/gitlab/embedded/service/gitlab-rails/lib/feature/definition.rb:161:in `load_all_from_path!'
/opt/gitlab/embedded/service/gitlab-rails/lib/feature/definition.rb:146:in `block in load_all!'
/opt/gitlab/embedded/service/gitlab-rails/lib/feature/definition.rb:145:in `each'
/opt/gitlab/embedded/service/gitlab-rails/lib/feature/definition.rb:145:in `each_with_object'
/opt/gitlab/embedded/service/gitlab-rails/lib/feature/definition.rb:145:in `load_all!'
/opt/gitlab/embedded/service/gitlab-rails/lib/feature/definition.rb:102:in `reload!'
/opt/gitlab/embedded/service/gitlab-rails/lib/feature.rb:137:in `register_definitions'
/opt/gitlab/embedded/service/gitlab-rails/config/initializers/0_inject_feature_flags.rb:7:in `<top (required)>'
/opt/gitlab/embedded/service/gitlab-rails/config/environment.rb:7:in `<top (required)>'
/opt/gitlab/embedded/bin/bundle:23:in `load'
/opt/gitlab/embedded/bin/bundle:23:in `<main>'
Tasks: TOP => gitlab:db:configure => environment
(See full trace by running task with --trace)
STDERR:
---- End output of "bash" "/tmp/chef-script20210430-15489-165kk34" ----
Ran "bash" "/tmp/chef-script20210430-15489-165kk34" returned 1
我在网上四处张望,但我找不到其他有这个问题的人。 我还尝试删除有问题的 usage_data_api.yml 文件,但随后命令失败并显示新的错误消息(无法加载 --json 文件)
网上有文章描述如何使用浏览器启用禁用功能, 但由于我们的网页都返回 502,我无法使用该选项。
话虽如此,我什至不知道上述错误消息是我们网页无法正常工作的根本原因,还是其他原因。
任何和所有帮助appriciated。
问候
肯尼斯
【问题讨论】:
-
您找到解决方案了吗?我们从 gitlab-ce 13.10.3 到 13.12.15 也有类似的问题