unhandled error when trying to run rethinkdb-poll-demo on windows - windows

I've tried to follow the instructions on RethinkDB for Windows: developer preview youtube video, which uses the code from Github https://github.com/segphault/rethinkdb-poll-demo. RethinkDB runs as expected on localhost:8080, but when I tried to run app.js from the rethink-poll-demo directory by entering 'node app' in the command prompt, I get an error message after "Creating a pool connected to local host:28015
events.js:141 throw er; // Unhandled 'error' event
Error: listen EACCES 0.0.0.0:8000"
I haven't changed any code, am new to both node.js and rethinkDB. Does anyone have any idea what's going wrong?

You have another process binding to port 8000.
Check it by running: netstat -an

Related

Inspector failed : port already in use for Javascript webdriverio automation project

I am getting this below error message in Visual studio code
Debugger listening on ws://127.0.0.1:5859/325cc0fe-d885-4684-a4bf-03ec52ffd060 For help see https://nodejs.org/en/docs/inspector
Starting inspector on 127.0.0.1:5859 failed: address already in use
Starting inspector on 127.0.0.1:5859 failed: address already in use
I was trying to add a launch.json debugger option and since it did not work. I deleted the same as well. But the node process is still locked somewhere.
I cant see any process in "ps" command or in "netstat" command. But everytime when I run the project using "npm run xxxx" command, I am getting the above message. Any help?
Managed to get rid of this issue by manually commenting the --inspect option added to the debugger.

"Error trying to start business network. Error: No valid responses from any peers." in hyperledger-composer

Afer using hyperledger-composer for several months, now suddenly the following problem is happening:
Whenever I want to start a business network, using the command:
composer network start --networkName mynetwork --networkVersion 0.0.1 --card PeerAdmin#hlfv1 --networkAdmin admin --networkAdminEnrollSecret adminpw
... I get (after waiting for an eternity) the following error message:
Error: Error trying to start business network. Error: No valid
responses from any peers. Response from attempted peer comms was an
error: Error: REQUEST_TIMEOUT Command failed
I uninstalled the whole hyperledger-composer development environment and then reinstalled everything. I still get the same error message.
Does anybody know what the hell is going on here?
P.S.: here's the result of running "composer archive list -a mynetwork#0.0.1.bna":
Listing Business Network Archive from mynetwork#0.0.1.bna
Identifier:mynetwork#0.0.1
Name:mynetwork
Version:0.0.1
Ok, I re-installed the developer environment again AND restarted my computer. Now it works again.

Composer-Rest-Server not connecting

