Sidekiq not starting

I upgraded gitlab-ce from 7.11 to 7.12 (I’m using source)

I found that sidekiq is no more running, however I’m able to login with webui but can not push code to git repositories.

Sidekiq log state as below
bundler: command not found: sidekiq
Install missing gem executables with bundle install

I tried bundle install I got below output
[many using libraries/packages]
Using raphael-rails 2.1.2
Using rdoc 3.12.2
Using redcarpet 3.2.3
Using redis 3.1.0
Using redis-store 1.1.4
Using redis-rack 1.5.0
Using redis-actionpack 4.0.0
Using redis-activesupport 4.0.0
Using redis-namespace 1.5.1
Using redis-rails 4.0.0
Using request_store 1.0.5
Using rinku 1.7.3
Using rqrcode 0.4.2
Using rqrcode-rails3 0.1.7
Using rugments 1.0.0.beta7
Using sass-rails 4.0.3
Using seed-fu 2.3.5
Using select2-rails 3.5.2
Using settingslogic 2.0.9
Using sidekiq 3.3.0
Using sidetiq 0.6.3
Using simple_oauth 0.1.9
Using sinatra 1.4.4
Using six 0.2.0
Using slack-notifier 1.0.0
Using temple 0.6.7
Using slim 2.0.2
Using stamp 0.5.0
Using state_machine 1.2.0
Using task_list 1.0.2
Using twitter-stream 0.1.16
Using tinder 1.9.3
Using uglifier 2.3.2
Using underscore-rails 1.4.4
Using unf_ext 0.0.6
Using unf 0.1.4
Using unicorn 4.6.3
Using unicorn-worker-killer 0.4.2
Using version_sorter 2.0.0
Using wikicloth 0.8.1
Bundle complete! 136 Gemfile dependencies, 229 gems now installed.
Gems in the groups development, test and mysql were not installed.
Bundled gems are installed into ./vendor/bundle.

sudo -u git -H bundle exec sidekiq outputs below:
bundler: command not found: sidekiq
Install missing gem executables with bundle install

Can you help me what is going wrong here.

Hi

Run the “bundle” command from the home directory. ie,. /home/git/gitlab

Hi Ershad,

I ran command bundle from home directory (/home/git/gitlab) output is as below:

