backup and restore admin/runner 500 Internal Server Error
Summary
(Summarize the bug encountered concisely)
http://10.10.1.9:8888/admin/runners http://10.10.1.9:8888/common/static-site/settings/ci_cd
http 500 response
I backup gitlab and restore in anothor server。before backup have one runner
version:11.9.1-11.9.4
Steps to reproduce
(How one can reproduce the issue - this is very important)
Example Project
(If possible, please create an example project here on GitLab.com that exhibits the problematic behaviour, and link to it here in the bug report)
(If you are using an older version of GitLab, this will also determine whether the bug has been fixed in a more recent version)
What is the current bug behavior?
(What actually happens)
What is the expected correct behavior?
(What you should see instead)
Relevant logs and/or screenshots
==> /var/log/gitlab/gitlab-rails/production.log <==
Started GET "/admin/runners" for 127.0.0.1 at 2019-04-02 08:18:52 +0000
Processing by Admin::RunnersController#index as HTML
Completed 500 Internal Server Error in 173ms (ActiveRecord: 6.2ms)
ActionView::Template::Error ():
37:
38: .col-sm-6
39: .bs-callout
40: = render partial: 'ci/runner/how_to_setup_runner',
41: locals: { registration_token: Gitlab::CurrentSettings.runners_registration_token,
42: type: 'shared',
43: reset_token_url: reset_registration_token_admin_application_settings_path }
lib/gitlab/crypto_helper.rb:27:in `aes256_gcm_decrypt'
app/models/concerns/token_authenticatable_strategies/encrypted.rb:45:in `get_token'
app/models/concerns/token_authenticatable_strategies/base.rb:33:in `ensure_token!'
app/models/concerns/token_authenticatable.rb:43:in `block in add_authentication_token_field'
app/models/application_setting.rb:416:in `runners_registration_token'
lib/gitlab/current_settings.rb:15:in `method_missing'
app/views/admin/runners/index.html.haml:40:in `_app_views_admin_runners_index_html_haml__4590947869583612172_69932838480980'
app/controllers/application_controller.rb:116:in `render'
lib/gitlab/i18n.rb:55:in `with_locale'
lib/gitlab/i18n.rb:61:in `with_user_locale'
app/controllers/application_controller.rb:434:in `set_locale'
lib/gitlab/middleware/rails_queue_duration.rb:27:in `call'
lib/gitlab/metrics/rack_middleware.rb:17:in `block in call'
lib/gitlab/metrics/transaction.rb:55:in `run'
lib/gitlab/metrics/rack_middleware.rb:17:in `call'
lib/gitlab/middleware/multipart.rb:103:in `call'
lib/gitlab/request_profiler/middleware.rb:16:in `call'
lib/gitlab/middleware/go.rb:20:in `call'
lib/gitlab/etag_caching/middleware.rb:13:in `call'
lib/gitlab/middleware/correlation_id.rb:16:in `block in call'
lib/gitlab/correlation_id.rb:15:in `use_id'
lib/gitlab/middleware/correlation_id.rb:15:in `call'
lib/gitlab/middleware/read_only/controller.rb:40:in `call'
lib/gitlab/middleware/read_only.rb:18:in `call'
lib/gitlab/middleware/basic_health_check.rb:25:in `call'
lib/gitlab/request_context.rb:26:in `call'
lib/gitlab/metrics/requests_rack_middleware.rb:29:in `call'
lib/gitlab/middleware/release_env.rb:13:in `call'
==> /var/log/gitlab/gitlab-rails/production_json.log <==
{"method":"GET","path":"/admin/runners","format":"html","controller":"Admin::RunnersController","action":"index","status":500,"error":"ActionView::Template::Error: ","duration":173.76,"view":0.0,"db":6.19,"time":"2019-04-02T08:18:52.626Z","params":[],"remote_ip":"192.168.16.1","user_id":13,"username":"alex","ua":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1 Safari/605.1.15","queue_duration":1.77,"correlation_id":"KXaPzeDU5d8"}
==> /var/log/gitlab/gitlab-workhorse/current <==
2019-04-02_08:18:52.80432 git.clouds1000 127.0.0.1:0 - - [2019/04/02:08:18:52 +0000] "GET /admin/runners HTTP/1.1" 500 2926 "http://git.clouds1000/admin" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1 Safari/605.1.15" 0.186
==> /var/log/gitlab/gitlab-rails/production.log <==
Started GET "/common/static-site/settings/ci_cd" for 127.0.0.1 at 2019-04-02 08:22:52 +0000
Processing by Projects::Settings::CiCdController#show as HTML
Parameters: {"namespace_id"=>"common", "project_id"=>"static-site"}
Completed 500 Internal Server Error in 339ms (ActiveRecord: 14.2ms)
ActionView::Template::Error ():
25: project_clusters_path(@project),
26: class: 'btn btn-info'
27: %hr
28: = render partial: 'ci/runner/how_to_setup_runner',
29: locals: { registration_token: @project.runners_token,
30: type: 'specific',
31: reset_token_url: reset_registration_token_namespace_project_settings_ci_cd_path }
lib/gitlab/crypto_helper.rb:27:in `aes256_gcm_decrypt'
app/models/concerns/token_authenticatable_strategies/encrypted.rb:45:in `get_token'
app/models/concerns/token_authenticatable_strategies/base.rb:33:in `ensure_token!'
app/models/concerns/token_authenticatable.rb:43:in `block in add_authentication_token_field'
app/models/project.rb:1543:in `runners_token'
app/views/projects/runners/_specific_runners.html.haml:28:in `_app_views_projects_runners__specific_runners_html_haml___154596593987512042_69932822365540'
app/views/projects/runners/_index.html.haml:8:in `_app_views_projects_runners__index_html_haml__118629731913136230_69932828808960'
app/views/projects/settings/ci_cd/show.html.haml:42:in `_app_views_projects_settings_ci_cd_show_html_haml__997859718976093381_69932854026860'
app/controllers/application_controller.rb:116:in `render'
lib/gitlab/i18n.rb:55:in `with_locale'
lib/gitlab/i18n.rb:61:in `with_user_locale'
app/controllers/application_controller.rb:434:in `set_locale'
lib/gitlab/middleware/rails_queue_duration.rb:27:in `call'
lib/gitlab/metrics/rack_middleware.rb:17:in `block in call'
lib/gitlab/metrics/transaction.rb:55:in `run'
lib/gitlab/metrics/rack_middleware.rb:17:in `call'
lib/gitlab/middleware/multipart.rb:103:in `call'
lib/gitlab/request_profiler/middleware.rb:16:in `call'
lib/gitlab/middleware/go.rb:20:in `call'
lib/gitlab/etag_caching/middleware.rb:13:in `call'
lib/gitlab/middleware/correlation_id.rb:16:in `block in call'
lib/gitlab/correlation_id.rb:15:in `use_id'
lib/gitlab/middleware/correlation_id.rb:15:in `call'
lib/gitlab/middleware/read_only/controller.rb:40:in `call'
lib/gitlab/middleware/read_only.rb:18:in `call'
lib/gitlab/middleware/basic_health_check.rb:25:in `call'
lib/gitlab/request_context.rb:26:in `call'
lib/gitlab/metrics/requests_rack_middleware.rb:29:in `call'
lib/gitlab/middleware/release_env.rb:13:in `call'
==> /var/log/gitlab/gitlab-rails/production_json.log <==
{"method":"GET","path":"/common/static-site/settings/ci_cd","format":"html","controller":"Projects::Settings::CiCdController","action":"show","status":500,"error":"ActionView::Template::Error: ","duration":339.99,"view":0.0,"db":14.17,"time":"2019-04-02T08:22:52.403Z","params":[{"key":"namespace_id","value":"common"},{"key":"project_id","value":"static-site"}],"remote_ip":"192.168.16.1","user_id":13,"username":"alex","ua":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1 Safari/605.1.15","queue_duration":1.95,"gitaly_calls":1,"correlation_id":"nl00PxROPi9"}
Output of checks
(If you are reporting a bug on GitLab.com, write: This bug happens on GitLab.com)
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:env:info
)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production
)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true
)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true
)(we will only investigate if the tests are passing)
Possible fixes
(If you can, link to the line of code that might be responsible for the problem)