我與綜合安裝程序安裝GitLab,現在我有我成爲一個HTTP 500錯誤,當我嘗試去網站上的問題。我使用nginx的Web服務器作爲和gitlab是端口8000GitLab 7.4.3 HTTP碼500:無法連接到服務器
這是錯誤消息我在production.log下可達:
==> ./gitlab/gitlab-rails/production.log <==
Started GET "/" for 212.227.35.68 at 2014-11-14 10:15:07 -0600
PG::Error (could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
):
activerecord (4.1.1) lib/active_record/connection_adapters/postgresql_adapter.rb:881:in `initialize'
activerecord (4.1.1) lib/active_record/connection_adapters/postgresql_adapter.rb:881:in `new'
activerecord (4.1.1) lib/active_record/connection_adapters/postgresql_adapter.rb:881:in `connect'
activerecord (4.1.1) lib/active_record/connection_adapters/postgresql_adapter.rb:568:in `initialize'
activerecord (4.1.1) lib/active_record/connection_adapters/postgresql_adapter.rb:41:in `new'
activerecord (4.1.1) lib/active_record/connection_adapters/postgresql_adapter.rb:41:in `postgresql_connection'
activerecord (4.1.1) lib/active_record/connection_adapters/abstract/connection_pool.rb:435:in `new_connection'
activerecord (4.1.1) lib/active_record/connection_adapters/abstract/connection_pool.rb:445:in `checkout_new_connection'
activerecord (4.1.1) lib/active_record/connection_adapters/abstract/connection_pool.rb:416:in `acquire_connection'
activerecord (4.1.1) lib/active_record/connection_adapters/abstract/connection_pool.rb:351:in `block in checkout'
/opt/gitlab/embedded/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize'
activerecord (4.1.1) lib/active_record/connection_adapters/abstract/connection_pool.rb:350:in `checkout'
activerecord (4.1.1) lib/active_record/connection_adapters/abstract/connection_pool.rb:265:in `block in connection'
/opt/gitlab/embedded/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize'
activerecord (4.1.1) lib/active_record/connection_adapters/abstract/connection_pool.rb:264:in `connection'
activerecord (4.1.1) lib/active_record/connection_adapters/abstract/connection_pool.rb:541:in `retrieve_connection'
activerecord (4.1.1) lib/active_record/connection_handling.rb:113:in `retrieve_connection'
activerecord (4.1.1) lib/active_record/connection_handling.rb:87:in `connection'
activerecord (4.1.1) lib/active_record/query_cache.rb:51:inn`restore_query_cache_settings'
activerecord (4.1.1) lib/active_record/query_cache.rb:43:in `rescue in call'
activerecord (4.1.1) lib/active_record/query_cache.rb:32:in `call'
activerecord (4.1.1) lib/active_record/connection_adapters/abstract/connection_pool.rb:621:in `call'
actionpack (4.1.1) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
activesupport (4.1.1) lib/active_support/callbacks.rb:82:in `run_callbacks'
actionpack (4.1.1) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
actionpack (4.1.1) lib/action_dispatch/middleware/remote_ip.rb:76:in `call'
actionpack (4.1.1) lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
actionpack (4.1.1) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
railties (4.1.1) lib/rails/rack/logger.rb:38:in `call_app'
railties (4.1.1) lib/rails/rack/logger.rb:20:in `block in call'
activesupport (4.1.1) lib/active_support/tagged_logging.rb:68:in `block in tagged'
activesupport (4.1.1) lib/active_support/tagged_logging.rb:26:in `tagged'
activesupport (4.1.1) lib/active_support/tagged_logging.rb:68:in `tagged'
railties (4.1.1) lib/rails/rack/logger.rb:20:in `call'
actionpack (4.1.1) lib/action_dispatch/middleware/request_id.rb:21:in `call'
rack (1.5.2) lib/rack/methodoverride.rb:21:in `call'
rack (1.5.2) lib/rack/runtime.rb:17:in `call'
rack (1.5.2) lib/rack/lock.rb:17:in `call'
rack (1.5.2) lib/rack/sendfile.rb:112:in `call'
railties (4.1.1) lib/rails/engine.rb:514:in `call'
railties (4.1.1) lib/rails/application.rb:144:in `call'
railties (4.1.1) lib/rails/railtie.rb:194:in `public_send'
railties (4.1.1) lib/rails/railtie.rb:194:in `method_missing'
rack (1.5.2) lib/rack/builder.rb:138:in `call'
rack (1.5.2) lib/rack/urlmap.rb:65:in `block in call'
rack (1.5.2) lib/rack/urlmap.rb:50:in `each'
rack (1.5.2) lib/rack/urlmap.rb:50:in `call'
unicorn (4.6.3) lib/unicorn/http_server.rb:552:in `process_client'
unicorn-worker-killer (0.4.2) lib/unicorn/worker_killer.rb:51:in `process_client'
unicorn (4.6.3) lib/unicorn/http_server.rb:632:in `worker_loop'
unicorn (4.6.3) lib/unicorn/http_server.rb:500:in `spawn_missing_workers'
unicorn (4.6.3) lib/unicorn/http_server.rb:142:in `start'
unicorn (4.6.3) bin/unicorn:126:in `<top (required)>'
/opt/gitlab/embedded/service/gem/ruby/2.1.0/bin/unicorn:23:in `load'
/opt/gitlab/embedded/service/gem/ruby/2.1.0/bin/unicorn:23:in `<main>'
這裏我nginx的默認頁配置:
server {
listen 8000; ## listen for ipv4; this line is default and implied
listen [::]:8000 default_server ipv6only=on; ## listen for ipv6
root /usr/share/nginx/www;
index index.html index.htm;
# Make site accessible from http://localhost/
server_name localhost;
location/{
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ /index.html;
# Uncomment to enable naxsi on this location
# include /etc/nginx/naxsi.rules
}
location /doc/ {
alias /usr/share/doc/;
autoindex on;
allow 127.0.0.1;
allow ::1;
deny all;
}
}
而且gitlab.rb配置文件:
# Change the external_url to the address your users will type in their browser
external_url 'http://gitlab.domain.com:8000'
# External URL to reach the GitLab CI Coordinator at
ci_external_url 'http://ci.domain.com:8000'
一切上Debian的7秒運行erver和我安裝了實際的gitlab版本7.4.3。 安裝過程後,我修改了gitlab.rb startet重新配置爲gitlab gitlab-ctl reconfigure
。之後,我用gitlab-ctl start
開始了gitlab。
編輯: 我已測試打開CI的網站,但也有相同的錯誤消息。
也許相關:http://stackoverflow.com/questions/26859660/change-port-gitlab-on-centos-6-not-successfully如果只是發生在一個自定義的端口上,把它添加到標題。 – 2014-11-14 18:29:39
不,這沒有幫助我。錯誤是一樣的,防火牆沒有問題。 – Rinma 2014-11-14 19:36:25