Troubleshooting GitLab and GitLab CI

Jose Javi Asilis
Apr 23, 2018 · 2 min read

This is a final post just in case something went wrong with your GitLab installation:

Posts:

  1. [Tutorial — Guide] Installing GitLab, GitLab CI on AWS EC2 from Zero.
  2. Configure GitLab CI on AWS EC2 Using Docker
  3. Configuring .gitlab-ci.yml
  4. Troubleshooting GitLab and GitLab CI (This Post)

#1-IP Changed on GitLab Repo — Displaying wrong URL

You forgot to set an Elastic IP, the IP changed and now your project changed, and now GitLab doesn’t know how to work it out.

We need to change the external URL from the /etc/gitlab/gitlab.rb file:

#Alternative 1 — Change it using Vim

(Go to your PuTTY terminal, and run:

sudo vim /etc/gitlab/gitlab.rb

Press the letter “i” to start editing.

Check line 13. That’s our culprit.

After you finish editing, press esc and type :wq This will write and quit the program.

#Alternative 2— Download the file and change its content.

Alternatively, you can access the file directly through FTP via Filezilla or WinSCP. But you’re going to have to temporarily enable access of the file:

sudo chmod 777 /etc/gitlab/gitlab.rb

From <https://forum.filezilla-project.org/viewtopic.php?t=22618>

After that, we’re able to download the file and edit it:

Change Line 13. Reupload the file to save the changes.

Don’t forget to run:

sudo chmod 600 /etc/gitlab/gitlab.rb

For all alternatives, run:

sudo gitlab-ctl reconfigure

For changes to take effect.

Remember to set an Elastic IP in AWS so this doesn’t’ happen again!

#2- What to do in case the project build or any other stage is failing:

  1. In case you receive that No task runners are running. Then, that could mean:
  • The task runner is not running. Use sudo gitlab-runner start OR sudo gitlab-runner run to make it work.
  • The task runner is configured to run with tags and your job doesn’t have tags with it! Tags aren’t set at the project level, but at the job level inside the .gitlab-ci.yml file!

2. In case that you receive a connection time out problem

In this specific case, the problem was with the lack Elastic IP, and the server address change. By not using Elastic IP, your server’s address is released , and is completely changed.

HackerNoon.com

how hackers start their afternoons.

Jose Javi Asilis

Written by

Tamperer and tinkerer at heart. Loves to work on pushing-boundaries projects. Always with 500% of energy. 🔥🔥🔥

HackerNoon.com

how hackers start their afternoons.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade