Project CI/CD-Settings broken

Hi there,

I have a problem with my gitlab installation. After upgrading from 11.8.0 to 11.9.1 the project CI/SD-Settings page seems to be broken.

I got the following error when opening the page:

Started GET "/***/***/settings/ci_cd" for 127.0.0.1 at 2019-04-01 09:21:14 +0000
Processing by Projects::Settings::CiCdController#show as HTML
  Parameters: {"namespace_id"=>"***", "project_id"=>"***"}
Completed 500 Internal Server Error in 53ms (ActiveRecord: 5.7ms)

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_runn
ers_html_haml__234361673848007128_70078833608300'
app/views/projects/runners/_index.html.haml:8:in `_app_views_projects_runners__index_html_haml__31167800
35569937812_70078832007340'
app/views/projects/settings/ci_cd/show.html.haml:42:in `_app_views_projects_settings_ci_cd_show_html_ham
l__1867383084659381760_70078907269380'
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/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'

I got this in different projects. Now I thought resetting the tokens would be enough but I have no idea how to reset the token for a specific project with the help of the command line.

1 Like

Got it!

I have cleared the token in the database:

$> gitlab-rails dbconsole
gitlabhq_production=> SELECT name, runners_token_encrypted FROM Projects WHERE Name = '<ProjectName>';

After running this a new token is generated the next time you enter the ci/cd settings page of the project.

Hi brase ,

i have this same problem in a project, when i upgraded from version 11.8.1 to 12.4.0. From the official documentation i did a 3 step upgrade i mean from 11.8.1 to 11.11.0 to 12.4.0

I ran the command the same command as above
gitlab-rails dbconsole
Password:

gitlabhq_production=> SELECT name, runners_token_encrypted FROM Projects WHERE Name = ‘’;

name | runners_token_encrypted
------±------------------------
(0 rows)

I still get the error 500. in the settings CI/CD

did you restart or reconfigure gitlab afterwards

sorry works fine without restarting or reconfiguring

gitlabhq_production=> update Projects set runners_token_encrypted = null where Name = ’ <PROJEKT_NAME>’;

1 Like