Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory #29709

Open
RslnTylr opened this issue Jun 19, 2024 · 4 comments
Labels
stage: needs information Not enough info to reproduce the issue

Comments

@RslnTylr
Copy link

RslnTylr commented Jun 19, 2024

Test code to reproduce

Basic login test

.gitlab-ci.yml file:

image: node:20.14.0

stages:
    - test

test:
    image: cypress/browsers:node-20.9.0-chrome-118.0.5993.88-1-ff-118.0.2-edge-118.0.2088.46-1
    stage: test
    script:
        # install dependencies
        - npm ci
        # run Cypress tests
        - npx cypress run --browser chrome
        # - npm install
        # - npm run runHeadless
    tags:
        - shared

package.json file:

 "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },

Cypress Mode

cypress run

Cypress Version

13.9.0

Browser Version

cypress/browsers:node-20.9.0-chrome-118.0.5993.88-1-ff-118.0.2-edge-118.0.2088.46-1

Node version

node:20.14.0

Operating System

UNIX

Memory Debug Logs

Running with gitlab-runner 16.11.0 (91a27b2a)
  on Platform EKS Runner FY7CgVe2y, system ID: r_xbSm4hFEHvfo
Resolving secrets
Preparing the "kubernetes" executor
00:00
Using Kubernetes namespace: [MASKED]
Using Kubernetes executor with image cypress/browsers:node-20.9.0-chrome-118.0.5993.88-1-ff-118.0.2-edge-118.0.2088.46-1 ...
Using attach strategy to execute scripts...
Preparing environment
03:13
Using FF_USE_POD_ACTIVE_DEADLINE_SECONDS, the Pod activeDeadlineSeconds will be set to the job timeout: 1h0m0s...
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
	ContainersNotInitialized: "containers with incomplete status: [init-permissions]"
	ContainersNotReady: "containers with unready status: [build helper]"
	ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
	ContainersNotInitialized: "containers with incomplete status: [init-permissions]"
	ContainersNotReady: "containers with unready status: [build helper]"
	ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
	ContainersNotReady: "containers with unready status: [build helper]"
	ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
	ContainersNotReady: "containers with unready status: [build helper]"
	ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
	ContainersNotReady: "containers with unready status: [build helper]"
	ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
	ContainersNotReady: "containers with unready status: [build helper]"
	ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
	ContainersNotReady: "containers with unready status: [build helper]"
	ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
	ContainersNotReady: "containers with unready status: [build helper]"
	ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
	ContainersNotReady: "containers with unready status: [build helper]"
	ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
	ContainersNotReady: "containers with unready status: [build helper]"
	ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
	ContainersNotReady: "containers with unready status: [build helper]"
	ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
	ContainersNotReady: "containers with unready status: [build helper]"
	ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
	ContainersNotReady: "containers with unready status: [build helper]"
	ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
	ContainersNotReady: "containers with unready status: [build helper]"
	ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
	ContainersNotReady: "containers with unready status: [build helper]"
	ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
	ContainersNotReady: "containers with unready status: [build helper]"
	ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
	ContainersNotReady: "containers with unready status: [build helper]"
	ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
	ContainersNotReady: "containers with unready status: [build helper]"
	ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
	ContainersNotReady: "containers with unready status: [build helper]"
	ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
	ContainersNotReady: "containers with unready status: [build helper]"
	ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
	ContainersNotReady: "containers with unready status: [build helper]"
	ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
	ContainersNotReady: "containers with unready status: [build helper]"
	ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
	ContainersNotReady: "containers with unready status: [build helper]"
	ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
	ContainersNotReady: "containers with unready status: [build helper]"
	ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
	ContainersNotReady: "containers with unready status: [build helper]"
	ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
	ContainersNotReady: "containers with unready status: [build helper]"
	ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
	ContainersNotReady: "containers with unready status: [build helper]"
	ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
	ContainersNotReady: "containers with unready status: [build helper]"
	ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
	ContainersNotReady: "containers with unready status: [build helper]"
	ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
	ContainersNotReady: "containers with unready status: [build helper]"
	ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
	ContainersNotReady: "containers with unready status: [build helper]"
	ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
	ContainersNotReady: "containers with unready status: [build helper]"
	ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
	ContainersNotReady: "containers with unready status: [build helper]"
	ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
	ContainersNotReady: "containers with unready status: [build helper]"
	ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
	ContainersNotReady: "containers with unready status: [build helper]"
	ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
	ContainersNotReady: "containers with unready status: [build helper]"
	ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
	ContainersNotReady: "containers with unready status: [build helper]"
	ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
	ContainersNotReady: "containers with unready status: [build helper]"
	ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
	ContainersNotReady: "containers with unready status: [build helper]"
	ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
	ContainersNotReady: "containers with unready status: [build helper]"
	ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
	ContainersNotReady: "containers with unready status: [build helper]"
	ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
	ContainersNotReady: "containers with unready status: [build helper]"
	ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
	ContainersNotReady: "containers with unready status: [build helper]"
	ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
	ContainersNotReady: "containers with unready status: [build helper]"
	ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
	ContainersNotReady: "containers with unready status: [build helper]"
	ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
	ContainersNotReady: "containers with unready status: [build helper]"
	ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
	ContainersNotReady: "containers with unready status: [build helper]"
	ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
	ContainersNotReady: "containers with unready status: [build helper]"
	ContainersNotReady: "containers with unready status: [build helper]"
Running on runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 via gitlab-runner-premium-7575fb5f75-d6l48...
Getting source from Git repository
00:13
Fetching changes with git depth set to 20...
Initialized empty Git repository in /builds/platform/studio/automation/.git/
Created fresh repository.
Checking out 915191cc as detached HEAD (ref is main)...
Skipping Git submodules setup
Executing "step_script" stage of the job script
08:09
$ npm ci
(node:34) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
(Use `node --trace-warnings ...` to show where the warning was created)
(node:34) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
(node:34) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
added 177 packages, and audited 178 packages in 7m
39 packages are looking for funding
  run `npm fund` for details
