Gitlab 6.0-stable unicorn.rb timeout and apache2 proxy error
Created by: dawidp
I have configure GitLab-6.0-stanble using official docs and all I get when accessing web gui is proxy error, so I can't even configure new repos or users...
Proxy Error
The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET /users/sign_in.
Reason: Error reading from remote server
Apache/2.2.22 (Debian) Server at gitlab.internal.server Port 80
So I tried to get infor what's on port 8080 and why apache is giving me this error:
telnet localhost 8080
Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
GET / HTTP/1.0
Host: localhost:8080
HTTP/1.1 302 Found
Date: Fri, 23 Aug 2013 05:51:10 GMT
Status: 302 Found
Connection: close
Location: http://localhost:8080/users/sign_in
Content-Type: text/html; charset=utf-8
X-UA-Compatible: IE=Edge,chrome=1
Cache-Control: no-cache
Set-Cookie: request_method=GET; path=/
Set-Cookie: _gitlab_session=BAh7CEkiD3Nlc3Npb25faWQGOgZFRkkiJTc2MzRhMTBmN2NlOTM2ZmQ2OWEyMzU3ZDk3Zjk1NDYxBjsAVEkiE3VzZXJfcmV0dXJuX3RvBjsARiIGL0kiCmZsYXNoBjsARm86JUFjdGlvbkRpc3BhdGNoOjpGbGFzaDo6Rmxhc2hIYXNoCToKQHVzZWRvOghTZXQGOgpAaGFzaHsAOgxAY2xvc2VkRjoNQGZsYXNoZXN7BjoKYWxlcnRJIitZb3UgbmVlZCB0byBzaWduIGluIGJlZm9yZSBjb250aW51aW5nLgY7AFQ6CUBub3cw--b14955c3873ef978d51c31bd4ee2e8f35ac53cec; path=/; HttpOnly
X-Request-Id: 7a53857aa24c02b1aa659a9f2c8f9e2f
X-Runtime: 0.566188
X-Rack-Cache: miss
<html><body>You are being <a href="http://localhos:8080t/users/sign_in">redirected</a>.</body></html>Connection closed by foreign host.
telnet localhost 8080
Trying ::1...
Connected to localhost.
Escape character is '^]'.
GET /users/sign_in HTTP/1.0
Host: localhost:8080
Connection closed by foreign host.
and some error logs with timeout:
I, [2013-08-23T13:55:12.567077 #15775] INFO -- : inherited addr=/home/git/gitlab/tmp/sockets/gitlab.socket fd=15
I, [2013-08-23T13:55:12.567863 #15775] INFO -- : inherited addr=127.0.0.1:8080 fd=16
I, [2013-08-23T13:55:12.569181 #15775] INFO -- : Refreshing Gem list
E, [2013-08-23T13:57:11.952866 #15237] ERROR -- : worker=0 PID:15717 timeout (31s > 30s), killing
E, [2013-08-23T13:57:11.997359 #15237] ERROR -- : reaped #<Process::Status: pid 15717 SIGKILL (signal 9)> worker=0
I, [2013-08-23T13:57:12.029880 #15958] INFO -- : worker=0 ready
My config files /home/git/gitlab/config/gitlab.yml (I have removed the comments)
production: &base
gitlab:
host: gitlab.internal.server
port: 80
https: false
email_from: [email protected]
support_email: [email protected]
default_projects_limit: 10
username_changing_enabled: false
signup_enabled: true # only for testing, haven't setup mail server yet
default_projects_features:
issues: true
merge_requests: true
wiki: true
wall: false
snippets: false
issues_tracker:
gravatar:
enabled: true
ldap:
enabled: false
host: '_your_ldap_server'
base: '_the_base_where_you_search_for_users'
port: 636
uid: 'sAMAccountName'
method: 'ssl' # "ssl" or "plain"
bind_dn: '_the_full_dn_of_the_user_you_will_bind_with'
password: '_the_password_of_the_bind_user'
allow_username_or_email_login: true
omniauth:
enabled: false
allow_single_sign_on: false
block_auto_created_users: true
providers:
satellites:
path: /home/git/gitlab-satellites/
backup:
path: "tmp/backups"
gitlab_shell:
repos_path: /home/git/repositories/
hooks_path: /home/git/gitlab-shell/hooks/
upload_pack: true
receive_pack: true
ssh_port: 2222
git:
bin_path: /usr/bin/git
max_size: 5242880 # 5.megabytes
timeout: 10
extra:
development:
<<: *base
test:
<<: *base
issues_tracker:
redmine:
project_url: "http://redmine/projects/:issues_tracker_id"
issues_url: "http://redmine/:project_id/:issues_tracker_id/:id"
new_issue_url: "http://redmine/projects/:issues_tracker_id/issues/new"
staging:
<<: *base
/home/git/gitlab/config/unicorn.rb
worker_processes 3
working_directory "/home/git/gitlab" # available in 0.94.0+
listen "/home/git/gitlab/tmp/sockets/gitlab.socket", :backlog => 64
listen "127.0.0.1:8080", :tcp_nopush => true
timeout 120
pid "/home/git/gitlab/tmp/pids/unicorn.pid"
stderr_path "/home/git/gitlab/log/unicorn.stderr.log"
stdout_path "/home/git/gitlab/log/unicorn.stdout.log"
preload_app true
GC.respond_to?(:copy_on_write_friendly=) and
GC.copy_on_write_friendly = true
check_client_connection false
before_fork do |server, worker|
defined?(ActiveRecord::Base) and
ActiveRecord::Base.connection.disconnect!
end
after_fork do |server, worker|
defined?(ActiveRecord::Base) and
ActiveRecord::Base.establish_connection
end
Output of env:info
sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production
System information
System: Debian 7.1
Current User: git
Using RVM: no
Ruby Version: 1.9.3p194
Gem Version: 1.8.23
Bundler Version:1.3.5
Rake Version: 10.1.0
GitLab information
Version: 6.0.0
Revision: 86c9737
Directory: /home/git/gitlab
DB Adapter: mysql2
URL: http://gitlab.internal.server
HTTP Clone URL: http://gitlab.internal.server/some-project.git
SSH Clone URL: ssh://[email protected]:2222/some-project.git
Using LDAP: no
Using Omniauth: no
GitLab Shell
Version: 1.7.0
Repositories: /home/git/repositories/
Hooks: /home/git/gitlab-shell/hooks/
Git: /usr/bin/git
and gitlab:check
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production
Checking Environment ...
Git configured for git user? ... yes
Has python2? ... yes
python2 is supported version? ... yes
Checking Environment ... Finished
Checking GitLab Shell ...
GitLab Shell version >= 1.7.0 ? ... OK (1.7.0)
Repo base directory exists? ... yes
Repo base directory is a symlink? ... no
Repo base owned by git:git? ... yes
Repo base access is drwxrws---? ... yes
post-receive hook up-to-date? ... yes
post-receive hooks in repos are links: ... can't check, you have no projects
Checking GitLab Shell ... Finished
Checking Sidekiq ...
Running? ... yes
Checking Sidekiq ... Finished
Checking GitLab ...
Database config exists? ... yes
Database is SQLite ... no
All migrations up? ... yes
GitLab config exists? ... yes
GitLab config outdated? ... no
Log directory writable? ... yes
Tmp directory writable? ... yes
Init script exists? ... yes
Init script up-to-date? ... yes
Projects have satellites? ... can't check, you have no projects
Redis version >= 2.0.0? ... yes
Your git bin path is "/usr/bin/git"
Git version >= 1.7.10 ? ... yes (1.7.10)
Checking GitLab ... Finished
so any ideas ?