Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ERROR: Registering runner with gitlab-runner

I read other posts and solutions described but they didnt work for me.

I have my own gitlab server running at AWS with its url mygitlab.com. The gitlab server works fine with a lot of projects.

I have another server S1 in the same AWS network than my gitlab server. Servers see each other, telnet works fine on 80 (http) or 443 (https) ports from my server S1 to the gitlab server.

For my project named "test" on my gitlab server I go to the webpage of this project then to the menu "settings -> CI/CD" then I "expand" the "Runners" section then I go in the section "Specific runners" saying : "These runners are specific to this project." I copy the given url (mygitlab.com) and the specific token.

On my server S1 I installed gitlab-runner then I launch :

sudo gitlab-runner register --url https://mygitlab.com --registration-token mytoken

I have this error :

ERROR: Registering runner... forbidden (check registration token)  runner=mytoken
PANIC: Failed to register the runner. You may be having network problems. 

I tried http instead of https, I got the same error

I tried and checked solutions I read here and on other forums :

  • be sure the token is specific to the project : done !
  • try to "Reset registration token" : done !
  • is there 127.0.0.0 localhost in /etc/hosts : done !
  • checking network between servers : done !

Thanks for tips and any idea to test !

like image 978
Fabrice Avatar asked Feb 23 '26 05:02

Fabrice


1 Answers

It may be you run your GitLab instance behind a reverse proxy such as Nginx. and you or your friends set allow from IP and block other source traffic.

like image 109
MrTshoot Avatar answered Feb 27 '26 02:02

MrTshoot



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!