2

Ok, so I've spooled up an Amazon EC2 server running Ubuntu, and then followed the instructions below to install GitLab;

http://doc.gitlab.com/ce/install/installation.html

The only step I've not been able to complete is running the following check on the status;

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

I get the following error;

rake aborted!
Errno::ENOMEM: Cannot allocate memory - whoami

Which I presume is becuase my EC2 is just running a free tier setup, so isn't that well spec'd.

Regardless, I've been trying to access this through my browser. I've set up the elastic IP and pointed my domain at it (for the purpose of this, lets say its git.mydom.co.uk). Doing a whois on this domain shows me its pointing to the right place.

For some reason though, I get the "Oops, Chrome could not connect to git.mydom.co.uk". Now - for a period of time I was getting the Nginx holding page (telling me I still needed to perform configuration). This though disappeared after removing the default file from /etc/nginx/sites-enabled/ (after reading this could be issue on a troubleshooting page). Since then, I've had nothing, even when I symlinked the file back in from /sites-available. I've tried changing the owner of the git.mydom.co.uk file sat inside /sites-enabled and /sites-available to www-data, as suggested here, but I could only change the permission of the file in /sites-available, and not the symlinked one in /sites-enabled. The content of this file is as follows;

upstream gitlab {
  server unix:/home/git/gitlab/tmp/sockets/gitlab.socket;
}

server {
  listen *:80 default_server;         # e.g., listen 192.168.1.1:80; In most cases *:80 is a good idea
  server_name git.mydom.co.uk;     # e.g., server_name source.example.com;
  server_tokens off;     # don't show the version number, a security best practice
  root /home/git/gitlab/public;

  # Increase this if you want to upload large attachments
  # Or if you want to accept large git objects over http
  client_max_body_size 20m;

  # individual nginx logs for this gitlab vhost
  access_log  /var/log/nginx/gitlab_access.log;
  error_log   /var/log/nginx/gitlab_error.log;

  location / {
    # serve static files from defined root folder;.
    # @gitlab is a named location for the upstream fallback, see below
    try_files $uri $uri/index.html $uri.html @gitlab;
  }

All the paths mentioned in here look ok...I'm about at the end of my knowledge now!

Update #1

After the suggestion of swapping some memory around, I have now managed to get..

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

...working. This though has brought up the following error with gitlab-shell.

gitlab-shell self-check failed
Try fixing it:
Make sure GitLab is running;
Check the gitlab-shell configuration file:
sudo -u git -H editor /home/git/gitlab-shell/config.yml
Please fix the error above and rerun the check)

This after some research I think comes back down to my domain not being correctly configured. I've removed the default symlink from sites-enabled (so there was no conflict with the default_server tag), and I've now altered the root path within git.mydom.co.uk file to point to a simple dir path containing an index file, and still I cannot get it to work through my browser. There's got to be something simply I'm missing?

2 Answers 2

1

It looks like you missed something in the installation procedure because the check is returning an error that it doesn't have enough memory.

The GitLab Ubuntu requirements state:

512MB is the absolute minimum but we do not recommend this amount of memory, you'll need to configure a minimum swap of 256MB, you're memory will only allow you to run one slow unicorn worker, things will case only git ssh access to work because the git http access requires two running workers (one to receive the user request and one for the authorization check)

Since the amazon EC2 free tier instance only has ~600MB of memory you will need to configure swap. You can follow these instructions to configure swap space on your machine: https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-ubuntu-12-04

2
  • Thanks for the comment, I've updated my answer with a little more progress...
    – thebluefox
    Jun 13, 2014 at 14:30
  • It looks like your issue is the same as this one now: stackoverflow.com/questions/19859216/… which seems to be solved by making sure that your domain points to 127.0.0.1 in /etc/hosts
    – Maux
    Jun 13, 2014 at 18:47
0

I ran into this same issue. Adding my Gitlab domain to /etc/hosts and pointing it to 127.0.0.1 solved it for me.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .