GitLab CI - Setting up the GitLab Runner for CI/CD - gitlab

I was setting up the GitLab Runner on another server system . I faced an error in the Registration step. The error said ‘having a network problem’.
The detailed description of the error is
“ERROR: Registering runner… failed . Couldn’t execute POST against http://gitlab.sw.st
ratus.com/api/v4/runners: Post http://gitlab.sw.stratus.com/api/v4/runners: dial
tcp 134.111.200.59:80: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.”
The thing is the server system on which I am trying to set up the GitLab Runner uses the port 80 for talking to an Apache server. Is there any way, I can make the GitLab Runner dial a connection on any other port apart from 80?
Regards,
Poornima

You should modify advertise_address and listen_address in your Runner configuration.
[session_server]
listen_address = "0.0.0.0:8093"
advertise_address = "gitlab.com:8093"
Check here to get the full documentation.

Related

Mesibo On Premise Deployment - curl: (56) Recv failure: Connection reset by peer

I am trying to configure mesibo communication services On-Premise Deployment and tried to deploy while backend application using docker - FastCGI - NGINX. I have followed the below URL https://mesibo.com/documentation/on-premise/#hosting-mesibo-backend-apis Please see the title "Hosting mesibo backend APIs". I have used the 11443 port to deploy the application in the docker.
While checking the command sudo netstat -ltnp getting the following output. So the process is running correctly.
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 267497/mysqld
tcp 0 0 0.0.0.0:11443 0.0.0.0:* LISTEN 535097/backend
When I try to run the command
curl http://0.0.0.0:11443 => getting error as "curl: (56) Recv failure: Connection reset by peer"
Please help me to get out of this issue.
========= Found the Issue - But it may be help someone
run the command 'ifconfig' to find the docker ip address. then try the curl command with that ip address.
Please note, mesibo DOES NOT have any web server so you can't use curl directly.
Refer to this document
https://mesibo.com/documentation/on-premise/#hosting-mesibo-backend-apis
It clearly says you should configure and point to your web server. In turn, your web server will connect to the mesibo FastCGI server. From the above doc
you need to configure a URL on your webserver to access backend APIs.
Any API request received on this URL should be forwarded to the mesibo
backend FastCGI server at the port specified in the command, port 5000
in above example.
Please follow the document and configure a URL on your web server and then curl to that URL.

ERROR: Registering runner on Windows Server

My environment : windows server 2019, isolated network w/o internet access, local instance of gitlab server, gitlab-runner v 15.2.0.
I try to register runner on my gitlab server i got this error:
ERROR: Registering runner. failed runner=<runner> status=couldn't execute POST against https://test-gitlabserver/api/v4/runners: Post https://test-gitlabserver/api/v4/runners: net/http: TLS handshake timeout PANIC: Failed to register the runner. You may be having network problems.
So, I check that port 443, 80 is accessible, certificate chain is valid, certificate trusted authority is up to date, check certificate revocation list is up to date. When I'm do
curl https://<test-gitlabserver>
everything is ok, But runner still not register.
After that I have the internet access on this windows server and it's work like a charm, but it's must be isolated network. I do a few wireshark capture to compare sessions and I see - if internet connection is down, after TLS "client hello" phase, connection with gilab server close, but if internet connection is up, after TLS "Client hello", i got "Server hello" and runner succesfully register
P.S sry for mistakes in text=)

Rabbit MQ changing hostname while preserving rabbitMQ artifacts and messages

