Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

triggger pipeline failure on self hosted runner

Elias Balasis
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 24, 2023

It seems bitbucket.org fails to resolve on the self hosted runner side running on CentOS7.

This used to work in the recent past.

Has something changed?

Status: Downloaded newer image for bitbucketpipelines/trigger-pipeline:5.3.0
DEBUG: Starting new HTTPS connection (1): bitbucket.org:443
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 203, in _new_conn
sock = connection.create_connection(
File "/usr/local/lib/python3.10/site-packages/urllib3/util/connection.py", line 60, in create_connection
for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
File "/usr/local/lib/python3.10/socket.py", line 955, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Temporary failure in name resolution
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 790, in urlopen
response = self._make_request(
File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 491, in _make_request
raise new_e
File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 467, in _make_request
self._validate_conn(conn)
File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 1092, in _validate_conn
conn.connect()
File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 611, in connect
self.sock = sock = self._new_conn()
File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 210, in _new_conn
raise NameResolutionError(self.host, self, e) from e
urllib3.exceptions.NameResolutionError: <urllib3.connection.HTTPSConnection object at 0x7f36980029b0>: Failed to resolve 'bitbucket.org' ([Errno -3] Temporary failure in name resolution)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 486, in send
resp = conn.urlopen(
File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 844, in urlopen
retries = retries.increment(
File "/usr/local/lib/python3.10/site-packages/urllib3/util/retry.py", line 515, in increment
raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type]
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='bitbucket.org', port=443): Max retries exceeded with url: /bitbucketpipelines/official-pipes/raw/master/pipes.prod.json (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x7f36980029b0>: Failed to resolve 'bitbucket.org' ([Errno -3] Temporary failure in name resolution)"))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/main.py", line 248, in <module>
pipe = TriggerBuild(pipe_metadata=metadata, schema=schema, check_for_newer_version=True)
File "/main.py", line 68, in __init__
super().__init__(*args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/bitbucket_pipes_toolkit/core.py", line 202, in __init__
self.check_for_newer_version()
File "/usr/local/lib/python3.10/site-packages/bitbucket_pipes_toolkit/core.py", line 307, in check_for_newer_version
response = requests.get(f"{official_pipes_repo}/raw/master/pipes.prod.json")
File "/usr/local/lib/python3.10/site-packages/requests/api.py", line 73, in get
return request("get", url, params=params, **kwargs)
File "/usr/local/lib/python3.10/site-packages/requests/api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 519, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='bitbucket.org', port=443): Max retries exceeded with url: /bitbucketpipelines/official-pipes/raw/master/pipes.prod.json (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x7f36980029b0>: Failed to resolve 'bitbucket.org' ([Errno -3] Temporary failure in name resolution)"))

 

1 answer

1 vote
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 26, 2023

Hello @Elias Balasis,

thank you for reaching out to Community!

From the symptoms of the issue, it seems like a DNS resolution error on the network where you are executing the runner.

In this case, I would suggest the following : 

  • If the runner is behind a firewall, make sure that all the IPs listed in IP addresses to allowlist in your corporate firewall , so the runner is able to connect with Bitbucket's infrastructure
  • Check if your DNS server is configured correctly in /etc/resolv.conf file. You can try changing the DNS settings to Google's DNS by editing that file and changing the IP address after the nameserver keyword : 
    nameserver 8.8.8.8
  • From the runner's host, you can test  resolving bitbucket.org IP from a terminal session using the command : 
    $ dig bitbucket.org 

    $ dig @8.8.8.8 bitbucket.org

Thank you, @Elias Balasis !
Patrik S

Elias Balasis
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 2, 2024

Not even close.

The problem is finally the use of a docker-in-docker image different to the official one, which is not published anywhere.

 

Like Patrik S likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events