:/home/git/gitlab# sudo -u git -H bundle
Using rake 10.4.2
Using CFPropertyList 2.3.1
Using RedCloth 4.2.9
Using ace-rails-ap 2.0.1
Using i18n 0.7.0
Using json 1.8.3
Using minitest 5.3.5
Using thread_safe 0.3.5
Using tzinfo 1.2.2
Using activesupport 4.1.11
Using builder 3.2.2
Using erubis 2.7.0
Using actionview 4.1.11
Using rack 1.5.4
Using rack-test 0.6.3
Using actionpack 4.1.11
Using mime-types 1.25.1
Using mail 2.6.3
Using actionmailer 4.1.11
Using activemodel 4.1.11
Using arel 5.0.1.20140414130214
Using activerecord 4.1.11
Using rails-observers 0.1.2
Using activeresource 4.0.0
Using acts-as-taggable-on 3.5.0
Using addressable 2.3.8
Using asana 0.0.6
Using asciidoctor 1.5.2
Using encryptor 1.3.0
Using attr_encrypted 1.3.4
Using attr_required 1.0.0
Using execjs 2.5.2
Using autoprefixer-rails 5.1.11
Using descendants_tracker 0.0.3
Using ice_nine 0.10.0
Using axiom-types 0.0.5
Using bcrypt 3.1.7
Using sass 3.2.19
Using bootstrap-sass 3.3.4.1
Using browser 0.8.0
Using cal-heatmap-rails 0.0.1
Using carrierwave 0.9.0
Using hitimes 1.2.2
Using timers 4.0.1
Using celluloid 0.16.0
Using charlock_holmes 0.6.9.4
Using coercible 1.0.0
Using coffee-script-source 1.9.1.1
Using coffee-script 2.4.1
Using thor 0.19.1
Using railties 4.1.11
Using coffee-rails 4.1.0
Using colored 1.2
Using connection_pool 2.1.0
Using creole 0.3.8
Using d3_rails 3.5.5
Using default_value_for 3.0.0
Using orm_adapter 0.5.0
Using warden 1.2.3
Using devise 3.2.4
Using devise-async 0.9.0
Using bundler 1.9.6
Using hike 1.2.3
Using multi_json 1.11.1
Using tilt 1.4.1
Using sprockets 2.11.0
Using sprockets-rails 2.3.1
Using rails 4.1.11
Using rotp 1.6.1
Using devise-two-factor 1.0.1
Using diff-lcs 1.2.5
Using diffy 3.0.3
Using doorkeeper 2.1.3
Using dotenv 0.9.0
Using dropzonejs-rails 0.4.14
Using enumerize 0.7.0
Using equalizer 0.0.8
Using escape_utils 0.2.4
Using eventmachine 1.0.4
Using excon 0.45.3
Using expression_parser 0.9.0
Using multipart-post 1.2.0
Using faraday 0.8.9
Using faraday_middleware 0.9.0
Using fission 0.5.0
Using formatador 0.2.5
Using net-ssh 2.9.2
Using net-scp 1.2.1
Using fog-core 1.30.0
Using fog-json 1.0.2
Using inflecto 0.0.2
Using fog-brightbox 0.7.1
Using mini_portile 0.6.2
Using nokogiri 1.6.6.2
Using fog-xml 0.1.2
Using fog-profitbricks 0.0.3
Using fog-radosgw 0.0.4
Using fog-sakuracloud 1.0.1
Using fog-softlayer 0.4.6
Using fog-terremark 0.1.0
Using fog-vmfusion 0.1.0
Using fog-voxel 0.1.0
Using ipaddress 0.8.0
Using trollop 2.1.2
Using rbvmomi 1.8.2
Using opennebula 4.12.1
Using fog 1.25.0
Using font-awesome-rails 4.2.0.0
Using foreman 0.63.0
Using rugged 0.22.2
Using gemnasium-gitlab-service 0.2.6
Using gemojione 2.0.0
Using posix-spawn 0.3.9
Using github-markup 1.3.1
Using gitlab-grit 2.7.2
Using gitlab-flowdock-git-hook 0.4.2.2
Using gitlab-grack 2.0.2
Using gitlab-linguist 3.0.1
Using gitlab_emoji 0.1.0
Using gitlab_git 7.2.5
Using gitlab_meta 7.0
Using net-ldap 0.11
Using hashie 2.1.2
Using omniauth 1.2.2
Using pyu-ruby-sasl 0.0.3.3
Using rubyntlm 0.5.0
Using gitlab_omniauth-ldap 1.2.1
Using gollum-grit_adapter 0.1.3
Using rouge 1.7.7
Using sanitize 2.1.0
Using stringex 2.5.2
Using gollum-lib 4.0.2
Using gon 5.0.1
Using multi_xml 0.5.5
Using rack-accept 0.4.5
Using rack-mount 0.8.3
Using virtus 1.0.1
Using grape 0.6.1
Using grape-entity 0.4.2
Using haml 4.0.5
Using haml-rails 0.5.3
Using httparty 0.13.3
Using mimemagic 0.3.0
Using hipchat 1.5.0
Using html-pipeline 1.11.0
Using http_parser.rb 0.5.3
Using httpauth 0.2.1
Using httpclient 2.5.3.3
Using ice_cube 0.11.1
Using jquery-atwho-rails 1.0.1
Using jquery-rails 3.1.3
Using jquery-scrollto-rails 1.4.3
Using turbolinks 2.5.3
Using jquery-turbolinks 2.0.1
Using jquery-ui-rails 4.2.1
Using jwt 0.1.13
Using kaminari 0.15.1
Using kgio 2.9.2
Using systemu 2.6.5
Using macaddr 1.7.1
Using mousetrap-rails 1.4.6
Using newrelic_rpm 3.9.4.245
Using nprogress-rails 0.1.2.3
Using oauth 0.4.7
Using oauth2 0.8.1
Using sawyer 0.6.0
Using octokit 3.7.0
Using omniauth-oauth 1.0.1
Using omniauth-bitbucket 0.0.2
Using omniauth-oauth2 1.1.1
Using omniauth-github 1.1.1
Using omniauth-gitlab 1.0.0
Using omniauth-google-oauth2 0.2.5
Using omniauth-multipassword 0.4.1
Using timfel-krb5-auth 0.8.3
Using omniauth-kerberos 0.2.0
Using uuid 2.3.7
Using ruby-saml 0.8.2
Using omniauth-saml 1.3.1
Using omniauth-shibboleth 1.1.1
Using omniauth-twitter 1.0.1
Using rubypants 0.2.0
Using org-ruby 0.9.12
Using pg 0.15.1
Using rack-attack 4.3.0
Using rack-cors 0.2.9
Using rack-oauth2 1.0.8
Using rack-protection 1.5.1
Using raindrops 0.13.0
Using raphael-rails 2.1.2
Using rdoc 3.12.2
Using redcarpet 3.2.3
Using redis 3.1.0
Using redis-store 1.1.4
Using redis-rack 1.5.0
Using redis-actionpack 4.0.0
Using redis-activesupport 4.0.0
Using redis-namespace 1.5.1
Using redis-rails 4.0.0
Using request_store 1.0.5
Using rinku 1.7.3
Using rqrcode 0.4.2
Using rqrcode-rails3 0.1.7
Using rugments 1.0.0.beta7
Using sass-rails 4.0.3
Using seed-fu 2.3.5
Using select2-rails 3.5.2
Using settingslogic 2.0.9
Using sidekiq 3.3.0
Using sidetiq 0.6.3
Using simple_oauth 0.1.9
Using sinatra 1.4.4
Using six 0.2.0
Using slack-notifier 1.0.0
Using temple 0.6.7
Using slim 2.0.2
Using stamp 0.5.0
Using state_machine 1.2.0
Using task_list 1.0.2
Using twitter-stream 0.1.16
Using tinder 1.9.3
Using uglifier 2.3.2
Using underscore-rails 1.4.4
Using unf_ext 0.0.6
Using unf 0.1.4
Using unicorn 4.6.3
Using unicorn-worker-killer 0.4.2
Using version_sorter 2.0.0
Using wikicloth 0.8.1
Bundle complete! 136 Gemfile dependencies, 229 gems now installed.
Gems in the groups development, test and mysql were not installed.
Bundled gems are installed into ./vendor/bundle.