found 0 vulnerabilities
$ npx cypress run --browser chrome
[STARTED] Task without title.
[FAILED] Cypress verification timed out.
[FAILED] 
[FAILED] This command failed with the following output:
[FAILED] 
[FAILED] /root/.cache/Cypress/13.9.0/Cypress/Cypress --no-sandbox --smoke-test --ping=957
[FAILED] 
[FAILED] ----------
[FAILED] 
[FAILED] [122:0619/134252.807188:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[FAILED] [122:0619/134318.450826:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[FAILED] 
[FAILED] ----------
[FAILED] 
[FAILED] Platform: linux-x64 (Debian - 11.8)
[FAILED] Cypress Version: 13.9.0
Cypress verification timed out.
This command failed with the following output:
/root/.cache/Cypress/13.9.0/Cypress/Cypress --no-sandbox --smoke-test --ping=957
----------
[122:0619/134252.807188:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[122:0619/134318.450826:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
----------
Platform: linux-x64 (Debian - 11.8)
Cypress Version: 13.9.0
Cleaning up project directory and file based variables
00:00
ERROR: Job failed: command terminated with exit code 1

Other

No response

@jennifer-shehane jennifer-shehane added the stage: needs information Not enough info to reproduce the issue label Jul 8, 2024
@Domi1980
Copy link

I am also facing a similar Issue. May I support with some informations to make this Issue reproducible?

@RslnTylr
Copy link
Author

RslnTylr commented Jul 24, 2024

I was able to resolve this issue by increasing memory:

variables:
  KUBERNETES_MEMORY_LIMIT: "4Gi"
  KUBERNETES_MEMORY_REQUEST: "4Gi"

@saritvakrat
Copy link

saritvakrat commented Jan 7, 2025

We also encounter this issue with latest version and 12.7.0. Running from Docker, with electron or chrome. Our tests run on EC2 workers, we run multiple parallel instances at the same time.

Dockerfile: 
# Use the Cypress-included Docker image as the base image
FROM cypress/included:cypress-12.7.0-node-18.14.1-chrome-110.0.5481.96-1-ff-109.0-edge-110.0.1587.41-1

# Create the working directory for Cypress tests
WORKDIR /cypress

Flags:

  const flags = [
    '--proxy-bypass-list=<-loopback>',
    '--disable-dev-shm-usage',
    '--no-sandbox',
    '--disable-setuid-sandbox',
    '--disable-gpu'
  ];

  on('before:browser:launch', (browser, launchOptions) => {
    if (browser.name === 'chrome' || browser.name === 'chromium') {
      flags.forEach((flag) => {
        launchOptions.args.push(flag);
      });

      if (browser.isHeadless) {
        launchOptions.args.push('--headless');
      }
    }

    return launchOptions;
  });

Docker command:
docker run --name cy-container-30-ef133abd-60a7-44f6-96a4-1de41db40256 --rm -u root -e NPM_CONFIG_FETCH_RETRIES=3 -e NPM_CONFIG_FETCH_RETRY_FACTOR=2 -e NPM_CONFIG_FETCH_RETRY_MINTIMEOUT=10000 -e NPM_CONFIG_FETCH_RETRY_MAXTIMEOUT=60000 --entrypoint /bin/bash -v /home/ec2-user/workspace/x/dev/cypress:/cypress -w /cypress -e CYPRESS_CACHE_FOLDER=/cypress/.cache x.x.x/automation/cy-automation:latest -c 'npm ci && npm cache clean --force && npx cypress run --env environment=dev,grepTags="@x"'

Error:

03:59:59  npm WARN using --force Recommended protections disabled.
04:01:14  [STARTED] Task without title.
04:01:46  [FAILED] Cypress verification timed out.
04:01:46  [FAILED] 
04:01:46  [FAILED] This command failed with the following output:
04:01:46  [FAILED] 
04:01:46  [FAILED] /cypress/.cache/12.7.0/Cypress/Cypress --no-sandbox --smoke-test --ping=28
04:01:46  [FAILED] 
04:01:46  [FAILED] ----------
04:01:46  [FAILED] 
04:01:46  [FAILED] Command timed out after 30000 milliseconds: /cypress/.cache/12.7.0/Cypress/Cypress --no-sandbox --smoke-test --ping=28
04:01:46  [FAILED] Timed out
04:01:46  [FAILED] 
04:01:46  [FAILED] ----------
04:01:46  [FAILED] 
04:01:46  [FAILED] Platform: linux-x64 (Debian - 11.7)
04:01:46  [FAILED] Cypress Version: 12.7.0
04:01:46  Cypress verification timed out.
04:01:46  
04:01:46  This command failed with the following output:
04:01:46  
04:01:46  /cypress/.cache/12.7.0/Cypress/Cypress --no-sandbox --smoke-test --ping=28
04:01:46  
04:01:46  ----------
04:01:46  
04:01:46  Command timed out after 30000 milliseconds: /cypress/.cache/12.7.0/Cypress/Cypress --no-sandbox --smoke-test --ping=28
04:01:46  Timed out
04:01:46  
04:01:46  ----------
04:01:46  
04:01:46  Platform: linux-x64 (Debian - 11.7)
04:01:46  Cypress Version: 12.7.0
[Pipeline] error

@sergiubologa
Copy link

seems the same issue as here: #4925
but that one is closed with no resolution

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
stage: needs information Not enough info to reproduce the issue
Projects
None yet
Development

No branches or pull requests

5 participants