2016-07-20 18 views
3

Ich erhalte diesen Fehler zu verbinden, nachdem ich Gitlab auf Arch Linux konfiguriert:Gitlab API-Zugang: Fehler beim internen API

sudo -u Gitlab exec Rake Gitlab bündeln: Check RAILS_ENV = Produktion

Check GitLab API access: FAILED: Failed to connect to internal API 
gitlab-shell self-check failed 
    Try fixing it: 
    Make sure GitLab is running; 
    Check the gitlab-shell configuration file: 
    sudo -u gitlab -H editor /usr/share/webapps/gitlab-shell/config.yml 
    Please fix the error above and rerun the checks. 

unicorn.stderr.log:

INFO -- : Refreshing Gem list 
INFO -- : listening on addr=/run/gitlab/gitlab.socket fd=12 
INFO -- : worker=0 ready 
INFO -- : worker=1 ready 
INFO -- : master process ready 
INFO -- : worker=2 ready 

Berechtigungen:

srwxrwxrwx 1 gitlab gitlab 0 Jul 20 09:20 gitlab.socket 
-rw-r--r-- 1 gitlab gitlab 6 Jul 20 09:20 unicorn.pid 

Gitlab-shell/config.yml

http+unix: "/run/gitlab/gitlab.socket" 
gitlab_url: "http://127.0.0.1:8080" 

Gitlab/unicorn.rb

listen "/run/gitlab/gitlab.socket", :backlog => 1024 
# listen "127.0.0.1:8080", :tcp_nopush => true 

Gitlab/gitlab.yml

host: localhost 
port: 3000 
https: false 

nginx serverblock

server 
{ 
     listen 80; 
     server_name code.example.com; 

     charset utf-8; 

     location/
     { 
       proxy_read_timeout 300; 
       proxy_connect_timeout 300; 
       proxy_redirect off; 

       proxy_set_header X-Forwarded-Proto $scheme; 
       proxy_set_header Host $http_host; 
       proxy_set_header X-Real-IP $remote_addr; 
       proxy_set_header X-Forwarded-Ssl on; 
       proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 
       proxy_set_header X-Forwarded-Proto $scheme; 

       proxy_pass http://127.0.0.1:3000; 
     } 

     server_tokens off; 
} 

Ich habe viele Dinge ausprobiert, nginx zeigt eine leere Seite oder 502 Bad Gateway, und der Befehl gitlab check sagt "Verbindung mit interner API fehlgeschlagen" oder "Fehler 500".

+0

hi, hast du irgendwelche lösungen dafür? – colttt

Antwort

1

Ich hatte das gleiche Problem. Was schließlich das Problem gelöst veränderte Vorgaben:

unicorn['worker_processes']

zunehmende unicorn['listen'] von 127.0.0.1 auf die IP ändern, die Gitlab hört auf.

0

Statt:

http + Unix: "/run/gitlab/gitlab.socket"

Versuch:

gitlab_url: „http + Unix: //% 2Frun% 2Fgitlab% 2Fgitlab .socket "