Let me know if anything else required.

Hi
You can do the below checks if you wish to

  1. Run the rake test to check if there are any issues in sidekiq
    cd /home/git/gitlab
    bundle exec rake gitlab:sidekiq:check --trace
  2. check the sidekiq logs in /home/git/gitlab/log
  3. restart gitlab and check if sidekiq comes up.
  4. kill sidekiq and restart (ps -ef| grep sidekiq)

I would prefer the first two from the above list.

Hi Ershad

Thank you

I tried:
1). bundle exec rake gitlab:sidekiq:check --trace

It gave me below output:
git@AHV-ID-2065:~/gitlab$ bundle exec rake gitlab:sidekiq:check --trace RAILS_ENV=production
** Invoke gitlab:sidekiq:check (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute gitlab:sidekiq:check
Checking Sidekiq …

Running? … no
Try fixing it:
sudo -u git -H RAILS_ENV=production bin/background_jobs start
For more information see:
doc/install/installation.md in section “Install Init Script”
see log/sidekiq.log for possible errors
Please fix the error above and rerun the checks.

Checking Sidekiq … Finished

2). tail log/sidekiq.log:
bundler: command not found: sidekiq
Install missing gem executables with bundle install
bundler: command not found: sidekiq
Install missing gem executables with bundle install

Tried restarting gitlab
3). #service gitlab restart
Shutting down Unicorn.
GitLab is not running.
Starting both the GitLab Unicorn and Sidekiq…Waited 30s for the processes to write their pids, something probably went wrong.

4). ps -ef| grep sidekiq
root 10031 6965 0 11:19 pts/1 00:00:00 grep --color=auto sidekiq

Please see above quotes… plz run the above command.