web-component-tester cannot bind to port












0















I have a docker setup with following containers:




  1. selenium-hub

  2. selenium-firefox

  3. selenium-chrome

  4. spring boot app

  5. node/java service for wct tests


All these containers are defined via docker-compose.
The node/java service is created as follows (extract from docker-compose):



  wct:
build:
context: ./app/src/main/webapp
args:
ARTIFACTORY: ${DOCKER_REGISTRY}
image: wct
container_name: wct
depends_on:
- selenium-hub
- selenium-chrome
- selenium-firefox
- webapp


The wct tests are run using:



docker-compose run -d --name wct-run wct npm run test


And the wct.conf.js looks like following:






const seleniumGridAddress = process.env.bamboo_selenium_grid_address || 'http://selenium-hub:4444/wd/hub';
const hostname = process.env.FQDN || 'wct';

module.exports = {
activeBrowsers: [{
browserName: "chrome",
url: seleniumGridAddress
}, {
browserName: "firefox",
url: seleniumGridAddress
}],
webserver: {
hostname: hostname
},
plugins: {
local: false,
sauce: false,
}
}





The testrun fails with this stacktrace:



ERROR: Server failed to start: Error: No available ports. Ports tried: [8081,8000,8001,8003,8031,2000,2001,2020,2109,2222,2310,3000,3001,3030,3210,3333,4000,4001,4040,4321,4502,4503,4567,5000,5001,5050,5432,6000,6001,6060,6666,6543,7000,7070,7774,7777,8765,8777,8888,9000,9001,9080,9090,9876,9877,9999,49221,55001]
at /app/node_modules/polymer-cli/node_modules/polyserve/lib/start_server.js:384:15
at Generator.next (<anonymous>)
at fulfilled (/app/node_modules/polymer-cli/node_modules/polyserve/lib/start_server.js:17:58)


I tried to fix it as per: polyserve cannot serve the app but without success.
I also tried setting hostnameto wct as this is the known hostname for the container inside the docker network, but it shows the same error.



I really do not know what to do next.
Any help is appreciated.










share|improve this question























  • It seems you already have "containers" running. Did you stop them? make sure if any containers running and listening on same ports. docker container ls.

    – kosa
    Jan 2 at 16:21











  • I double checked and all containers are stopped before I perform the docker-compose runcommand.

    – Homewrecker
    Jan 2 at 16:58











  • If that is the case, check who is consuming "host ports". It seems some one already consuming the host ports.

    – kosa
    Jan 2 at 17:12













  • I do not think it is plausible that +20 ports are occupied inside a container. I think it is more a permissions issue or something.

    – Homewrecker
    Jan 2 at 17:19
















0















I have a docker setup with following containers:




  1. selenium-hub

  2. selenium-firefox

  3. selenium-chrome

  4. spring boot app

  5. node/java service for wct tests


All these containers are defined via docker-compose.
The node/java service is created as follows (extract from docker-compose):



  wct:
build:
context: ./app/src/main/webapp
args:
ARTIFACTORY: ${DOCKER_REGISTRY}
image: wct
container_name: wct
depends_on:
- selenium-hub
- selenium-chrome
- selenium-firefox
- webapp


The wct tests are run using:



docker-compose run -d --name wct-run wct npm run test


And the wct.conf.js looks like following:






const seleniumGridAddress = process.env.bamboo_selenium_grid_address || 'http://selenium-hub:4444/wd/hub';
const hostname = process.env.FQDN || 'wct';

module.exports = {
activeBrowsers: [{
browserName: "chrome",
url: seleniumGridAddress
}, {
browserName: "firefox",
url: seleniumGridAddress
}],
webserver: {
hostname: hostname
},
plugins: {
local: false,
sauce: false,
}
}





The testrun fails with this stacktrace:



ERROR: Server failed to start: Error: No available ports. Ports tried: [8081,8000,8001,8003,8031,2000,2001,2020,2109,2222,2310,3000,3001,3030,3210,3333,4000,4001,4040,4321,4502,4503,4567,5000,5001,5050,5432,6000,6001,6060,6666,6543,7000,7070,7774,7777,8765,8777,8888,9000,9001,9080,9090,9876,9877,9999,49221,55001]
at /app/node_modules/polymer-cli/node_modules/polyserve/lib/start_server.js:384:15
at Generator.next (<anonymous>)
at fulfilled (/app/node_modules/polymer-cli/node_modules/polyserve/lib/start_server.js:17:58)


