我与综合安装程序安装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