Xvfb failed to start


Has anyone been facing this issue with docker.

atalon | Mozilla Firefox 81.0
katalon | Katalon Studio
katalon | + args=("$KATALON_KATALON_INSTALL_DIR/katalonc" “$@”)
katalon | + xvfb-run -s ‘-screen 0 1024x768x24’ /opt/katalonstudio/katalonc -retry=0 '-testSuitePath=Test Suites/Generic_Test_Cases/Axxx -executionProfile=xxx -browserType=Chrome -apiKey=xxx -projectPath=/katalon/katalon/source/xxx.prj --config -webui.autoUpdateDrivers=true
katalon | xvfb-run: error: Xvfb failed to start
katalon | + ret_code=1
katalon | + exit 1
katalon exited with code 1

xvfb failes to start and the tests exits with code 1

Any idea why this happens. I have checked, cannot find anyone with this issue in 2020 but this happens a lot when i do docker-compose up to run the tests in docker.

hi. can you share your compose file so we can have a better look?
also, what docker version it is installed on the runner/agent?

Hi @bionel,

My docker compose file has:
version: “2”
build: .
container_name: katalon
- xxx_network
base_URL: “www.google.com” – I have added this as an example.
- .:/katalon/katalon/source

entrypoint: katalonc.sh

command: bash -c 'apt-get install tree -y && rm /katalon/katalon/source/Include/drivers/chromedriver_linux64/chromedriver || true && mkdir -p /katalon/katalon/source/Include/drivers/chromedriver_linux64/ && unzip /tmp/chromedriver/chromedriver.zip chromedriver -d /katalon/katalon/source/Include/drivers/chromedriver_linux64/  && tree -L 3 /katalon/katalon/source/Include/ && katalonc.sh -retry=0 -testSuitePath="Test Suites/Generic_Test_Cases/xxx" -executionProfile="xxx" -browserType="Chrome" -apiKey="xxx" -projectPath="/katalon/katalon/source/xxx.prj" --config -webui.autoUpdateDrivers=true'

external: true

Its docker version 2

from: https://docs.docker.com/compose/compose-file/#entrypoint

Setting entrypoint both overrides any default entrypoint set on the service’s image with the ENTRYPOINT Dockerfile instruction, and clears out any default command on the image - meaning that if there’s a CMD instruction in the Dockerfile, it is ignored

so, your command seems like is ignored, therefore the chromedriver is not updated and so on
try to remove the entrypoint line.

Its docker version 2

no, it is not, that is docker compose api version. try to run docker --version on the target machine

see here the corresponding docker engine for each compose api version:

Hi @bionel,

The Docker version is 19.03.6.
so i need to change the version to “3” and remove this?

In theory should be backward compatible, but yeah, updating to a more recent api version may unlock new features for you and will ensure the file content is properly parsed.

you have to remove the entrypoint: katalonc.sh line from the compose file (that one which shows in bold here), since you are executing a custom line via the command: apt blah blah line