500 error on /settings/integrations pages

Summary

Most projects return a 500 error when you go to /settings/integrations . I saw lot of similar issues but all solutions provided don't works for me.

Already tried :

Check URL :

irb(main):001:0> project = Project.find_by_full_path('moustic/Ansible');
=> #>
irb(main):002:0> project.hooks.map(&:id)
=> []

Delete old services with :

gitlab-rails runner "Service.where(type: ['JenkinsService', 'GithubService', 'JenkinsDeprecatedService']).delete_all"

Follow the documentation when the secrets file is lost :

DELETE FROM ci_group_variables;
DELETE FROM ci_variables;
UPDATE projects SET runners_token = null, runners_token_encrypted = null;
UPDATE namespaces SET runners_token = null, runners_token_encrypted = null;
UPDATE application_settings SET runners_registration_token_encrypted = null;
UPDATE ci_runners SET token = null, token_encrypted = null;
UPDATE ci_builds SET token = null, token_encrypted = null;

Truncate the web_hook table :

TRUNCATE web_hooks CASCADE;

Relevant logs and/or screenshots

Logs of /var/log/gitlab/gitlab-rails/production.log
Started GET "/moustic/ansible/-/settings/integrations" for 10.31.0.10 at 2020-08-03 12:19:56 +0200
Processing by Projects::Settings::IntegrationsController#show as HTML
  Parameters: {"namespace_id"=>"moustic", "project_id"=>"ansible"}
Completed 500 Internal Server Error in 2897ms (ActiveRecord: 58.4ms | Elasticsearch: 0.0ms | Allocations: 721724)

OpenSSL::Cipher::CipherError ():

