E/launcher - Process exited with error code 135 - node.js

I am trying to run the protractor test from my windows machine.
Configuration Used:
OS : Windows 7
Node : 6.11.3
Protractor : 5.1.2
NPM : 3.10.10
I am unable to run the Protractor test because of the below error.
C:\Users\Admin>protractor conf.js [14:45:16] I/launcher - Running 1 instances of WebDriver [14:45:16] I/hosted - Using the selenium server at http://localhost:4444/wd/hub [14:45:18] E/launcher - Error code: 135 [14:45:18] E/launcher - Error message: ECONNREFUSED connect ECONNREFUSED 127.0.0 .1:4444 [14:45:18] E/launcher - Error: ECONNREFUSED connect ECONNREFUSED 127.0.0.1:4444
at ClientRequest.<anonymous> (C:\Users\Admin\AppData\Roaming\npm\node_module s\protractor\node_modules\selenium-webdriver\http\index.js:238:15)
at emitOne (events.js:96:13)
at ClientRequest.emit (events.js:188:7)
at Socket.socketErrorListener (_http_client.js:310:9)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at emitErrorNT (net.js:1277:8)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickCallback (internal/process/next_tick.js:104:9) From: Task: WebDriver.createSession()
at Function.createSession (C:\Users\Admin\AppData\Roaming\npm\node_modules\p rotractor\node_modules\selenium-webdriver\lib\webdriver.js:777:24)
at Function.createSession (C:\Users\Admin\AppData\Roaming\npm\node_modules\p rotractor\node_modules\selenium-webdriver\chrome.js:709:29)
at createDriver (C:\Users\Admin\AppData\Roaming\npm\node_modules\protractor\ node_modules\selenium-webdriver\index.js:167:33)
at Builder.build (C:\Users\Admin\AppData\Roaming\npm\node_modules\protractor \node_modules\selenium-webdriver\index.js:623:16)
at Hosted.getNewDriver (C:\Users\Admin\AppData\Roaming\npm\node_modules\prot ractor\lib\driverProviders\driverProvider.ts:60:29)
at Runner.createBrowser (C:\Users\Admin\AppData\Roaming\npm\node_modules\pro tractor\lib\runner.ts:225:39)
at q.then.then (C:\Users\Admin\AppData\Roaming\npm\node_modules\protractor\l ib\runner.ts:391:27)
at _fulfilled (C:\Users\Admin\AppData\Roaming\npm\node_modules\protractor\no de_modules\q\q.js:834:54)
at self.promiseDispatch.done (C:\Users\Admin\AppData\Roaming\npm\node_module s\protractor\node_modules\q\q.js:863:30)
at Promise.promise.promiseDispatch (C:\Users\Admin\AppData\Roaming\npm\node_ modules\protractor\node_modules\q\q.js:796:13) [14:45:18]
***E/launcher - Process exited with error code 135***
I keep receiving the error "E/launcher - Process exited with error code 135" noted in the stack-trace above. How can I get the protractor test to complete successfully?

Try doing below steps:-
Open cmd and in the home path use below commands.
webdriver-manager clean
webdriver-manager status
webdriver-manager update
webdriver-manager start.

It looks like You can't connect to the selenium server. Comment this :
seleniumAddress: 'http://localhost:4444/wd/hub'
and replace it with:
directConnect: true,
just to check if is working directly.
Also You can navigate directly to http://localhost:4444/wd/hub to see If you can access there. If not it might be some firewall or something similar.

First, open a command prompt and then
run the following command:
webdriver-manager start
Open a second command prompt then enter your command. Mine is protractor conf.js

Probably a bit late but I get this error when I fail to start server for web-driver using:
webdriver-manager start

Update the chrome driver using the command =>
webdriver-manager update --versions.chrome <73.0.3683.68>
after upgrading just install node modules once again using cmd => npm install

Related

MongoDB error while installing Rocket.chat in CentOS 8 server with Apache