I tried to fix it as per: polyserve cannot serve the app but without success.
I also tried setting hostnameto wct as this is the known hostname for the container inside the docker network, but it shows the same error.



I really do not know what to do next.
Any help is appreciated.










share|improve this question























  • It seems you already have "containers" running. Did you stop them? make sure if any containers running and listening on same ports. docker container ls.

    – kosa
    Jan 2 at 16:21











  • I double checked and all containers are stopped before I perform the docker-compose runcommand.

    – Homewrecker
    Jan 2 at 16:58











  • If that is the case, check who is consuming "host ports". It seems some one already consuming the host ports.

    – kosa
    Jan 2 at 17:12













  • I do not think it is plausible that +20 ports are occupied inside a container. I think it is more a permissions issue or something.

    – Homewrecker
    Jan 2 at 17:19














0












0








0








I have a docker setup with following containers:




  1. selenium-hub

  2. selenium-firefox

  3. selenium-chrome

  4. spring boot app

  5. node/java service for wct tests


All these containers are defined via docker-compose.
The node/java service is created as follows (extract from docker-compose):



  wct:
build:
context: ./app/src/main/webapp
args:
ARTIFACTORY: ${DOCKER_REGISTRY}
image: wct
container_name: wct
depends_on:
- selenium-hub
- selenium-chrome
- selenium-firefox
- webapp


The wct tests are run using:



docker-compose run -d --name wct-run wct npm run test


And the wct.conf.js looks like following:






const seleniumGridAddress = process.env.bamboo_selenium_grid_address || 'http://selenium-hub:4444/wd/hub';
const hostname = process.env.FQDN || 'wct';

module.exports = {
activeBrowsers: [{
browserName: "chrome",
url: seleniumGridAddress
}, {
browserName: "firefox",
url: seleniumGridAddress
}],
webserver: {
hostname: hostname
},
plugins: {
local: false,
sauce: false,
}
}





The testrun fails with this stacktrace:



ERROR: Server failed to start: Error: No available ports. Ports tried: [8081,8000,8001,8003,8031,2000,2001,2020,2109,2222,2310,3000,3001,3030,3210,3333,4000,4001,4040,4321,4502,4503,4567,5000,5001,5050,5432,6000,6001,6060,6666,6543,7000,7070,7774,7777,8765,8777,8888,9000,9001,9080,9090,9876,9877,9999,49221,55001]
at /app/node_modules/polymer-cli/node_modules/polyserve/lib/start_server.js:384:15
at Generator.next (<anonymous>)
at fulfilled (/app/node_modules/polymer-cli/node_modules/polyserve/lib/start_server.js:17:58)


I tried to fix it as per: polyserve cannot serve the app but without success.
I also tried setting hostnameto wct as this is the known hostname for the container inside the docker network, but it shows the same error.



I really do not know what to do next.
Any help is appreciated.










share|improve this question














I have a docker setup with following containers:




  1. selenium-hub

  2. selenium-firefox

  3. selenium-chrome

  4. spring boot app

  5. node/java service for wct tests


All these containers are defined via docker-compose.
The node/java service is created as follows (extract from docker-compose):



  wct:
build:
context: ./app/src/main/webapp
args:
ARTIFACTORY: ${DOCKER_REGISTRY}
image: wct
container_name: wct
depends_on:
- selenium-hub
- selenium-chrome
- selenium-firefox
- webapp


The wct tests are run using:



docker-compose run -d --name wct-run wct npm run test


And the wct.conf.js looks like following:






const seleniumGridAddress = process.env.bamboo_selenium_grid_address || 'http://selenium-hub:4444/wd/hub';
const hostname = process.env.FQDN || 'wct';

module.exports = {
activeBrowsers: [{
browserName: "chrome",
url: seleniumGridAddress
}, {
browserName: "firefox",
url: seleniumGridAddress
}],
webserver: {
hostname: hostname
},
plugins: {
local: false,
sauce: false,
}
}





The testrun fails with this stacktrace:



