This is a final post just in case something went wrong with your GitLab installation:
- [Tutorial — Guide] Installing GitLab, GitLab CI on AWS EC2 from Zero.
- Configure GitLab CI on AWS EC2 Using Docker
- Configuring .gitlab-ci.yml
- 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
#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.
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.
sudo chmod 777 /etc/gitlab/gitlab.rb
After that, we’re able to download the file and edit it:
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:
- 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.