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
  • #6462

Closed
Open
Created Mar 03, 2014 by Administrator@rootOwner

Gitlab has issues when Redis is configured to use authentication

Created by: brodock

I have setup Redis on a remote machine (for some reasons) and it requires authentication (AUTH command).

To setup sidekiq I have changed resque.yml file to include the password as following:

production: redis://user:heregoesmypassword@remoteserveraddress:6379

I also had to edit initializers/session_store.rb because it's running on an external server:

diff --git a/config/initializers/session_store.rb b/config/initializers/session_store.rb
index f80b67a..f1f3f56 100644
--- a/config/initializers/session_store.rb
+++ b/config/initializers/session_store.rb
@@ -1,4 +1,11 @@
 # Be sure to restart your server when you modify this file.
+  config_file = Rails.root.join('config', 'resque.yml')
+
+  resque_url = if File.exists?(config_file)
+                 YAML.load_file(config_file)[Rails.env]
+               else
+                 "redis://localhost:6379"
+               end

 Gitlab::Application.config.session_store(
   :redis_store, # Using the cookie_store would enable session replay attacks.
@@ -6,5 +13,6 @@ Gitlab::Application.config.session_store(
   key: '_gitlab_session',
   secure: Gitlab.config.gitlab.https,
   httponly: true,
-  path: (Rails.application.config.relative_url_root.nil?) ? '/' : Rails.application.config.relative_url_root
+  path: (Rails.application.config.relative_url_root.nil?) ? '/' : Rails.application.config.relative_url_root,
+  servers: resque_url
 )

this is the output of rake gitlab:check:

Running /home/git/gitlab-shell/bin/check
Check GitLab API access: OK
Check directories and files:
        /home/git/repositories: OK
        /home/git/.ssh/authorized_keys: OK
Test redis-cli executable: redis-cli 2.8.6
Send ping to redis server: (error) NOAUTH Authentication required.
gitlab-shell self-check successful

Everything works fine if I don't use AUTH. If I start using authentication, It "apears" to work ok, except for the check rake task, but it doesn't receive/process any sidekiq task. Acessing sidekiq dashboard shows zeroed stats.

Assignee
Assign to
Time tracking