I am testing a a business network I created, I ran the Composer-rest-server and all worked fine, then shut the server as suggested in the developers guide , then I proceeded use the yo hyperledger composer to create the skeleton of the angular app, however, now the angular app is showing in the local browser, however, the composer-rest- server is not.
Expected Behavior:
I should start the composer-rest- server in localhost:3000 and the angular app as well
Actual Behavior:
I get this message;
scovering types from business network definition ...
Connection fails: Error: Error trying to ping. Error: Error trying to query chaincode. Error: Connect Failed
It will be retried for the next request.
Exception: Error: Error trying to ping. Error: Error trying to query chaincode. Error: Connect Failed
Error: Error trying to ping. Error: Error trying to query chaincode. Error: Connect Failed
at _checkRuntimeVersions.then.catch (/home/node/.nvm/versions/node/v6.11.2/lib/node_modules/composer-rest-server/node_modules/composer-connector-hlfv1/lib/hlfconnection.js:696:34)
Your Environment
composer-cli#0.11.3
generator-hyperledger-composer#0.11.3
composer-rest-server#0.11.3
Docker version 17.06.0-ce, build 02c1d87
docker-compose version 1.13.0, build 1719ceb
The Problem
If you kill your fabric instance using ./stopFabric that you started using the ./startFabric command then all the containers that were apart of the business network were killed as well and therefore you need to reinstall the .bna and start the network again. (the development flow provided is purposely volatile for rapid development)
The Solution
1.) Type docker ps to see all of your running containers. You should see none if you are getting that error because your peer is not responding to pings
2.) Open a separate terminal and navigate to where you have fabric-dev-servers in the terminal and run ./fabricStart. This will start all the containers like your network Certificate Authority, the peer, the orderer, etc.
3.) Return to your project in another terminal. Do Step 1 & 2 found at the developer tutorial (you likely won't need to do step 3 since you likely already imported the network administrator identity going through the tutorial)
4.) Run composer network ping --card admin#tutorial-network. The ping should go through.
5.) Run docker ps. You should see 4 containers running
6.) Run composer-rest-server and follow the steps from the tutorial.
7.) Run cd tutorial-network-app to switch to where your angular application is (or wherever you generated it with the yo command)
8.) Navigate to http://localhost:3000 and everything should work.
Any other questions or problems just reply here and I can help.
The expected behaviour is that the REST server is already running (the the generator uses Loopback to spin up a REST server already (that's why you shut down the previous REST server)). Its described here https://hyperledger.github.io/composer/unstable/tutorials/developer-guide.html under 'Generate your Skeleton Web Application'.
After you created the application - following completion of the yo hyperledger-composer questions (and after providing the answers) you run your application using npm start from within the generated application directory. Your app is accessible at http://localhost:4200.

Mongodb on Terminal keeps getting stuck

I have a Macbook Pro with El Capitan. I installed mongodb on my terminal with macports, which is similar to homebrew. I've followed all of the instructions and I've made sure to change the user permissions to /data/db. Does anyone have any idea of what's wrong with my mongodb installation?
Whenever I try to run "mongod", it keeps pausing at "waiting for connections on port 27017". This is shown in Screenshot 1. Then I hit CTRL-C to exit, and I get more error messages shown in Screenshot 2. Also the "mongo" command does not work either.
Here is the error report shown when entering "mongo".
MongoDB shell version: 3.0.8
connecting to: test
2016-01-11T19:08:41.888-0600 W NETWORK Failed to connect to 127.0.0.1:27017, reason: errno:61 Connection refused
2016-01-11T19:08:41.890-0600 E QUERY Error: couldn't connect to server 127.0.0.1:27017 (127.0.0.1), connection attempt failed
at connect (src/mongo/shell/mongo.js:179:14)
at (connect):1:6 at src/mongo/shell/mongo.js:179
exception: connect failed
Here is a link to my google drive with a photos of the error report for "mongod".
Screenshot 1 - https://drive.google.com/file/d/0Bwl_BDx-HIfcYnBJRUJfbzFvSm8/view?usp=sharing
Screenshot 2 - https://drive.google.com/file/d/0Bwl_BDx-HIfcdkVkUWJzeENuelU/view?usp=sharing
Whenever I try to run "mongod", it keeps pausing at "waiting for connections on port 27017".
This is exactly what it is supposed to do. Unless you indicate otherwise via a command switch (such as "--fork"), running "mongod" starts up the mongo server process within the current shell and blocks that shell until the process is terminated (via CTRL+C).
If you want to connect to the running mongo server process via the mongo shell, you'll need to open a second terminal to do so. From there, run "mongo" and it should connect to the server running in the first terminal shell.
Re-cap:
In terminal #1, run "mongod". When it says "waiting for connections...", it's ready to accept client connections. Do not stop the process via CTRL+C; do not close that terminal.
In terminal #2, run "mongo". It should connect to the server successfully.
This "connection refused" message is significant:
2016-01-11T19:08:41.888-0600 W NETWORK Failed to connect to 127.0.0.1:27017, reason: errno:61 Connection refused
You need to work with the packet filter to flush all the rules. See this article near the bottom in order to open port 27017 which is what mongod uses:
http://www.macworld.co.uk/how-to/mac-software/how-open-specific-ports-in-os-x-1010-firewall-3616405/
This is quite direct:
https://gauravsohoni.wordpress.com/2015/04/14/mac-osx-open-port/
This may be less helpful but still worth glancing through:
https://support.apple.com/en-us/HT201642

Has anybody run Xvfb on EC2 with CentOS?

I am trying to get javascript-enabled cucumber running on CentOS in EC2 by following this tutorial: http://makandra.com/notes/1391-how-to-hide-your-selenium-browser-window-with-headless However, the scenarios that require javascript just fail without any exception message.
In order to debug, I just went to see if Xvfb is working correctly with according to this tutorial: http://blog.kabisa.nl/2010/05/24/headless-cucumbers-and-capybaras-with-selenium-and-hudson/
I tested the command:
Xvfb :99 -ac -screen 0 1024x768x16
I got the error msg like this:
_XSERVTransSocketOpenCOTSServer: Unable to open socket for inet6
_XSERVTransOpen: transport open failed for inet6/ip-10-116-82-44:99
_XSERVTransMakeAllCOTSServerListeners: failed to open listener for inet6
I googled for solutions about of these errors. I haven't found a good solution for this yet. If I run the same command again, I get:
Fatal server error:
Server is already active for display 99
If this server is no longer running, remove /tmp/.X99-lock
and start again.
So the server is supposed to be up and running already. However, when I tried to run this in followups:
DISPLAY=:99.0 firefox http://www.google.com
The console just hangs there, until I contol + C to kill it.
Is there anyone who knows what's going on here?
Thanks in advance.
It seems that it's okay. Your console didn't hang - it is firefox is working - you just don't see it:)
Edit: I think you can connect there with ssh -X and you'll see firefox window if it is working. (Only if you're running linux/mac on your dev machine)

Resources