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.
--network host
causing the issue. As the host machine is AWS EC2 instance, I don't know the machine address while shooting the tests. Moreover, application can be accessed with some host name likelocalhost.example.com
due to certificates registered against*.example.com
– Feudatory