11.3.6 升级 11.4.0 启动失败 I18n::InvalidLocale: :"zh-CN" is not a valid locale
gitlab_1 | ================================================================================
gitlab_1 | Error executing action `run` on resource 'execute[clear the gitlab-rails cache]'
gitlab_1 | ================================================================================
gitlab_1 |
gitlab_1 | Mixlib::ShellOut::ShellCommandFailed
gitlab_1 | ------------------------------------
gitlab_1 | Expected process to exit with [0], but received '1'
gitlab_1 | ---- Begin output of /opt/gitlab/bin/gitlab-rake cache:clear ----
gitlab_1 | STDOUT:
gitlab_1 | STDERR: rake aborted!
gitlab_1 | I18n::InvalidLocale: :"zh-CN" is not a valid locale
gitlab_1 | /opt/gitlab/embedded/service/gitlab-rails/app/models/concerns/protected_ref.rb:30:in `block in protected_ref_access_levels'
gitlab_1 | /opt/gitlab/embedded/service/gitlab-rails/app/models/concerns/protected_ref.rb:21:in `each'
gitlab_1 | /opt/gitlab/embedded/service/gitlab-rails/app/models/concerns/protected_ref.rb:21:in `protected_ref_access_levels'
gitlab_1 | /opt/gitlab/embedded/service/gitlab-rails/app/models/protected_branch.rb:7:in `<class:ProtectedBranch>'
gitlab_1 | /opt/gitlab/embedded/service/gitlab-rails/app/models/protected_branch.rb:3:in `<top (required)>'
gitlab_1 | /opt/gitlab/embedded/service/gitlab-rails/lib/api/protected_branches.rb:49:in `block (2 levels) in <class:ProtectedBranches>'
gitlab_1 | /opt/gitlab/embedded/service/gitlab-rails/lib/api/protected_branches.rb:46:in `block in <class:ProtectedBranches>'
gitlab_1 | /opt/gitlab/embedded/service/gitlab-rails/lib/api/protected_branches.rb:14:in `<class:ProtectedBranches>'
gitlab_1 | /opt/gitlab/embedded/service/gitlab-rails/lib/api/protected_branches.rb:4:in `<module:API>'
gitlab_1 | /opt/gitlab/embedded/service/gitlab-rails/lib/api/protected_branches.rb:3:in `<top (required)>'
gitlab_1 | /opt/gitlab/embedded/service/gitlab-rails/lib/api/api.rb:136:in `<class:API>'
gitlab_1 | /opt/gitlab/embedded/service/gitlab-rails/lib/api/api.rb:4:in `<module:API>'
gitlab_1 | /opt/gitlab/embedded/service/gitlab-rails/lib/api/api.rb:3:in `<top (required)>'
gitlab_1 | /opt/gitlab/embedded/service/gitlab-rails/config/initializers/rack_attack.rb:12:in `<top (required)>'
gitlab_1 | /opt/gitlab/embedded/service/gitlab-rails/config/environment.rb:11:in `<top (required)>'
gitlab_1 | /opt/gitlab/embedded/bin/bundle:23:in `load'
gitlab_1 | /opt/gitlab/embedded/bin/bundle:23:in `<main>'
gitlab_1 | Tasks: TOP => cache:clear => cache:clear:redis => environment
gitlab_1 | (See full trace by running task with --trace)
gitlab_1 | ---- End output of /opt/gitlab/bin/gitlab-rake cache:clear ----
gitlab_1 | Ran /opt/gitlab/bin/gitlab-rake cache:clear returned 1
gitlab-rake cache:clear 失败,加trace 查看详细信息
# gitlab-rake cache:clear --trace
** Invoke cache:clear (first_time)
** Invoke cache:clear:redis (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
I18n::InvalidLocale: :"zh-CN" is not a valid locale
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/i18n-0.9.5/lib/i18n.rb:295:in `enforce_available_locales!'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/i18n-0.9.5/lib/i18n.rb:163:in `translate'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/activemodel-4.2.10/lib/active_model/naming.rb:188:in `human'
/opt/gitlab/embedded/service/gitlab-rails/app/models/concerns/protected_ref.rb:30:in `block in protected_ref_access_levels'
/opt/gitlab/embedded/service/gitlab-rails/app/models/concerns/protected_ref.rb:21:in `each'
/opt/gitlab/embedded/service/gitlab-rails/app/models/concerns/protected_ref.rb:21:in `protected_ref_access_levels'
/opt/gitlab/embedded/service/gitlab-rails/app/models/protected_branch.rb:7:in `<class:ProtectedBranch>'
/opt/gitlab/embedded/service/gitlab-rails/app/models/protected_branch.rb:3:in `<top (required)>'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:274:in `require'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:274:in `block in require'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:240:in `load_dependency'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:274:in `require'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:360:in `require_or_load'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:494:in `load_missing_constant'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:184:in `const_missing'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:526:in `load_missing_constant'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:184:in `const_missing'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:526:in `load_missing_constant'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:184:in `const_missing'
/opt/gitlab/embedded/service/gitlab-rails/lib/api/protected_branches.rb:49:in `block (2 levels) in <class:ProtectedBranches>'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/grape-1.1.0/lib/grape/validations/params_scope.rb:34:in `instance_eval'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/grape-1.1.0/lib/grape/validations/params_scope.rb:34:in `initialize'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/grape-1.1.0/lib/grape/dsl/validations.rb:23:in `new'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/grape-1.1.0/lib/grape/dsl/validations.rb:23:in `params'
/opt/gitlab/embedded/service/gitlab-rails/lib/api/protected_branches.rb:46:in `block in <class:ProtectedBranches>'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/grape-1.1.0/lib/grape/api.rb:76:in `instance_eval'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/grape-1.1.0/lib/grape/api.rb:76:in `block in nest'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/grape-1.1.0/lib/grape/api.rb:76:in `each'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/grape-1.1.0/lib/grape/api.rb:76:in `nest'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/grape-1.1.0/lib/grape/dsl/routing.rb:164:in `block in namespace'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/grape-1.1.0/lib/grape/dsl/settings.rb:158:in `within_namespace'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/grape-1.1.0/lib/grape/dsl/routing.rb:161:in `namespace'
/opt/gitlab/embedded/service/gitlab-rails/lib/api/protected_branches.rb:14:in `<class:ProtectedBranches>'
/opt/gitlab/embedded/service/gitlab-rails/lib/api/protected_branches.rb:4:in `<module:API>'
/opt/gitlab/embedded/service/gitlab-rails/lib/api/protected_branches.rb:3:in `<top (required)>'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:274:in `require'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:274:in `block in require'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:240:in `load_dependency'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:274:in `require'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:360:in `require_or_load'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:494:in `load_missing_constant'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:184:in `const_missing'
/opt/gitlab/embedded/service/gitlab-rails/lib/api/api.rb:136:in `<class:API>'
/opt/gitlab/embedded/service/gitlab-rails/lib/api/api.rb:4:in `<module:API>'
/opt/gitlab/embedded/service/gitlab-rails/lib/api/api.rb:3:in `<top (required)>'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:274:in `require'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:274:in `block in require'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:240:in `load_dependency'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:274:in `require'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:360:in `require_or_load'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:494:in `load_missing_constant'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:184:in `const_missing'
/opt/gitlab/embedded/service/gitlab-rails/config/initializers/rack_attack.rb:12:in `<top (required)>'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:268:in `load'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:268:in `block in load'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:240:in `load_dependency'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:268:in `load'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/railties-4.2.10/lib/rails/engine.rb:652:in `block in load_config_initializer'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/activesupport-4.2.10/lib/active_support/notifications.rb:166:in `instrument'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/railties-4.2.10/lib/rails/engine.rb:651:in `load_config_initializer'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/railties-4.2.10/lib/rails/engine.rb:616:in `block (2 levels) in <class:Engine>'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/railties-4.2.10/lib/rails/engine.rb:615:in `each'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/railties-4.2.10/lib/rails/engine.rb:615:in `block in <class:Engine>'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/railties-4.2.10/lib/rails/initializable.rb:30:in `instance_exec'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/railties-4.2.10/lib/rails/initializable.rb:30:in `run'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/railties-4.2.10/lib/rails/initializable.rb:55:in `block in run_initializers'
/opt/gitlab/embedded/lib/ruby/2.4.0/tsort.rb:228:in `block in tsort_each'
/opt/gitlab/embedded/lib/ruby/2.4.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
/opt/gitlab/embedded/lib/ruby/2.4.0/tsort.rb:422:in `block (2 levels) in each_strongly_connected_component_from'
/opt/gitlab/embedded/lib/ruby/2.4.0/tsort.rb:431:in `each_strongly_connected_component_from'
/opt/gitlab/embedded/lib/ruby/2.4.0/tsort.rb:421:in `block in each_strongly_connected_component_from'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/railties-4.2.10/lib/rails/initializable.rb:44:in `each'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/railties-4.2.10/lib/rails/initializable.rb:44:in `tsort_each_child'
/opt/gitlab/embedded/lib/ruby/2.4.0/tsort.rb:415:in `call'
/opt/gitlab/embedded/lib/ruby/2.4.0/tsort.rb:415:in `each_strongly_connected_component_from'
/opt/gitlab/embedded/lib/ruby/2.4.0/tsort.rb:349:in `block in each_strongly_connected_component'
/opt/gitlab/embedded/lib/ruby/2.4.0/tsort.rb:347:in `each'
/opt/gitlab/embedded/lib/ruby/2.4.0/tsort.rb:347:in `call'
/opt/gitlab/embedded/lib/ruby/2.4.0/tsort.rb:347:in `each_strongly_connected_component'
/opt/gitlab/embedded/lib/ruby/2.4.0/tsort.rb:226:in `tsort_each'
/opt/gitlab/embedded/lib/ruby/2.4.0/tsort.rb:205:in `tsort_each'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/railties-4.2.10/lib/rails/initializable.rb:54:in `run_initializers'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/railties-4.2.10/lib/rails/application.rb:352:in `initialize!'
/opt/gitlab/embedded/service/gitlab-rails/config/environment.rb:11:in `<top (required)>'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:274:in `require'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:274:in `block in require'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:240:in `load_dependency'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:274:in `require'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/railties-4.2.10/lib/rails/application.rb:328:in `require_environment!'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/railties-4.2.10/lib/rails/application.rb:457:in `block in run_tasks_blocks'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/task.rb:271:in `block in execute'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/task.rb:271:in `each'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/task.rb:271:in `execute'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/task.rb:213:in `block in invoke_with_call_chain'
/opt/gitlab/embedded/lib/ruby/2.4.0/monitor.rb:214:in `mon_synchronize'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/task.rb:193:in `invoke_with_call_chain'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/task.rb:237:in `block in invoke_prerequisites'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/task.rb:235:in `each'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/task.rb:235:in `invoke_prerequisites'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/task.rb:212:in `block in invoke_with_call_chain'
/opt/gitlab/embedded/lib/ruby/2.4.0/monitor.rb:214:in `mon_synchronize'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/task.rb:193:in `invoke_with_call_chain'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/task.rb:237:in `block in invoke_prerequisites'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/task.rb:235:in `each'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/task.rb:235:in `invoke_prerequisites'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/task.rb:212:in `block in invoke_with_call_chain'
/opt/gitlab/embedded/lib/ruby/2.4.0/monitor.rb:214:in `mon_synchronize'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/task.rb:193:in `invoke_with_call_chain'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/task.rb:182:in `invoke'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/application.rb:160:in `invoke_task'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/application.rb:116:in `block (2 levels) in top_level'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/application.rb:116:in `each'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/application.rb:116:in `block in top_level'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/application.rb:125:in `run_with_threads'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/application.rb:110:in `top_level'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/application.rb:83:in `block in run'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/application.rb:186:in `standard_exception_handling'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/application.rb:80:in `run'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/rake-12.3.1/exe/rake:27:in `<top (required)>'
/opt/gitlab/embedded/bin/rake:23:in `load'
/opt/gitlab/embedded/bin/rake:23:in `<top (required)>'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/bundler-1.16.2/lib/bundler/cli/exec.rb:74:in `load'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/bundler-1.16.2/lib/bundler/cli/exec.rb:74:in `kernel_load'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/bundler-1.16.2/lib/bundler/cli/exec.rb:28:in `run'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/bundler-1.16.2/lib/bundler/cli.rb:424:in `exec'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/bundler-1.16.2/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/bundler-1.16.2/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/bundler-1.16.2/lib/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/bundler-1.16.2/lib/bundler/cli.rb:27:in `dispatch'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/bundler-1.16.2/lib/bundler/vendor/thor/lib/thor/base.rb:466:in `start'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/bundler-1.16.2/lib/bundler/cli.rb:18:in `start'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/bundler-1.16.2/exe/bundle:30:in `block in <top (required)>'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/bundler-1.16.2/lib/bundler/friendly_errors.rb:124:in `with_friendly_errors'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/bundler-1.16.2/exe/bundle:22:in `<top (required)>'
/opt/gitlab/embedded/bin/bundle:23:in `load'
/opt/gitlab/embedded/bin/bundle:23:in `<main>'
Tasks: TOP => cache:clear => cache:clear:redis => environment
似乎是config/application.rb 中 I18n.enforce_available_locales = false 设置没有生效?
Edited by Benson