Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

767
Vistas
problem in spawning Xvfb, server already running

I'm trying to run 2 cypress docker container in parallel using node js spawn

docker run -v path/to/ws:/e2e -w /e2e --network host cypress/included:8.0.0 --spec 'cypress/integration/cytorus-cache/1.feature'

docker run -v path/to/ws:/e2e -w /e2e --network host cypress/included:8.0.0 --spec 'cypress/integration/cytorus-cache/2.feature'

It fails with following error;

Xvfb exited with a non zero exit code.

There was a problem spawning Xvfb.

This is likely a problem with your system, permissions, or installation of Xvfb.

----------

Error: _XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed

_XSERVTransMakeAllCOTSServerListeners: server already running
(EE)
Fatal server error:
(EE) Cannot establish any listening sockets - Make sure an X server isn't already running(EE)

So basically, if I run 4 parallel processes, 1 of them connects to X11 server and 3 gets error.

How it can be handlled? I've already tried setting unset DISPLAY as Cypress runs in headless mode by default. But it didn't help.

over 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

I encountered the same issue when running cypress tests in parallel. The fix for me is to remove --network host from your command to avoid port conflicts. You may need to find another approach to access the services on your host.

For instance, you can use 172.17.0.1 to access the host on Docker for Linux.

over 4 years ago · Santiago Trujillo Denunciar

0

As per cypress docker documentation,

When running on Linux, Cypress needs an X11 server; otherwise it spawns its own X11 server during the test run. When running several Cypress instances in parallel, the spawning of multiple X11 servers at once can cause problems for some of them. In this case, you can separately start a single X11 server and pass the server's address to each Cypress instance using DISPLAY variable.

Since the X11 server was already running on the server, I just spawned Xvfb :99 &, then set the address export DISPLAY=:99. And passed the DISPLAY environment variable to the docker cypress container.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda