Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Pipeline Failure: Failed to connect to socket /run/dbus/system_bus_socket: Connection refused

Dean Christian Armada January 30, 2025

I am trying to implement regression testing using Cypress in my pipeline in one of my pipeline steps. Below screenshot is the pipeline failure where I am just simply verifying cypress

 

Screenshot 2025-01-31 at 3.06.45 AM.png

In my local, it is working fine. Seems like this issue is really related to Bitbucket pipeline itself

 

My docker-compose.yml is as simple as below

Screenshot 2025-01-31 at 3.09.31 AM.png

 

How can I bypass the error on the first screenshot? I want to keep using docker-compose.yml to keep for identical purposes with my local environment

1 answer

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 3, 2025

Hi @Dean Christian Armada,

Could you perhaps share the content of your bitbucket-pipelines.yml file so I can try to reproduce this and understand what is happening?

Please make sure to sanitize sensitive / private data in the file (if any) before sharing. I just want to see the commands running during the build, pipelines config options, etc.

Kind regards,
Theodora

Dean Christian Armada February 3, 2025

Hello Theodora,

Below is my bitbucket-pipelines.yml

 

image: atlassian/default-image:4

options
:
docker: true

definitions
:
steps:
- step: &NotifyStart
name: Notify that the pipeline has started
image: curlimages/curl
script:
- curl --header "Content-Type:application/json; charset=utf-8" --header "Authorization:Bearer $BOT_TOKEN" --request POST --data '{"channel":"'$CHANNEL_ID'","text":"Attention<!channel> \n:timer_clock:'$BITBUCKET_REPO_SLUG' '$BITBUCKET_BRANCH' branch has *started the build* at '$BITBUCKET_GIT_HTTP_ORIGIN'/pipelines/results/'$BITBUCKET_BUILD_NUMBER'"}' https://slack.com/api/chat.postMessage
- step: &RegressionTesting
name: Automating testing for both backend and frontend
services:
- docker
caches:
- docker
- pip
script:
- export DOCKER_BUILDKIT=0
- apt-get update && apt-get install -y git git-core
- ./starter.sh
- docker-compose exec backend coverage run --source='.' manage.py test > backend_feature_tests.txt || true
- docker-compose exec backend coverage report > backend_feature_coverage.txt
- cat backend_feature_tests.txt
- cat backend_feature_coverage.txt
- docker ps -a
- docker-compose exec cypress cypress verify
- docker-compose exec cypress cypress run --headless || true

pipelines:
branches:
'{master}':
- step:
<<: *NotifyStart
- step:
<<: *RegressionTesting

Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 4, 2025

Hi Dean Christian,

Thank you for the info.

I tried to reproduce with a step as similar as possible to your &RegressionTesting step but I haven't been able to so far. However, I am missing some information that may be key to reproducing this.

  1. What commands does your script ./starter.sh execute? I am running a simple docker-compose up --detach, but I'm not sure if you're doing something different or additional things.

  2. I see in your docker-compose.yml that you have an env_file, ./envs/.cypress. Would it be possible to have the content of that file as well?

  3. I see in your &RegressionTesting step that you have an additional Docker container, backend, where you execute commands. Does this container interact at all with with the cypress container?

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin Site Admin
TAGS
AUG Leaders

Atlassian Community Events