Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gitlabhq1
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gpt
  • large_projects
  • gitlabhq1
  • Issues
  • #2416

Closed
Open
Created Dec 28, 2012 by Administrator@rootOwner

On first OmniAuth login: Redis::InheritedError (Tried to use a connection from a child process without reconnecting. You need to reconnect to Redis after forking.)

Created by: cakoose

Just installed and configured GitLab 4.0 and I get a 500 when logging in for the first time using OmniAuth. OmniAuth is configured as follows:

omniauth:
    enabled: true
    allow_single_sign_on: true
    block_auto_created_users: false

    providers:
        - { name: 'google_oauth2', ..., args: { access_type: 'offline', approval_prompt: '' } }
  1. Go to the GitLab login page
  2. Click on the Google icon at the bottom.
  3. On the Google app approval page, click "Allow access"
  4. GitLab returns an HTTP 500

production.log contains:

Started GET "/users/auth/google_oauth2" for 127.0.0.1 at 2012-12-28 01:49:28 -0800
Started GET "/users/auth/google_oauth2/callback?state=***" for 127.0.0.1 at 2012-12-28 01:49:35 -0800
Processing by OmniauthCallbacksController#google_oauth2 as HTML
  Parameters: {"state"=>"***", "code"=>"***"}
Completed 500 Internal Server Error in 207ms

Redis::InheritedError (Tried to use a connection from a child process without reconnecting. You need to reconnect to Redis after forking.):
  app/observers/user_observer.rb:5:in `after_create'
  lib/gitlab/auth.rb:46:in `create_from_omniauth'
  lib/gitlab/auth.rb:61:in `find_or_new_for_omniauth'
  app/models/user.rb:105:in `find_or_new_for_omniauth'
  app/controllers/omniauth_callbacks_controller.rb:40:in `handle_omniauth'
  app/controllers/omniauth_callbacks_controller.rb:4:in `block (2 levels) in <class:OmniauthCallbacksController>'

This only happens the first time I sign in with a particular Google user account. If I go through the Google auth flow again with the same user, it works fine. If I delete that user account from GitLab and try again, it works fine.

Assignee
Assign to
Time tracking