I am following this tutorial to install a Rocket.chat server in CentOS:
https://hostpresto.com/community/tutorials/how-to-install-rocket-chat-server-on-centos-7/
I am new to mongodb and node.js so I am not very familiar with how all this works
At the moment I am looking for something simple that just works
When I reach the step where it says to execute
node main.js
I get the following error:
[username#localhost Rocket.chat]$ node main.js
/opt/Rocket.chat/programs/server/node_modules/fibers/future.js:313
throw(ex);
^
MongoError: not master and slaveOk=false
at Connection.<anonymous> (/opt/Rocket.chat/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/core/connection/pool.js:450:61)
at Connection.emit (events.js:310:20)
at processMessage (/opt/Rocket.chat/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/core/connection/connection.js:384:10)
at Socket.<anonymous> (/opt/Rocket.chat/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/core/connection/connection.js:553:15)
at Socket.emit (events.js:310:20)
at addChunk (_stream_readable.js:286:12)
at readableAddChunk (_stream_readable.js:268:9)
at Socket.Readable.push (_stream_readable.js:209:10)
at TCP.onStreamRead (internal/stream_base_commons.js:186:23) {
ok: 0,
errmsg: 'not master and slaveOk=false',
code: 13435,
codeName: 'NotMasterNoSlaveOk',
[Symbol(mongoErrorContextSymbol)]: {}
}
The tutorial says I should be able to see the Rocket.chat web interface if I go to https://yourdomain.com:3000 but I get an unable to connect page, which I suppose is due to the error above
The tutorial also says node main.js is to check if MongoDB is running or not. I can see that MongoDb service is running by executing
systemctl status mongod
so this error seems to be caused by something else.
How do I find out what is causing this error? Or are there any mistakes in this tutorial? I have found other tutorials regarding installing Rocket.chat in CentOS but most of them use nginx as hte web server while I need to use Apache.

unable to execute 'webdriver-manager update' for protractor

When i tried to installing protractor in my office PC, I am getting stuck at the step 'webdriver-manager update' in the command terminal.I did not face this obstacle when I tried the command in my personal laptop.The error thrown is as below,
C:\Users\616356>webdriver-manager update
[10:45:09] I/config_source - curl -o C:\Users\616356\AppData\Roaming\npm\node_modules\protractor\node_modules\webdriver-manager\selenium\standalone-response.xml
https://selenium-release.storage.googleapis.com/
[10:45:09] I/config_source - curl -o C:\Users\616356\AppData\Roaming\npm\node_modules\protractor\node_modules\webdriver-manager\selenium\chrome-response.xml
https://chromedriver.storage.googleapis.com/
[10:45:09] I/config_source - curl -o C:\Users\616356\AppData\Roaming\npm\node_modules\protractor\node_modules\webdriver-manager\selenium\gecko-response.json
https://api.github.com/repos/mozilla/geckodriver/releases
events.js:165
throw er; // Unhandled 'error' event
^
Error: connect ECONNREFUSED 172.217.166.112:443
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1174:14)
Emitted 'error' event at:
at Request.onRequestError (C:\Users\616356\AppData\Roaming\npm\node_modules\protractor\node_modules\request\request.js:881:8)
at ClientRequest.emit (events.js:185:15)
at TLSSocket.socketErrorListener (_http_client.js:395:9)
at TLSSocket.emit (events.js:180:13)
at emitErrorNT (internal/streams/destroy.js:64:8)
at process._tickCallback (internal/process/next_tick.js:178:19)
I think the issue might be regarding some firewall or proxy problem.I tried adding 172.217.166.112 in the proxy exceptions, it didn't work.I just don't know how to resolve this issue.Any suggestions would be appreciated.
example like this
webdriver-manager update --proxy http://TPESproxy.galileo.corp.lcl:8980

Connection refused while connection elasticsearch in node

I am using node version 0.10.33 and elasticsearch version 3.0.0 but i am not able to connect to elasticsearch.
http://localhost:9200/
Elasticsearch ERROR: 2014-11-25T16:30:16Z
Error: Request error, retrying -- connect ECONNREFUSED
at Log.error (/Users/shank/Documents/MyUmpa/Server/node_modules/elasticsearch/src/lib/log.js:213:60)
at checkRespForFailure (/Users/shank/Documents/MyUmpa/Server/node_modules/elasticsearch/src/lib/transport.js:195:18)
at HttpConnector.<anonymous> (/Users/shank/Documents/MyUmpa/Server/node_modules/elasticsearch/src/lib/connectors/http.js:146:7)
at ClientRequest.bound (/Users/shank/Documents/MyUmpa/Server/node_modules/elasticsearch/node_modules/lodash-node/modern/internals/baseBind.js:56:17)
at ClientRequest.emit (events.js:95:17)
at Socket.socketErrorListener (http.js:1551:9)
at Socket.emit (events.js:95:17)
at net.js:440:14
at process._tickCallback (node.js:419:13)
Trace: elasticsearch cluster is down!
at app.post.resturantController.ResturantInfo.name (/Users/shank/Documents/MyUmpa/Server/app.js:32:13)
at respond (/Users/shank/Documents/MyUmpa/Server/node_modules/elasticsearch/src/lib/transport.js:254:9)
at sendReqWithConnection (/Users/shank/Documents/MyUmpa/Server/node_modules/elasticsearch/src/lib/transport.js:174:7)
at next (/Users/shank/Documents/MyUmpa/Server/node_modules/elasticsearch/src/lib/connection_pool.js:213:7)
at process._tickCallback (node.js:419:13)
Have you run elastic search server? If not then Download Elasticsearch and unzip it into whatever directory you like. Next, open a terminal, cd to the directory you just unzipped, and run bin/elasticsearch (bin/elasticsearch.bat on Windows). After running elasticsearch server, run the node server!

Starting node-huxley with example tests

I'm struggling to get node-huxley to run. Having installed it globally, I then installed the node-selenium driver, cloned the repo and tried to run Huxley on the examples. However I'm seeing this error.
It seems to suggest that the server isn't running, but I've verified it as running on localhost:8000 correctly. Any ideas how to debug this?
firefox opening.
At 1 type and toggle.hux
/usr/local/lib/node_modules/huxley/node_modules/selenium-webdriver/lib/webdriver/promise.js:1549
throw error;
^
Error: ECONNREFUSED connect ECONNREFUSED
at ClientRequest.<anonymous> (/usr/local/lib/node_modules/huxley/node_modules/selenium-webdriver/http/index.js:127:16)
at ClientRequest.EventEmitter.emit (events.js:95:17)
at Socket.socketErrorListener (http.js:1547:9)
at Socket.EventEmitter.emit (events.js:95:17)
at net.js:440:14
at process._tickCallback (node.js:415:13)
==== async task ====
WebDriver.createSession()
at Function.webdriver.WebDriver.acquireSession_ (/usr/local/lib/node_modules/huxley/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:131:49)
at Function.webdriver.WebDriver.createSession (/usr/local/lib/node_modules/huxley/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:111:30)
at Builder.build (/usr/local/lib/node_modules/huxley/node_modules/selenium-webdriver/builder.js:105:20)
at _open (/usr/local/lib/node_modules/huxley/source/browser/driver.js:28:6)
at Object.open (/usr/local/lib/node_modules/huxley/source/browser/driver.js:49:3)
at _openRunAndClose (/usr/local/lib/node_modules/huxley/index.js:76:11)
at /usr/local/lib/node_modules/huxley/index.js:169:5
at /usr/local/lib/node_modules/huxley/index.js:217:5
at /usr/local/lib/node_modules/huxley/source/playback/getPlaybackInfos.js:121:5
Have you started selenium? (https://github.com/chenglou/node-huxley#installation)

error when starting the server with grunt or node server

I am trying to use the mean stack as described here : http://mean.io/
after install, when making "grunt", there is an error :
debugger listening on port 5858
4 Jan 01:47:40 - [nodemon] reading ignore list
Express app started on port 3000
events.js:72
throw er; // Unhandled 'error' event
^
Error: failed to connect to [localhost:27017]
at null.<anonymous> (/mean/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/server.js:540:74)
at EventEmitter.emit (events.js:106:17)
at null.<anonymous> (/mean/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/connection_pool.js:140:15)
at EventEmitter.emit (events.js:98:17)
at Socket.<anonymous> (/mean/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/connection.js:478:10)
at Socket.EventEmitter.emit (events.js:95:17)
at net.js:441:14
at process._tickCallback (node.js:415:13)
4 Jan 01:47:40 - [nodemon] app crashed - waiting for file changes before starting...
I tried the troubleshooting as specified on the site : Updating Grunt, bower and cleaning npm and bower caches worked well. but updating npm gives an error too:
npm ERR! error rolling back Error: Refusing to delete: /usr/local/bin/npm not in /usr/local/lib/node_modules/npm
This looks like a conflict between homebrew and npm.
but anyway i have version 1.3.21 installed.
There is the same error when i am trying node server.
do you have an idea on what i can do to make the server work ?
It may be too easy, but seems like your MongoDB server is not actually running. After having installed Mongo (on your Mac, I assume?), you have to open a Terminal window/tab, run mongod and leave it running (or use screen, etc.). You can try to access MongoDB CLI by typing mongo to make sure the server is running.
#desgnl: if you don't want to run mongod command everytime you are running the grunt, you can always use third party services like MongoDB Hosting: Database-as-a-Service by MongoLab https://mongolab.com Hope this helps too!

Resources