gitlab installation: using localhost

7,937

Verify that /home/git/gitlab/tmp/sockets/gitlab.socket actually exists and have permissions/ownership in-line with the setup instructions. Also, try running these two commands inside of the /home/git/gitlab directory:

sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production

All items should be green. If not, you'll have to troubleshoot more specifically from there.

Here's a Github issue related to what you are seeing. Hopefully the above steps fix it or at least get you further!

Your database is not setup properly OR your credentials for accessing it are wrong. Please make sure you followed https://github.com/gitlabhq/gitlabhq/blob/5-0-stable/doc/install/databases.md and did one of the following as instructed for your DB platform.

Mysql

sudo -u git cp config/database.yml.mysql config/database.yml

PostgreSQL

sudo -u git cp config/database.yml.postgresql config/database.yml

Share:
7,937

Related videos on Youtube

Iyas
Author by

Iyas

Code is poetry.

Updated on September 18, 2022

Comments

  • Iyas
    Iyas almost 2 years

    I am following this instruction to install gitlab: https://github.com/gitlabhq/gitlabhq/blob/5-0-stable/doc/install/installation.md

    All is well until #7. nginx. I have problem with this specific instruction

    # Change **YOUR_SERVER_IP** and **YOUR_SERVER_FQDN**
    # to the IP address and fully-qualified domain name
    # of your host serving GitLab
    sudo vim /etc/nginx/sites-available/gitlab
    

    Can I use 127.0.0.1 and localhost for YOUR_SERVER_IP and YOUR_SERVER_FQDN respectively? I really don't want to use any .coms, this gitlab will be used internally.

    When I visited localhost, it shows 502 Bad Gateway.

    My error_log file content

    2013/03/24 09:18:21 [crit] 12152#0: *1 connect() to unix:/home/git/gitlab/tmp/sockets/gitlab.socket failed (2: No such file or directory) while connecting to upstream, client: 127.0.0.1, server: localhost, request: "GET / HTTP/1.1", upstream: "http://unix:/home/git/gitlab/tmp/sockets/gitlab.socket:/", host: "localhost"
    

    Your help is highly appreciated. Thank you.

    • Mark Stanislav
      Mark Stanislav over 11 years
      Can you please show the output from your nginx logs related to the 502 Bad Gateway error? You're going to need further details in this question to narrow down where the issue is arising.
    • Iyas
      Iyas over 11 years
      Hi @MarkStanislav, I've update my question to include the error log.
  • Iyas
    Iyas over 11 years
    Oh no, I missed to inform you that after I ran those two commands, I don't get green items...
  • Iyas
    Iyas over 11 years
    Thanks Mark! Now I can see the green and the red items...