app/models/project_services/issue_tracker_service.rb:37:in handle_properties' app/models/service.rb:359:in build_from_integration' app/models/project.rb:2504:in build_from_instance_or_template' app/models/project.rb:1307:in find_or_initialize_service' app/models/project.rb:1296:in block in find_or_initialize_services' app/models/project.rb:1295:in map' app/models/project.rb:1295:in find_or_initialize_services' app/controllers/projects/settings/integrations_controller.rb:10:in show' app/controllers/application_controller.rb:491:in set_current_admin' lib/gitlab/session.rb:11:in with_session' app/controllers/application_controller.rb:482:in set_session_storage' lib/gitlab/i18n.rb:55:in with_locale' lib/gitlab/i18n.rb:61:in with_user_locale' app/controllers/application_controller.rb:476:in set_locale' lib/gitlab/error_tracking.rb:50:in with_context' app/controllers/application_controller.rb:541:in sentry_context' app/controllers/application_controller.rb:469:in block in set_current_context' lib/gitlab/application_context.rb:52:in block in use' lib/gitlab/application_context.rb:52:in use' lib/gitlab/application_context.rb:20:in with_context' app/controllers/application_controller.rb:462:in set_current_context' lib/gitlab/request_profiler/middleware.rb:17:in call' lib/gitlab/middleware/go.rb:20:in call' lib/gitlab/etag_caching/middleware.rb:13:in call' lib/gitlab/middleware/multipart.rb:140:in call' lib/gitlab/middleware/read_only/controller.rb:51:in call' lib/gitlab/middleware/read_only.rb:18:in call' lib/gitlab/middleware/same_site_cookies.rb:27:in call' lib/gitlab/middleware/basic_health_check.rb:25:in call' lib/gitlab/middleware/handle_ip_spoof_attack_error.rb:25:in call' lib/gitlab/middleware/request_context.rb:23:in call' config/initializers/fix_local_cache_middleware.rb:9:in call' lib/gitlab/metrics/requests_rack_middleware.rb:60:in `call'

Results of GitLab environment info

It's an old Gitlab installation from sources with MySQL, migrated to Omnibus CE and PostgreSQL, and upgraded. Secrets has been migrated from YAML to JSON.

The Gitlab is behind a Reverse Proxy.

System :
* System : VM Proxmox
* CPU : 4 cores (KVM)
* RAM : 6GB
* Disk : CEPH on SSD

* OS : Debian Buster
* Network Connectivity : IPv4 and IPv6
* Gitlab Version : 13.2.2 (64fc0138d55)

Results of GitLab application Check

Expand for output related to the GitLab application check
# sudo gitlab-rake gitlab:check SANITIZE=true
Checking GitLab subtasks ...

Checking GitLab Shell ...

GitLab Shell: ... GitLab Shell version >= 13.3.0 ? ... OK (13.3.0) Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Internal API available: OK Redis available via internal API: OK gitlab-shell self-check successful

Checking GitLab Shell ... Finished

Checking Gitaly ...

Gitaly: ... default ... OK

Checking Gitaly ... Finished

Checking Sidekiq ...

Sidekiq: ... Running? ... yes Number of Sidekiq processes ... 1

Checking Sidekiq ... Finished

Checking Incoming Email ...

Incoming Email: ... Reply by email is disabled in config/gitlab.yml

Checking Incoming Email ... Finished

Checking LDAP ...

LDAP: ... LDAP is disabled in config/gitlab.yml

Checking LDAP ... Finished

Checking GitLab App ...

Git configured correctly? ... yes Database config exists? ... yes All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config up to date? ... yes Log directory writable? ... yes Tmp directory writable? ... yes Uploads directory exists? ... yes Uploads directory has correct permissions? ... yes Uploads directory tmp has correct permissions? ... yes Init script exists? ... skipped (omnibus-gitlab has no init script) Init script up-to-date? ... skipped (omnibus-gitlab has no init script) Projects have namespace: ... 6/1 ... yes 6/4 ... yes 3/6 ... yes 3/7 ... yes 31/8 ... yes 4/9 ... yes 4/10 ... yes 4/12 ... yes 9/13 ... yes 41/14 ... yes 52/17 ... yes 3/20 ... yes 3/21 ... yes 3/22 ... yes 3/29 ... yes 3/30 ... yes 3/31 ... yes 3/32 ... yes 3/33 ... yes 3/34 ... yes 3/35 ... yes 2/36 ... yes 4/39 ... yes 3/48 ... yes 4/51 ... yes 3/68 ... yes 3/72 ... yes 2/82 ... yes 4/84 ... yes 2/87 ... yes 4/92 ... yes 3/93 ... yes 36/104 ... yes 2/107 ... yes 3/113 ... yes 3/117 ... yes 2/121 ... yes 2/123 ... yes 2/124 ... yes 2/125 ... yes 2/126 ... yes 2/127 ... yes 36/128 ... yes 3/129 ... yes 3/130 ... yes 3/131 ... yes 68/132 ... yes 4/133 ... yes 17/134 ... yes 17/136 ... yes 52/137 ... yes 9/138 ... yes 2/139 ... yes 29/140 ... yes 29/141 ... yes 29/142 ... yes 29/143 ... yes 2/144 ... yes 3/145 ... yes 68/147 ... yes 9/148 ... yes 2/149 ... yes 3/150 ... yes 34/151 ... yes 2/152 ... yes 3/153 ... yes 77/154 ... yes 31/155 ... yes 3/156 ... yes 33/157 ... yes 34/158 ... yes 3/159 ... yes 35/160 ... yes 36/161 ... yes 35/163 ... yes 2/164 ... yes 3/165 ... yes 9/166 ... yes 37/168 ... yes 38/169 ... yes 2/170 ... yes 9/171 ... yes 39/172 ... yes 2/175 ... yes 39/176 ... yes 9/178 ... yes 68/179 ... yes 9/180 ... yes 2/181 ... yes 2/182 ... yes 40/183 ... yes 3/191 ... yes 33/192 ... yes 41/193 ... yes 33/194 ... yes 33/195 ... yes 3/196 ... yes 39/197 ... yes 42/198 ... yes 3/199 ... yes 9/200 ... yes 68/201 ... yes 43/202 ... yes 44/203 ... yes 9/204 ... yes 2/205 ... yes 9/206 ... yes 39/207 ... yes 9/208 ... yes 45/209 ... yes 6/211 ... yes 33/212 ... yes 33/213 ... yes 33/214 ... yes 46/215 ... yes 47/216 ... yes 3/217 ... yes 43/218 ... yes 45/219 ... yes 9/220 ... yes 33/221 ... yes 9/222 ... yes 45/223 ... yes 3/224 ... yes 6/225 ... yes 35/226 ... yes 49/227 ... yes 6/228 ... yes 49/229 ... yes 42/230 ... yes 42/231 ... yes 6/232 ... yes 6/233 ... yes 52/234 ... yes 53/235 ... yes 54/236 ... yes 41/238 ... yes 55/240 ... yes 9/241 ... yes 44/242 ... yes 44/243 ... yes 44/244 ... yes 17/245 ... yes 42/246 ... yes 56/247 ... yes 42/248 ... yes 42/249 ... yes 2/251 ... yes 53/252 ... yes 2/253 ... yes 2/254 ... yes 68/255 ... yes 68/256 ... yes 55/257 ... yes 55/258 ... yes 55/259 ... yes 55/260 ... yes 9/261 ... yes 55/262 ... yes 55/263 ... yes 9/264 ... yes 55/266 ... yes 55/267 ... yes 9/268 ... yes 53/269 ... yes 58/270 ... yes 9/271 ... yes 55/272 ... yes 6/273 ... yes 68/274 ... yes 59/275 ... yes 41/276 ... yes 41/277 ... yes 57/278 ... yes 55/279 ... yes 55/280 ... yes 55/281 ... yes 42/282 ... yes 55/283 ... yes 55/284 ... yes 55/285 ... yes 9/286 ... yes 55/287 ... yes 57/288 ... yes 55/289 ... yes 55/290 ... yes 55/291 ... yes 2/292 ... yes 55/293 ... yes 6/294 ... yes 59/295 ... yes 64/296 ... yes 65/297 ... yes 66/298 ... yes 67/299 ... yes 55/300 ... yes 67/301 ... yes 6/302 ... yes 2/303 ... yes 6/304 ... yes 42/305 ... yes 42/306 ... yes 55/307 ... yes 68/308 ... yes 69/309 ... yes 42/310 ... yes 68/311 ... yes 68/312 ... yes 55/313 ... yes 55/314 ... yes 55/315 ... yes 55/316 ... yes 42/317 ... yes 55/318 ... yes 55/319 ... yes 72/320 ... yes 72/321 ... yes 55/322 ... yes 42/323 ... yes 73/324 ... yes 55/325 ... yes 55/326 ... yes 42/327 ... yes 42/328 ... yes 55/329 ... yes 42/330 ... yes 55/331 ... yes 75/332 ... yes 55/333 ... yes 55/334 ... yes 41/335 ... yes 59/336 ... yes 55/337 ... yes 77/338 ... yes 42/339 ... yes 6/340 ... yes 31/341 ... yes 57/342 ... yes 55/343 ... yes 42/344 ... yes 76/345 ... yes 6/346 ... yes 6/347 ... yes 55/348 ... yes 42/349 ... yes 42/350 ... yes 68/351 ... yes 57/352 ... yes Redis version >= 4.0.0? ... yes Ruby version >= 2.5.3 ? ... yes (2.6.6) Git version >= 2.22.0 ? ... yes (2.27.0) Git user has default SSH configuration? ... yes Active users: ... 14 Is authorized keys file accessible? ... yes GitLab configured to store new projects in hashed storage? ... yes All projects are in hashed storage? ... yes

Checking GitLab App ... Finished

Checking GitLab subtasks ... Finished