-
Notifications
You must be signed in to change notification settings - Fork 2.6k
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
CONNECTION ERROR: Couldn't connect to node http://localhost:8545. #114
Comments
same here |
I had this error as well in an ubuntu 16.04 VM running under vagrant/virtualbox. Running the node console as root user (eg. sudo node) worked for me. |
if you are using parity, add |
I had the same trouble and spend a lot of time to find the reason. It means your NodeJs process needs to write files permission web3.js ignore original error message here |
Hi @Ollemesh , Could you explain how to add write permission for NodeJS process? I'm new to Node. Thx a lot. |
Running sudo chmod 777 /var/www/html/edit2/truffle If you get a response like this: { difficulty: BigNumber { s: 1, e: 0, c: [ 1 ] }, then you've connected to the local node at http://127.0.0.1:8545 |
Do what @Ollemesh suggested. Paste |
I tried to use Web3 to call smart Contract in html file, reported the following error, ERROR: Couldn't connect to node http://localhost:8545. smart, who can help me? like this:
var Web3 = require('web3');
var web3 = new Web3();
web3.setProvider(new web3.providers.HttpProvider('http://localhost:8545')); //it's not work
The text was updated successfully, but these errors were encountered: