Hi!
I am getting error Error: EADDRINUSE connect EADDRINUSE 127.0.0.1:60267 every time when I am running my UI tests in parallel.
Below are more details about conf.js and errorlog.
Operating System and Version : Win server 2008 R2
Your protractor configuration file
// babel-register allows for ES6 in Protractor test scripts
require('babel-register');
exports.config = {
directConnect: true,
chromeDriver: './4_utilsObjects/chromedriver_2.29.exe',
allScriptsTimeout: 180000,
framework: 'jasmine',
specs: ['launcher1.js','launcher2.js'],
rootElement: '[ng-app="preApp"]',
capabilities: {
'browserName': 'chrome',
'chromeOptions': {
// needed to disable saving passwords in account creation tests
'prefs': {
'credentials_enable_service': false,
'profile': {
'password_manager_enabled': false
}
}
},
shardTestFiles: true,
maxInstances: 2,
},
// Jasmine timeout is defined here overriding default Protractor timeout
jasmineNodeOpts: {
silent: true,
defaultTimeoutInterval: 180000,
// needed for jasmine-spec-reporter
print: function () {
}
},
onPrepare: () => {
// here we're adding real time jasmine reporter that will display test steps
// see https://github.com/bcaudan/jasmine-spec-reporter
var SpecReporter = require('jasmine-spec-reporter');
// add jasmine spec reporter
jasmine.getEnv().addReporter(new SpecReporter({
displayStacktrace: 'none',
displaySuccessfulSpec: true,
displayFailedSpec: true,
displaySpecDuration: true,
displaySuiteNumber: true,
displayPendingSummary: false,
displayPendingSpec: false
}))
// adding Jasmine JUnit reporter
var jasmineReporters = require('jasmine-reporters');
jasmine.getEnv().addReporter(new jasmineReporters.JUnitXmlReporter({
consolidateAll: true,
savePath: 'reports/JUnitReporter',
filePrefix: 'testresults'
}))
// reporter for TeamCity, enabled only in CI
if (process.env.TEAMCITY_VERSION)
{
jasmine.getEnv().addReporter(new jasmineReporters.TeamCityReporter());
}
// Disable animations so e2e tests run faster
var disableNgAnimate = function () {
angular.module('disableNgAnimate', []).run(['$animate',function ($animate) {
$animate.enabled(false);
}]);
}
browser.addMockModule('disableNgAnimate', disableNgAnimate);
// reporter taking screenshots when failed assertion is spotted, comment out to speed up test run
var Jasmine2HtmlReporter = require('protractor-jasmine2-html-reporter');
jasmine.getEnv().addReporter(new Jasmine2HtmlReporter({
savePath: 'reports/screenshotReporter/',
takeScreenshotsOnlyOnFailures: true,
}))
}
};
Are you sure the port is not already used? See also https://stackoverflow.com/questions/4075287/node-express-eaddrinuse-address-already-in-use-kill-server
By the way, you are using an old version of Protractor and an old version of NodeJS, have you also tried updating?
See #4091
Read the Oracle advise (click here)
Adjusting TCP Settings for Heavy Load on Windows
The underlying Search architecture that directs searches across multiple physical partitions uses TCP/IP ports and non-blocking NIO SocketChannels to connect to the Search engines. These connections remain open in the TIME_WAIT state until the operating system times them out. Consequently, under heavy load conditions, the available ports on the machine running the Routing module can be exhausted.
On Windows platforms, the default timeout is 120 seconds, and the maximum number of ports is approximately 4,000, resulting in a maximum rate of 33 connections per second. If your index has four partitions, each search requires four ports, which provides a maximum query rate of 8.3 queries per second.
(maximum ports/timeout period)/number of partitions = maximum query rate.
If this rate is exceeded, you may see failures as the supply of TCP/IP ports is exhausted. Symptoms include drops in throughput and errors indicating failed network connections. You can diagnose this problem by observing the system while it is under load, using the netstat utility provided on most operating systems.
To avoid port exhaustion and support high connection rates, reduce the TIME_WAIT value and increase the port range.
Note: This problem does not usually appear on UNIX systems due to the higher default connection rate in those operating systems.
To set TcpTimedWaitDelay (TIME_WAIT):
Use the regedit command to access the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\ Services\TCPIP\Parameters registry subkey.
Create a new REG_DWORD value named TcpTimedWaitDelay.
Set the value to 60.
Stop and restart the system.
To set MaxUserPort (ephemeral port range):
Use the regedit command to access the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\ Services\TCPIP\Parameters registry subkey.
Create a new REG_DWORD value named MaxUserPort.
Set this value to 32768.
Stop and restart the system.
Read the Oracle advise (click here)
Adjusting TCP Settings for Heavy Load on Windows
The underlying Search architecture that directs searches across multiple physical partitions uses TCP/IP ports and non-blocking NIO SocketChannels to connect to the Search engines. These connections remain open in the TIME_WAIT state until the operating system times them out. Consequently, under heavy load conditions, the available ports on the machine running the Routing module can be exhausted.
On Windows platforms, the default timeout is 120 seconds, and the maximum number of ports is approximately 4,000, resulting in a maximum rate of 33 connections per second. If your index has four partitions, each search requires four ports, which provides a maximum query rate of 8.3 queries per second.
(maximum ports/timeout period)/number of partitions = maximum query rate.If this rate is exceeded, you may see failures as the supply of TCP/IP ports is exhausted. Symptoms include drops in throughput and errors indicating failed network connections. You can diagnose this problem by observing the system while it is under load, using the netstat utility provided on most operating systems.
To avoid port exhaustion and support high connection rates, reduce the TIME_WAIT value and increase the port range.
Note: This problem does not usually appear on UNIX systems due to the higher default connection rate in those operating systems.
To set TcpTimedWaitDelay (TIME_WAIT):
Use the regedit command to access the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\ Services\TCPIP\Parameters registry subkey.
Create a new REG_DWORD value named TcpTimedWaitDelay.
Set the value to 60.
Stop and restart the system.
To set MaxUserPort (ephemeral port range):
Use the regedit command to access the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\ Services\TCPIP\Parameters registry subkey.
Create a new REG_DWORD value named MaxUserPort.
Set this value to 32768.
Stop and restart the system.
with me it didn't work
Most helpful comment
Read the Oracle advise (click here)
The underlying Search architecture that directs searches across multiple physical partitions uses TCP/IP ports and non-blocking NIO SocketChannels to connect to the Search engines. These connections remain open in the TIME_WAIT state until the operating system times them out. Consequently, under heavy load conditions, the available ports on the machine running the Routing module can be exhausted.
On Windows platforms, the default timeout is 120 seconds, and the maximum number of ports is approximately 4,000, resulting in a maximum rate of 33 connections per second. If your index has four partitions, each search requires four ports, which provides a maximum query rate of 8.3 queries per second.
(maximum ports/timeout period)/number of partitions = maximum query rate.
If this rate is exceeded, you may see failures as the supply of TCP/IP ports is exhausted. Symptoms include drops in throughput and errors indicating failed network connections. You can diagnose this problem by observing the system while it is under load, using the netstat utility provided on most operating systems.
To avoid port exhaustion and support high connection rates, reduce the TIME_WAIT value and increase the port range.
Note: This problem does not usually appear on UNIX systems due to the higher default connection rate in those operating systems.
To set TcpTimedWaitDelay (TIME_WAIT):
Use the regedit command to access the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\ Services\TCPIP\Parameters registry subkey.
Create a new REG_DWORD value named TcpTimedWaitDelay.
Set the value to 60.
Stop and restart the system.
To set MaxUserPort (ephemeral port range):
Use the regedit command to access the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\ Services\TCPIP\Parameters registry subkey.
Create a new REG_DWORD value named MaxUserPort.
Set this value to 32768.
Stop and restart the system.