Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

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

share|improve this answer
    
Thanks for the comment, I've updated my answer with a little more progress... –  thebluefox Jun 13 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 –  user2124845 Jun 13 at 18:47

You should save your instance as an image and then upgrade to a larger instance and try to install gitlab and then start a new micro instance. Don't forget to delete your small instance and eb storage. Storage is not free. :) If you are price sensitive, you really shouldn't be using ec2. Use something cheap like digitalocean or linode.

share|improve this answer
    
At the miinute, we're just trying to set up a proof of concept, so Amazons free tier (initially at least) looked the best option for getting something up quickly without getting involved in any kind of SLA. –  thebluefox Jun 13 at 9:24

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.