500 Error when login in via Google Auth

Summary

I'm getting this specific error, when i'm trying to login via Google Authentication to Gitlab Server. This is a newly installed Gitlab Server Community Edition. Have tried to reinstall it and update it from the latest Gitlab version from this month December, but still getting the same error.

From the front end the error is 500, but from the production.log this is the error

Faraday::ConnectionFailed (Connection reset by peer - SSL_connect)

To check if this is related to SSL i run some test.

run this script

#!/opt/gitlab/embedded/bin/ruby

require 'openssl'

require 'net/http'

Net::HTTP.get(URI('https://www.google.com'))

and also getting the same error

Connection reset by peer - SSL_connect (Errno::ECONNRESET)

i have an old Gitlab Server version which also uses the google authentication. tried putting the same configuration but still had the same issue.

this is my gitlab.rb configuration (details are removed)

external_url 'https://gitlab.xxx.xx'

gitlab_rails['time_zone'] = 'Asia/Manila'

gitlab_rails['omniauth_enabled'] = true gitlab_rails['omniauth_allow_single_sign_on'] = ['google_oauth2'] gitlab_rails['omniauth_sync_profile_from_provider'] = ['google_oauth2']

gitlab_rails['omniauth_providers'] = [ { "name" => "google_oauth2", "app_id" => "xxxxxxxxxxxxx", "app_secret" => "xxxxx", "args" => { "access_type" => "offline", "approval_prompt" => "none" } } ]

web_server['external_users'] = ['apache'] nginx['enable'] = false

Steps to reproduce

  • from newly updated gitlab.rb (enable google auth). enabled google authentication from gitlab admin.
  • create user
  • logout to admin, and login to the newly created user
  • from the newly created user enable google authentication by authenticating the user
  • when doing authentication, you will be forwarded to 500 page
  • then from the production.log you'll see an SSL related error

What is the current bug behavior?

When login in to google authentication, a 500 page error occurs

What is the expected correct behavior?

When you google authentication, it should proceed to the gitlab page

Relevant logs and/or screenshots

production.log

Started GET "/users/auth/google_oauth2/callback?state=66e01aabe6233b260f3f8204664b24e48657d6b50fdb2c26&code=[FILTERED]&scope=email%20profile%20https://www.googleapis.com/auth/userinfo.email%20https://www.googleapis.com/auth/userinfo.profile%20openid&authuser=0&hd=xxxx.xxx&session_state=64c01f6183a0affbd998984a47d042556177b31b..3a8c&prompt=consent" for 162.158.167.142 at 2019-12-06 14:22:24 +0900

Faraday::ConnectionFailed (Connection reset by peer - SSL_connect):

from a running test scripts, this is the error: /opt/gitlab/embedded/lib/ruby/2.6.0/net/protocol.rb:44:in `connect_nonblock': Connection reset by peer - SSL_connect (Errno::ECONNRESET)

Results of GitLab environment info

[root@ns ~]# gitlab-rake gitlab:env:info

System information System: Current User: git Using RVM: no Ruby Version: 2.6.3p62 Gem Version: 3.0.6 Bundler Version:1.17.3 Rake Version: 12.3.3 Redis Version: 3.2.12 Git Version: 2.22.0 Sidekiq Version:5.2.7 Go Version: unknown

GitLab information Version: 12.5.3 Revision: 225d2e5bb89 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: PostgreSQL DB Version: 10.9 URL: https://gitlab.xxxxx.xxx HTTP Clone URL: https://gitlab.xxxx.xxx/some-group/some-project.git SSH Clone URL: git@gitlab.xxxx.xxx:some-group/some-project.git Using LDAP: no Using Omniauth: yes Omniauth Providers: google_oauth2

GitLab Shell Version: 10.2.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

[root@ns ~]# gitlab-rake gitlab:check SANITIZE=true Checking GitLab subtasks ...

Checking GitLab Shell ...

GitLab Shell: ... GitLab Shell version >= 10.2.0 ? ... OK (10.2.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? ... skipped (no tmp uploads folder yet) 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: ... can't check, you have no projects Redis version >= 2.8.0? ... yes Ruby version >= 2.5.3 ? ... yes (2.6.3) Git version >= 2.22.0 ? ... yes (2.22.0) Git user has default SSH configuration? ... yes Active users: ... 2 Is authorized keys file accessible? ... yes

Checking GitLab App ... Finished

Checking GitLab subtasks ... Finished

Assignee Loading
Time tracking Loading