Repository navigation
Tunnel termination hanging when using Jenkins with ECS slaves #41
Copy link
Copy link
Open
Description
Activity
Also experiencing this. We run jenkins in a container with two slave containers. We recently built a local jenkins running on an osx machine with one slave container from the same dockerfile to try and reproduce the problem. We can't and we cannot see what is different. Manually killing the process works and the builds complete.
We are having same issue.
More details:
here my config file:[sfursov@qaauto01 webdriverio-browserstack2]$ cat conf/local.conf.js var browserstack = require('browserstack-local'); exports.config = { user: process.env.BROWSERSTACK_USERNAME || 'slavikfursov1', key: process.env.BROWSERSTACK_ACCESS_KEY || '??????', updateJob: true, specs: [ './tests/specs/local_test.js' ], exclude: [], capabilities: [{ browser: 'chrome', name: 'local_test', build: 'webdriver-browserstack', 'browserstack.local': true, 'browserstack.debug': true }], logLevel: 'debug', coloredLogs: true, screenshotPath: './errorShots/', baseUrl: '', waitforTimeout: 10000, connectionRetryTimeout: 90000, connectionRetryCount: 3, host: 'hub.browserstack.com', before: function () { var chai = require('chai'); global.expect = chai.expect; chai.Should(); }, framework: 'mocha', mochaOpts: { ui: 'bdd', timeout: 60000 }, // Code to start browserstack local before start of test onPrepare: function (config, capabilities) { console.log("Connecting local"); return new Promise(function (resolve, reject) { exports.bs_local = new browserstack.Local(); exports.bs_local.start({ 'key': exports.config.key, 'force-proxy':'', 'local-proxy-host':'****', 'local-proxy-port':'8080' }, function (error) { if (error) return reject(error); console.log('Connected. Now testing...'); resolve(); }); }); }, // Code to stop browserstack local after end of test onComplete: function (exitCode, config, capabilities, results) { exports.bs_local.stop(); }, }Tests runs fine 1st time,
But on 2nd run, I'm getting:/home/sfursov/webdriverio-browserstack2/node_modules/@wdio/cli/build/run.js:94 throw e; ^ LocalError: Either another browserstack local client is running on your machine or some server is listening on port 45691 at /home/sfursov/webdriverio-browserstack2/node_modules/browserstack-local/lib/Local.js:58:20 at ChildProcess.exithandler (child_process.js:285:7) at ChildProcess.emit (events.js:189:13) at ChildProcess.EventEmitter.emit (domain.js:441:20) at maybeClose (internal/child_process.js:970:16) at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)I found it caused by hanging processes:
[sfursov@qaauto01 webdriverio-browserstack2]$ sudo ps aux | grep rowser sfursov 26407 3.3 0.2 1215364 57372 ? Ssl 16:56 0:00 /home/sfursov/.browserstack/BrowserStackLocal --daemon start --log-file /home/sfursov/webdriverio-browserstack2/local.log --key **** --force-proxy --local-proxy-host **** --local-proxy-port 8080 -daemonInstance sfursov 26428 3.5 0.2 1214620 57160 ? Sl 16:56 0:00 /home/sfursov/.browserstack/BrowserStackLocal --log-file /home/sfursov/webdriverio-browserstack2/local.log --key **** --force-proxy --local-proxy-host **** --local-proxy-port 8080 -daemonInstance --local-identifier browserstack-fork-0 sfursov 26433 4.9 0.2 1214724 57924 ? Sl 16:56 0:00 /home/sfursov/.browserstack/BrowserStackLocal --log-file /home/sfursov/webdriverio-browserstack2/local.log --key **** --force-proxy --local-proxy-host **** --local-proxy-port 8080 -daemonInstance --local-identifier browserstack-fork-1 sfursov 26438 4.7 0.1 1214616 55256 ? Sl 16:56 0:00 /home/sfursov/.browserstack/BrowserStackLocal --log-file /home/sfursov/webdriverio-browserstack2/local.log --key **** --force-proxy --local-proxy-host **** --local-proxy-port 8080 -daemonInstance --local-identifier browserstack-fork-2 sfursov 26444 3.8 0.1 1214488 55392 ? Sl 16:56 0:00 /home/sfursov/.browserstack/BrowserStackLocal --log-file /home/sfursov/webdriverio-browserstack2/local.log --key **** --force-proxy --local-proxy-host **** --local-proxy-port 8080 -daemonInstance --local-identifier browserstack-fork-3 sfursov 26449 3.5 0.1 1214624 55628 ? Sl 16:56 0:00 /home/sfursov/.browserstack/BrowserStackLocal --log-file /home/sfursov/webdriverio-browserstack2/local.log --key **** --force-proxy --local-proxy-host **** --local-proxy-port 8080 -daemonInstance --local-identifier browserstack-fork-4If I kill them - tests will run again
Metadata
Metadata
Assignees
Labels
No labels
See process output below:
Elastic Container Service](https://aws.amazon.com/ecs/) runs Docker containers leading me to think could be related to #25.
By default Jenkins uses
set -xeper the docs . Is this enough to satisfy the intent of the workaround in #25?Please let me know what further info I can provide to assist in debugging.