Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

'xvfb-run: error: Xvfb failed to start' when using host network #73

Closed
gilleta opened this issue Aug 5, 2019 · 2 comments
Closed

'xvfb-run: error: Xvfb failed to start' when using host network #73

gilleta opened this issue Aug 5, 2019 · 2 comments
Labels

Comments

@gilleta
Copy link

gilleta commented Aug 5, 2019

Hi,

I am trying to update my katalonstudio/katalon tests from 5.7.1 to 6.2.2 (edit: looks like 6.2.2 has been deleted from pre-releases, same issue with 6.X.X).

My web app runs on host port 9003, so with 5.7.1 I just used to run docker run --network="host" ... so that https://localhost:9003 could be reached from inside docker.

However, with 6.2.2, using --network="host" ... returns an Xvfb failed to start. Any idea how I could work around this (or maybe there is a better way than using host's network) ?
I tried to re-map 9003 port -p 9008:9003 and add --add-host=<my interface ip> but then my tests fail with this line appearing in the logs:
[SEVERE]: bind() failed: Cannot assign requested address (99)

Thanks for your help,
Alex


Steps to reproduce:
docker run --network="host" -v "`pwd`/myapp-katalon":/katalon/katalon/source:ro -v "`pwd`/katalon-reports":/katalon/katalon/report --rm katalonstudio/katalon:6.2.2 katalon-execute.sh
I ve removed everything that didn't look relevant to me to reproduve but here is the full command I usually use to run my tests:
docker run --network="host" -v /dev/shm:/dev/shm -v "`pwd`/myapp-katalon":/katalon/katalon/source:ro -v "`pwd`/katalon-reports":/katalon/katalon/report --rm katalonstudio/katalon:6.2.2 katalon-execute.sh -browserType="Chrome" -testSuitePath="Test Suites/myapp Test Suite" -executionProfile="localhost" --config -webui.autoUpdateDrivers=true;

Error:

Starting Katalon Studio
Google Chrome 75.0.3770.100
Mozilla Firefox 67.0.4
Katalon Studio 6.2.2
+ echo 'Starting Katalon Studio'
+ cat /katalon/version
++ pwd
+ current_dir=/
+ workspace_dir=/tmp/katalon_execute/workspace
+ mkdir -p /tmp/katalon_execute/workspace
+ chmod -R 777 /tmp/katalon_execute/workspace
+ source_dir=/katalon/katalon/source
+ '[' -d /katalon/katalon/source ']'
+ project_dir=/tmp/katalon_execute/project
+ mkdir -p /tmp/katalon_execute/project
+ cp -r /katalon/katalon/source/myapp-katalon.prj '/katalon/katalon/source/Data Files' /katalon/katalon/source/Include /katalon/katalon/source/Keywords /katalon/katalon/source/Libs '/katalon/katalon/source/Object Repository' /katalon/katalon/source/Profiles /katalon/katalon/source/README.md /katalon/katalon/source/Reports /katalon/katalon/source/Scripts '/katalon/katalon/source/Test Cases' '/katalon/katalon/source/Test Suites' /katalon/katalon/source/bin /katalon/katalon/source/semaphoreDocker.sh /katalon/katalon/source/settings /tmp/katalon_execute/project
++ find /tmp/katalon_execute/project -name '*.prj'
+ project_prj_file=/tmp/katalon_execute/project/myapp-katalon.prj
+ cd /tmp/katalon_execute/project
+ '[' -f /tmp/katalon_execute/project/build.gradle ']'
+ cd /
+ touch /tmp/katalon_execute/project/.classpath
+ chmod -R 777 /tmp/katalon_execute/project
+ rm -rf /tmp/katalon_execute/project/bin
+ rm -rf /tmp/katalon_execute/project/Libs
+ ls -la /tmp/katalon_execute/project
total 60
drwxrwxrwx 12 root root 4096 Aug  5 09:51 .
drwxr-xr-x  4 root root 4096 Aug  5 09:51 ..
-rwxrwxrwx  1 root root    0 Aug  5 09:51 .classpath
-rwxrwxrwx  1 root root  915 Aug  5 09:51 myapp-katalon.prj
drwxrwxrwx  2 root root 4096 Aug  5 09:51 Data Files
drwxrwxrwx  3 root root 4096 Aug  5 09:51 Include
drwxrwxrwx  3 root root 4096 Aug  5 09:51 Keywords
drwxrwxrwx  4 root root 4096 Aug  5 09:51 Object Repository
drwxrwxrwx  2 root root 4096 Aug  5 09:51 Profiles
-rwxrwxrwx  1 root root 2622 Aug  5 09:51 README.md
drwxrwxrwx  3 root root 4096 Aug  5 09:51 Reports
drwxrwxrwx  5 root root 4096 Aug  5 09:51 Scripts
drwxrwxrwx  5 root root 4096 Aug  5 09:51 Test Cases
drwxrwxrwx  2 root root 4096 Aug  5 09:51 Test Suites
-rwxrwxrwx  1 root root 1869 Aug  5 09:51 semaphoreDocker.sh
drwxrwxrwx  3 root root 4096 Aug  5 09:51 settings
+ report_dir=/katalon/katalon/report
+ '[' -d /katalon/katalon/report ']'
+ mkdir -p /katalon/katalon/report
+ args=("$KATALON_KATALON_INSTALL_DIR/katalon" "$@")
+ args+=("-runMode=console")
+ args+=("-reportFolder=$report_dir")
+ args+=("-projectPath=$project_prj_file")
+ cd /tmp/katalon_execute/workspace
+ xvfb-run -s '-screen 0 1024x768x24' /opt/katalonstudio/katalon -runMode=console -reportFolder=/katalon/katalon/report -projectPath=/tmp/katalon_execute/project/myapp-katalon.prj
xvfb-run: error: Xvfb failed to start
+ ret_code=1
++ id -u
++ id -g
+ chown -R 0:0 /katalon/katalon/report
+ chmod -R 777 /katalon/katalon/report
@gilleta
Copy link
Author

gilleta commented Aug 6, 2019

Still stuck with this, any idea @devalex88 ?
Best,
Alex

@devalex88
Copy link
Contributor

Please try using port forwarding instead of host configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants