{"action":"created","issue":{"url":"https://api.github.com/repos/gitlabhq/gitlabhq/issues/5279","repository_url":"https://api.github.com/repos/gitlabhq/gitlabhq","labels_url":"https://api.github.com/repos/gitlabhq/gitlabhq/issues/5279/labels{/name}","comments_url":"https://api.github.com/repos/gitlabhq/gitlabhq/issues/5279/comments","events_url":"https://api.github.com/repos/gitlabhq/gitlabhq/issues/5279/events","html_url":"https://github.com/gitlabhq/gitlabhq/issues/5279","id":20578059,"number":5279,"title":"Gitlab \"bundler: command not found: unicorn_rails\"","user":{"login":"edouard-lopez","id":1212392,"avatar_url":"https://avatars.githubusercontent.com/u/1212392?v=3","gravatar_id":"","url":"https://api.github.com/users/edouard-lopez","html_url":"https://github.com/edouard-lopez","followers_url":"https://api.github.com/users/edouard-lopez/followers","following_url":"https://api.github.com/users/edouard-lopez/following{/other_user}","gists_url":"https://api.github.com/users/edouard-lopez/gists{/gist_id}","starred_url":"https://api.github.com/users/edouard-lopez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edouard-lopez/subscriptions","organizations_url":"https://api.github.com/users/edouard-lopez/orgs","repos_url":"https://api.github.com/users/edouard-lopez/repos","events_url":"https://api.github.com/users/edouard-lopez/events{/privacy}","received_events_url":"https://api.github.com/users/edouard-lopez/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2013-10-06T10:50:58Z","updated_at":"2016-02-11T16:44:31Z","closed_at":"2014-03-22T23:11:46Z","body":"Hi,\r\nwhen restarting gitlab with my user (not `gitlab` one):\r\n\r\n    sudo service gitlab restart\r\n\r\nI'm having a recurring issue which I can't pin down:\r\n\r\n    Starting the GitLab Unicorn web server...\r\n    bundler: command not found: unicorn_rails\r\n    Install missing gem executables with `bundle install`\r\n    Starting the GitLab Sidekiq event dispatcher...\r\n    Could not find rake-10.1.0 in any of the sources\r\n    Run `bundle install` to install missing gems.\r\n\r\n### Environment\r\n* OS: `Ubuntu 12.04.3 LTS`\r\n* Gitlab: `6.0` → `6.1`.\r\n\r\n## Attempt to solve: `bundle install`\r\n\r\n    cd /home/git/gitlab\r\n    sudo -u git -H bundle install\r\n\r\nOutput:\r\n\r\n    Your bundle is complete!\r\n    Gems in the groups development, test and postgres were not installed.\r\n    It was installed into ./vendor/bundle \r\n\r\n### `bundle exec unicorn_rails`\r\n\r\nAfter reading [this post about same issue on Gitlab `3.1`](https://groups.google.com/forum/#!topic/gitlabhq/lmpzKdleSAI), I tried:\r\n\r\n    sudo -u git -H bundle exec unicorn_rails\r\n\r\nOutput:\r\n\r\n    E, [2013-10-06T12:53:29.739678 #12824] ERROR -- : adding listener failed addr=0.0.0.0:8080 (in use)\r\n    E, [2013-10-06T12:53:29.740003 #12824] ERROR -- : retrying in 0.5 seconds (4 tries left)\r\n    E, [2013-10-06T12:53:30.240487 #12824] ERROR -- : adding listener failed addr=0.0.0.0:8080 (in use)\r\n    E, [2013-10-06T12:53:30.240869 #12824] ERROR -- : retrying in 0.5 seconds (3 tries left)\r\n    E, [2013-10-06T12:53:30.741420 #12824] ERROR -- : adding listener failed addr=0.0.0.0:8080 (in use)\r\n    E, [2013-10-06T12:53:30.741872 #12824] ERROR -- : retrying in 0.5 seconds (2 tries left)\r\n    E, [2013-10-06T12:53:31.242512 #12824] ERROR -- : adding listener failed addr=0.0.0.0:8080 (in use)\r\n    E, [2013-10-06T12:53:31.242956 #12824] ERROR -- : retrying in 0.5 seconds (1 tries left)\r\n    E, [2013-10-06T12:53:31.743728 #12824] ERROR -- : adding listener failed addr=0.0.0.0:8080 (in use)\r\n    E, [2013-10-06T12:53:31.744091 #12824] ERROR -- : retrying in 0.5 seconds (0 tries left)\r\n    E, [2013-10-06T12:53:32.244666 #12824] ERROR -- : adding listener failed addr=0.0.0.0:8080 (in use)\r\n    /home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.3/lib/unicorn/socket_helper.rb:147:in `initialize': Address already in use - bind(2) (Errno::EADDRINUSE)\r\n            from /home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.3/lib/unicorn/socket_helper.rb:147:in `new'\r\n            from /home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.3/lib/unicorn/socket_helper.rb:147:in `bind_listen'\r\n            from /home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.3/lib/unicorn/http_server.rb:229:in `listen'\r\n            from /home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.3/lib/unicorn/http_server.rb:773:in `block in bind_new_listeners!'\r\n            from /home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.3/lib/unicorn/http_server.rb:773:in `each'\r\n            from /home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.3/lib/unicorn/http_server.rb:773:in `bind_new_listeners!'\r\n            from /home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.3/lib/unicorn/http_server.rb:141:in `start'\r\n            from /home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.3/bin/unicorn_rails:209:in `<top (required)>'\r\n            from /home/git/gitlab/vendor/bundle/ruby/1.9.1/bin/unicorn_rails:23:in `load'\r\n            from /home/git/gitlab/vendor/bundle/ruby/1.9.1/bin/unicorn_rails:23:in `<main>'\r\n    eE, [2013-10-06T12:53:29.739678 #12824] ERROR -- : adding listener failed addr=0.0.0.0:8080 (in use)\r\n    E, [2013-10-06T12:53:29.740003 #12824] ERROR -- : retrying in 0.5 seconds (4 tries left)\r\n    E, [2013-10-06T12:53:30.240487 #12824] ERROR -- : adding listener failed addr=0.0.0.0:8080 (in use)\r\n    E, [2013-10-06T12:53:30.240869 #12824] ERROR -- : retrying in 0.5 seconds (3 tries left)\r\n    E, [2013-10-06T12:53:30.741420 #12824] ERROR -- : adding listener failed addr=0.0.0.0:8080 (in use)\r\n    E, [2013-10-06T12:53:30.741872 #12824] ERROR -- : retrying in 0.5 seconds (2 tries left)\r\n    E, [2013-10-06T12:53:31.242512 #12824] ERROR -- : adding listener failed addr=0.0.0.0:8080 (in use)\r\n    E, [2013-10-06T12:53:31.242956 #12824] ERROR -- : retrying in 0.5 seconds (1 tries left)\r\n    E, [2013-10-06T12:53:31.743728 #12824] ERROR -- : adding listener failed addr=0.0.0.0:8080 (in use)\r\n    E, [2013-10-06T12:53:31.744091 #12824] ERROR -- : retrying in 0.5 seconds (0 tries left)\r\n    E, [2013-10-06T12:53:32.244666 #12824] ERROR -- : adding listener failed addr=0.0.0.0:8080 (in use)\r\n    /home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.3/lib/unicorn/socket_helper.rb:147:in `initialize': Address already in use - bind(2) (Errno::EADDRINUSE)\r\n            from /home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.3/lib/unicorn/socket_helper.rb:147:in `new'\r\n            from /home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.3/lib/unicorn/socket_helper.rb:147:in `bind_listen'\r\n            from /home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.3/lib/unicorn/http_server.rb:229:in `listen'\r\n            from /home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.3/lib/unicorn/http_server.rb:773:in `block in bind_new_listeners!'\r\n            from /home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.3/lib/unicorn/http_server.rb:773:in `each'\r\n            from /home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.3/lib/unicorn/http_server.rb:773:in `bind_new_listeners!'\r\n            from /home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.3/lib/unicorn/http_server.rb:141:in `start'\r\n            from /home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.3/bin/unicorn_rails:209:in `<top (required)>'\r\n            from /home/git/gitlab/vendor/bundle/ruby/1.9.1/bin/unicorn_rails:23:in `load'\r\n\r\n### Listening on `0.0.0.0:8080`\r\nChecking what is listening on `0.0.0.0:8080` with `nmap`\r\n\r\n    nmap 0.0.0.0 -p8080\r\n\r\nOutput:\r\n\r\n    PORT     STATE SERVICE\r\n    8080/tcp open  http-proxynmap 0.0.0.0 -p8080\r\n\r\n### `config/unicorn.rb`\r\n\r\nI check my `/home/git/gitlab/config/unicorn.rb`\r\n\r\n    listen \"127.0.0.1:8181\", :tcp_nopush => true   \r\n\r\nAny idea what causing this?"},"comment":{"url":"https://api.github.com/repos/gitlabhq/gitlabhq/issues/comments/182950985","html_url":"https://github.com/gitlabhq/gitlabhq/issues/5279#issuecomment-182950985","issue_url":"https://api.github.com/repos/gitlabhq/gitlabhq/issues/5279","id":182950985,"user":{"login":"rutsky","id":46573,"avatar_url":"https://avatars.githubusercontent.com/u/46573?v=3","gravatar_id":"","url":"https://api.github.com/users/rutsky","html_url":"https://github.com/rutsky","followers_url":"https://api.github.com/users/rutsky/followers","following_url":"https://api.github.com/users/rutsky/following{/other_user}","gists_url":"https://api.github.com/users/rutsky/gists{/gist_id}","starred_url":"https://api.github.com/users/rutsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rutsky/subscriptions","organizations_url":"https://api.github.com/users/rutsky/orgs","repos_url":"https://api.github.com/users/rutsky/repos","events_url":"https://api.github.com/users/rutsky/events{/privacy}","received_events_url":"https://api.github.com/users/rutsky/received_events","type":"User","site_admin":false},"created_at":"2016-02-11T16:44:31Z","updated_at":"2016-02-11T16:44:31Z","body":"I experienced same issue with `bundler: command not found: unicorn_rails` during migration from Gitlab 5.4 to 6.0. \r\n`bundle install` command in 6.0 from docs doesn't  work properly in my case because `bundler` caches `--without` option.\r\n\r\nWhen I installed Gitlab 5.4 I specified:\r\n\r\n```\r\nsudo -u git -H bundle install --deployment --without development test mysql unicorn aws\r\n```\r\n\r\nand during migration to 6.0 that `--without` was preserved:\r\n\r\n```\r\nroot@2e7cc95677d2:/home/git/gitlab# sudo -u git -H bundle config\r\nSettings are listed in order of priority. The top value will be used.\r\nfrozen\r\nSet for your local app (/home/git/gitlab/.bundle/config): \"1\"\r\n\r\npath\r\nSet for your local app (/home/git/gitlab/.bundle/config): \"vendor/bundle\"\r\n\r\nwithout\r\nSet for your local app (/home/git/gitlab/.bundle/config): \"development:test:mysql:unicorn:aws\"\r\n\r\ndisable_shared_gems\r\nSet for your local app (/home/git/gitlab/.bundle/config): \"1\"\r\n```\r\n\r\nTo solve this issue I removed cached value of `--without`:\r\n\r\n```\r\nroot@2e7cc95677d2:/home/git/gitlab# sudo -u git -H bundle config --delete without\r\n```\r\n\r\nAnd installed deps again (not that this string is for PostgreSQL configuration):\r\n\r\n```\r\nsudo -u git -H bundle install --without development test mysql --deployment\r\n```\r\n"}}