500 error on gitlab-runner register
Summary
I got following error on register gitlab-runner from a different server than gitlab server
ERROR: Registering runner... failed runner=syonbZio status=500 Internal Server Error PANIC: Failed to register this runner. Perhaps you are having network problems
and I checked further into Gitlab server with command
sudo gitlab-ctl tail gitlab-rails
and found error
==> /var/log/gitlab/gitlab-rails/exceptions_json.log <==
{"severity":"ERROR","time":"2020-04-12T06:09:34.729Z","correlation_id":"QWsawPWzVE6","tags.correlation_id":"QWsawPWzVE6","tags.locale":"en","extra.server":{"os":{"name":"Linux","version":"#97-Ubuntu SMP Wed Apr 1 03:25:46 UTC 2020","build":"4.15.0-96-generic","kernel_version":"Linux Gitlab 4.15.0-96-generic #97-Ubuntu SMP Wed Apr 1 03:25:46 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux"},"runtime":{"name":"ruby","version":"ruby 2.6.5p114 (2019-10-01 revision 67812) [x86_64-linux]"}},"extra.description":"[FILTERED]","extra.tag_list":"sdfdsf","extra.run_untagged":false,"extra.locked":true,"extra.active":true,"extra.info":{"name":"gitlab-runner","version":"12.9.0","revision":"4c96e5ad","platform":"linux","architecture":"amd64","features":{"variables":"[FILTERED]","image":false,"services":false,"artifacts":false,"cache":false,"shared":false,"upload_multiple_artifacts":false,"upload_raw_artifacts":false,"session":false,"terminal":false,"refspecs":false,"masking":false,"proxy":false}},"extra.token":"[FILTERED]","extra.request_forgery_protection":{"description":"[FILTERED]","tag_list":"sdfdsf","run_untagged":false,"locked":true,"active":true,"info":{"name":"gitlab-runner","version":"12.9.0","revision":"4c96e5ad","platform":"linux","architecture":"amd64","features":{"variables":"[FILTERED]","image":false,"services":false,"artifacts":false,"cache":false,"shared":false,"upload_multiple_artifacts":false,"upload_raw_artifacts":false,"session":false,"terminal":false,"refspecs":false,"masking":false,"proxy":false}},"token":"[FILTERED]"},"exception.class":"OpenSSL::Cipher::CipherError","exception.message":"","exception.backtrace":["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_implementation.rb:293:in `runners_registration_token'","lib/gitlab/current_settings.rb:20:in `method_missing'","lib/api/helpers/runner.rb:12:in `runner_registration_token_valid?'","lib/api/runner.rb:29:in `block (2 levels) in \u003cclass:Runner\u003e'","ee/lib/gitlab/ip_address_state.rb:10:in `with'","ee/lib/gitlab/jira/middleware.rb:19:in `call'"]}
What is the current bug behavior?
500 error on gitlab-runner register
What is the expected correct behavior?
gitlab-runner fully setup and pipeline running
Relevant logs and/or screenshots
Output of checks
This bug happens on gitlab-ee omnibus
Results of GitLab environment info
Expand for output related to GitLab environment info
System information System: Ubuntu 18.04 Proxy: no Current User: git Using RVM: no Ruby Version: 2.6.5p114 Gem Version: 2.7.10 Bundler Version:1.17.3 Rake Version: 12.3.3 Redis Version: 5.0.7 Git Version: 2.24.1 Sidekiq Version:5.2.7 Go Version: unknown GitLab information Version: 12.9.2-ee Revision: 0ad76f4d374 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: PostgreSQL DB Version: 10.12 URL: https://example.com HTTP Clone URL: https://example.com/some-group/some-project.git SSH Clone URL: git@example.com:some-group/some-project.git Elasticsearch: no Geo: no Using LDAP: no Using Omniauth: yes Omniauth Providers: GitLab Shell Version: 12.0.0 Repository storage paths: - default: /var/opt/gitlab/git-data/repositories GitLab Shell path: /opt/gitlab/embedded/service/gitlab-shell Git: /opt/gitlab/embedded/bin/git
Results of GitLab application Check
Expand for output related to the GitLab application check
Checking GitLab subtasks ...
Checking GitLab Shell ...
GitLab Shell: ... GitLab Shell version >= 12.0.0 ? ... OK (12.0.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: ... 26/2 ... yes 26/3 ... yes 26/4 ... yes 26/5 ... yes 26/6 ... yes 26/7 ... yes 26/8 ... yes 22/9 ... yes 18/10 ... yes 26/11 ... yes 26/12 ... yes 26/14 ... yes 26/15 ... yes 26/16 ... yes 26/17 ... yes 22/18 ... yes 26/19 ... yes 22/20 ... yes 26/21 ... yes 22/22 ... yes 18/23 ... yes 31/24 ... yes 31/26 ... yes 31/27 ... yes 31/28 ... yes 31/29 ... yes 31/30 ... yes 31/31 ... yes 31/32 ... yes 31/33 ... yes 31/34 ... yes 31/35 ... yes 31/36 ... yes 31/37 ... yes 32/38 ... yes 26/39 ... yes 26/40 ... yes 26/41 ... yes 31/43 ... yes 31/44 ... yes 31/45 ... yes 31/46 ... yes 26/47 ... yes 26/48 ... yes 26/49 ... yes 26/50 ... yes 26/51 ... yes 26/52 ... yes 26/53 ... yes 26/54 ... yes 18/55 ... yes Redis version >= 2.8.0? ... yes Ruby version >= 2.5.3 ? ... yes (2.6.5) Git version >= 2.22.0 ? ... yes (2.24.1) Git user has default SSH configuration? ... yes Active users: ... 13 Is authorized keys file accessible? ... yes Elasticsearch version 5.6 - 6.x? ... skipped (elasticsearch is disabled)
Checking GitLab App ... Finished
Checking GitLab subtasks ... Finished