ERROR: Server failed to start: Error: No available ports. Ports tried: [8081,8000,8001,8003,8031,2000,2001,2020,2109,2222,2310,3000,3001,3030,3210,3333,4000,4001,4040,4321,4502,4503,4567,5000,5001,5050,5432,6000,6001,6060,6666,6543,7000,7070,7774,7777,8765,8777,8888,9000,9001,9080,9090,9876,9877,9999,49221,55001]
at /app/node_modules/polymer-cli/node_modules/polyserve/lib/start_server.js:384:15
at Generator.next (<anonymous>)
at fulfilled (/app/node_modules/polymer-cli/node_modules/polyserve/lib/start_server.js:17:58)


I tried to fix it as per: polyserve cannot serve the app but without success.
I also tried setting hostnameto wct as this is the known hostname for the container inside the docker network, but it shows the same error.



I really do not know what to do next.
Any help is appreciated.






const seleniumGridAddress = process.env.bamboo_selenium_grid_address || 'http://selenium-hub:4444/wd/hub';
const hostname = process.env.FQDN || 'wct';

module.exports = {
activeBrowsers: [{
browserName: "chrome",
url: seleniumGridAddress
}, {
browserName: "firefox",
url: seleniumGridAddress
}],
webserver: {
hostname: hostname
},
plugins: {
local: false,
sauce: false,
}
}





const seleniumGridAddress = process.env.bamboo_selenium_grid_address || 'http://selenium-hub:4444/wd/hub';
const hostname = process.env.FQDN || 'wct';

module.exports = {
activeBrowsers: [{
browserName: "chrome",
url: seleniumGridAddress
}, {
browserName: "firefox",
url: seleniumGridAddress
}],
webserver: {
hostname: hostname
},
plugins: {
local: false,
sauce: false,
}
}






docker polymer wct






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jan 2 at 16:17









HomewreckerHomewrecker

493619




493619













  • It seems you already have "containers" running. Did you stop them? make sure if any containers running and listening on same ports. docker container ls.

    – kosa
    Jan 2 at 16:21











  • I double checked and all containers are stopped before I perform the docker-compose runcommand.

    – Homewrecker
    Jan 2 at 16:58











  • If that is the case, check who is consuming "host ports". It seems some one already consuming the host ports.

    – kosa
    Jan 2 at 17:12













  • I do not think it is plausible that +20 ports are occupied inside a container. I think it is more a permissions issue or something.

    – Homewrecker
    Jan 2 at 17:19



















  • It seems you already have "containers" running. Did you stop them? make sure if any containers running and listening on same ports. docker container ls.

    – kosa
    Jan 2 at 16:21











  • I double checked and all containers are stopped before I perform the docker-compose runcommand.

    – Homewrecker
    Jan 2 at 16:58











  • If that is the case, check who is consuming "host ports". It seems some one already consuming the host ports.

    – kosa
    Jan 2 at 17:12













  • I do not think it is plausible that +20 ports are occupied inside a container. I think it is more a permissions issue or something.

    – Homewrecker
    Jan 2 at 17:19

















It seems you already have "containers" running. Did you stop them? make sure if any containers running and listening on same ports. docker container ls.

– kosa
Jan 2 at 16:21





It seems you already have "containers" running. Did you stop them? make sure if any containers running and listening on same ports. docker container ls.

– kosa
Jan 2 at 16:21













I double checked and all containers are stopped before I perform the docker-compose runcommand.

– Homewrecker
Jan 2 at 16:58





I double checked and all containers are stopped before I perform the docker-compose runcommand.

– Homewrecker
Jan 2 at 16:58













If that is the case, check who is consuming "host ports". It seems some one already consuming the host ports.

– kosa
Jan 2 at 17:12







If that is the case, check who is consuming "host ports". It seems some one already consuming the host ports.

– kosa
Jan 2 at 17:12















I do not think it is plausible that +20 ports are occupied inside a container. I think it is more a permissions issue or something.

– Homewrecker
Jan 2 at 17:19





I do not think it is plausible that +20 ports are occupied inside a container. I think it is more a permissions issue or something.

– Homewrecker
Jan 2 at 17:19












0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54009676%2fweb-component-tester-cannot-bind-to-port%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54009676%2fweb-component-tester-cannot-bind-to-port%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

android studio warns about leanback feature tag usage required on manifest while using Unity exported app?

SQL update select statement

WPF add header to Image with URL pettitions [duplicate]