Hi!
I'm having a hard time understanding an issue that happens when I run a pipeline on a self hosted (linux) runner.
I get the following problem during the `Build setup`,
```
Cloning into '/opt/atlassian/pipelines/agent/build'...
fatal: unable to access 'https://bitbucket.org/xxx/test-pipeline-x.git/': Recv failure: Connection reset by peer
```
I've checked that I have access to internet (can curl to bitbucket and atlassian sites without a problem)
Hello @Rafael Soares Pinto and welcome to the Community!
Based on the error message you received, this seems to be a connectivity issue from the runner's host to Atlassian infrastructure.
This is usually caused if your runner's host is behind a firewall/proxy that is blocking the connection to Atlassian.
In this case, I would suggest you confirm if all the IPs listed in Valid IP addresses for bitbucket.org are allowed in the firewall, as the connection to those IPs is necessary for the self-hosted runner to clone the repository.
You can also try executing the runner in a different machine/network (your personal laptop, for example) and check if the same error happens.
Let us know in case you have any questions.
Thank you, @Rafael Soares Pinto !
Patrik S
Hi @Patrik S ! Thanks for you answer!
Using the same VM I switched to use the linux shell and it works perfectly, but I don't know why it did not work for docker runner.
I'm trying to host the runner on a google compute instance. Previously I used the command
```
docker container run \
-v /tmp:/tmp \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /var/lib/docker/containers:/var/lib/docker/containers:ro \
-e ACCOUNT_UUID={${ACCOUNT_UUID}} \
-e RUNNER_UUID={${RUNNER_ID}} \
-e RUNTIME_PREREQUISITES_ENABLED=true \
-e OAUTH_CLIENT_ID=${OAUTH_CLIENT_ID} \
-e OAUTH_CLIENT_SECRET=${OAUTH_CLIENT_SECRET} \
--name runner-${RUNNER_ID} \
-e WORKING_DIRECTORY=/tmp docker-public.packages.atlassian.com/sox/atlassian/bitbucket-pipelines-runner:1
```
but it returned me the error i mentioned earlier. I'm a little lost on this issue. Do I need to do an extra configuration on the compute instance?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Rafael Soares Pinto ,
I'm not very familiar with the Google compute instance configuration, but this would lead me to believe a firewall (see Google VPC firewall) is blocking the connection to Valid Bitbucket.org IP addresses. Interesting though that with the shell runners in the same environment it did work.
Could you confirm if the host machine meets all the requirements listed in Prerequisites for linux docker runners ?
Also, if you try to execute the Linux docker runner on a different machine (outside of GCloud), does the same issue happen?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Patrik S
I have found this issue only when executing the runner within GCLoud. When I run it on my personal notebook, it works without a problem. I also checked that all the prerequisites are satisfied.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.