This question is regarding rabbitmq config
I hope this question is appropriate for stackoverflow forum.
Please point me to right forum if it isnt
My problem statement that I need to to change hostname of a linux server from "thishost" to "thathost"
The host "thishost" has RabbitMQ installed on it with a ton of artifacts and messages
I need to be able to preserve all the RabbitMQ artifacts such as queues, exchanges and also messages when the hostname changes to "thathost"
I am considering configuration change to enable rabbitmq see old hostname (thishost) despite the name change for linux
To ensure that rabbitmq hostname remains same I peg it to the original hostname by configuring following two parameters in the rabbitmq configuration file
/etc/rabbitmq/rabbitmq-env.conf
...
HOSTNAME=thishost
NODENAME=rabbit#thishost
Having done this change in rabbitmq config, I changed the linux hostname to "thathost" and try to start the rabbitmq service.
The rabbitmq service now refuses to start and the error messages are as follows
service rabbitmq-server start
Job for rabbitmq-server.service failed because the control process exited with error code.
See "systemctl status rabbitmq-server.service" and "journalctl -xe" for details.
journalctl -xe
Nov 30 11:20:07 ubuntula1 systemd[1]: Failed to start RabbitMQ Messaging Server.
Nov 30 11:20:18 ubuntula1 systemd[1]: rabbitmq-server.service: Failed with result 'exit-code'.
The logfile /var/log/rabbitq shows following error
/var/log/rabbitq
ERROR: epmd error for host thishost: nxdomain (non-existing domain)
Any thoughts on
how to fix the rabbitmq config
any alternative way on making rabbitmq agnostic to hostname
is there a better idea to preserve the rabbitmq artifacts across hostnames
Please note I tried following
export import artifacts using rabbitmqctl export__definitions/import_definitions
Store and load messages using rabbitio
However as I mentioned I have a ton of artifacts and messages and the rigor involved that approach makes it error prone so I am searching for a less rigorous approach
Thanks much folks
Going by the error message in logfile "epmd error for host thishost: nxdomain (non-existing domain)"
I stumbled upon this post How to resolve ERROR: epmd error for host nxdomain (non-existing domain)?
While this is not directly relevant, it sure provides a tip that a /etc/hosts entry is needed for mapping old hostname to the same ip address.
With alias for old hostname addded in /etc/hosts my problem was solved :-)
SO to sum it up, if you want to change the hostname of your linux host - then you need to do two things to save your artifacts from becoming unusable after hostname change
Change to rabbitmq configuration as I already described
/etc/rabbitmq/rabbitmq-env.conf
...
HOSTNAME=thishost
Make an alisas in my /etc/hosts to add old hostname mapping to ip address in addition to new hostname as follows
/etc/hosts
...
a.b.c.d thathost thishost
That solved my problem and rabbitmq starts fine with all existing artifacts intact after hostname change

Failed to complete tunnel connection error with ngrok

Failed to complete tunnel connection
The connection to http://cc1e064782fc.ngrok.io was successfully tunneled to your ngrok client, but the client failed to establish a connection to the local address localhost:80.
Make sure that a web service is running on localhost:80 and that it is a valid address.
The error encountered was: dial tcp [::1]:80: connectex: No connection could be made because the target machine actively refused it.
Hi, I was setting up ngrok and got this error, I disabled the firewall too.
Take a look at this video where I show you the error.
https://youtu.be/uP4B79w4s7c
Its kind of a message that ngrok successfully created tunnel to your pc at port 80 but there is no service running at that port in your OS, Mostly people run a web server at 80 but you can run any service at that port.
So lets assume you are running a web server in your OS on port 80 then you can access that web server from anywhere on the internet using that ngrok tunnel.

Failed to reach erlang port mapper (server ports open and connecting via Telnet)

I am trying to add a new server to an existing cluster. I am using community version 2.1.1 on both ubuntu servers on windows azure. I tried to add new server via web interface and via command line. But i am getting following error.
***"Failed to reach erlang port mapper. Timeout connecting to "xx.xx.xx.xx" on port "4369". This could be due to an incorrect host/port combination or a firewall in place between the servers.']***
Port 4369 is open on both servers and iam able to connect to 4369 port on other server using telnet
Got the same error when used the following command.
/opt/couchbase/bin/couchbase-cli server-add --cluster=xx.xx.xx.xx:8091 -u user -p password --server-add=yy.yy.yy.yy:8091 --server-add-username=Administrator --server-add-password=password
ERROR: unable to server-add yy.yy.yy.yy:8091 (400) Bad Request
[u'Prepare join failed. Failed to reach erlang port mapper. Timeout connecting to "xx.xx.xx.xx" on port "4369". This could be due to an incorrect host/port combination or a firewall in place between the servers.']
root#xx.xx.xx.xx:/home/azureuser/project# telnet yy.yy.yy.yy 4369
Trying yy.yy.yy.yy...
Connected to yy.yy.yy.yy.
Escape character is '^]'.
^]q
telnet> q
Connection closed.
What will be the issue? Please help me sort this out.
There are a number of ports required to be open between cluster nodes (in addition to 4369) - I'd suggest ensuring all of the ports listed in the Couchbase Installation Guide - Network ports are open and accessible.

Resources