10

I am unable to make etherwallet v3.4.2 to connect to my private blockchain.

The way I run my private network: (please note that it works perfectly fine)

geth --port 3000 --networkid 23422 --identity node1 --verbosity 3 --nodiscover \
--nat none --datadir="/home/MyEthereumEbloc" --rpc --rpcaddr="localhost" --rpcport \
8545 --rpccorsdomain="*" --ipcapi "admin,eth,net,web3,debug" \
--rpcapi "admin,eth,net,web3,debug" --autodag=true 

In order to use etherwallet in private chain setup, I completed following guide and answer : As guided, I am able to get blank page for the http://< my_ip >:8000/api.mew and the index.html opens on http://< my_ip >:8000. Everything is in order and fine. But the moment I open the webpage I see following error on the output of node runLocalServer.js and this error message keep repeat itself.

node runLocalServer.js
{ [Error: connect ECONNREFUSED]
  code: 'ECONNREFUSED',
  errno: 'ECONNREFUSED',
  syscall: 'connect' }
{ [Error: connect ECONNREFUSED]
  code: 'ECONNREFUSED',
  errno: 'ECONNREFUSED',
  syscall: 'connect' }

In addition to that as an example, I create new account address on etherwallet. And inside geth I tried to send some ether to that address. Transaction successfully completed, but on the etherwallet, account balance of that account is still empty. Also I send a transaction inside etherwallet, which won't show up on my private blockchain.

I have been told that etherwallet can't find my eth node, hence there is disconnection between them. But I could not figure it how I could fix this problem.

Setup Custom Node:

On the website at http://< my_ip >:8000, Top Right Box => Add Custom Node: Than I set Node Name: node1, URL: https://<my_ip> and port: 8545 as on the example window popped up.

enter image description here

After that on the top of the page I see the following error:

enter image description here

Please note that I tried < my_ip > as 127.0.0.1 and original ip address of my server but both showed that error. In order to connect to the local node, because of the --rpc flag I assume only localhost can connect into my node. So maybe I need to make modifications on Response.js file via web3 to connect my node?

Thank you for your valuable time and help. I am sorry if there is grammar errors.

1
  • If you cant find a solution to this, try the Ethereum Wallet from ethereum.org. It detected my testnet immediately without any configuration. Commented Jan 9, 2017 at 18:59

2 Answers 2

8

I think your main issue is, you are binding only to the localhost address, are you running geth on a remote server? or are you running it on your local machine and also running the mew_relay on the same machine?

If you are running your geth on a remote server and running the relay on your local machine id suggest changing to --rpcaddr="0.0.0.0" then try again by using your remote server IP for the host, "0.0.0.0" will bind the rpc to all available addresses on that machine.

For Setup Custom Node: you are trying to use your ip "127.0.0.1" as https. Try downloading the latest version dist-v3.4.2.zip of mew from here and open the index.html file now add a custom node by typing your URL as "http://127.0.0.1" it should work now.

Online version of mew won't work because it is on HTTPS and HTTPS won't allow you to communicate with HTTP URLs. Therefore you have to download and run mew locally.

Don't forget to check the Custom checkbox instead of ETH.

2
  • I am very sorry for the confusion. I am running geth on a remote server and also running mew_relay and index.html on the same machine. I updated --rpcaddr="0.0.0.0"; Inside nodeIP.json => {"node_ip": "< remote_server_ip >", "node_classic_ip":"< remote_server_ip >"} and inside etherwallet-master.js => mewServer.prototype.SERVERURL = "http://< remote_server_ip >:8000/api.mew"; inside runLocalServer.js and runServer.js port number changed as httpServer.listen(8000) and at final step I did custom node by typing URL: http://127.0.0.1. But still I am facing with the same problem.
    – alper
    Commented Jan 9, 2017 at 12:59
  • Good news, on my remote server when I open the index.html locally, I was able to add the custom node (Please note that this worked with --rpcaddr="localhost"). But this does not work when I try to open index.html file though http://< my_ip >:8000, so any client won't able to use the website that is actually connected to geth that is running on the remote server. To make this work should client require to run geth on his local machine as well or is there any other solution?
    – alper
    Commented Jan 9, 2017 at 14:38
1

You don't need to run the mew relay to add a custom node. Let's do this.

Step1: run geth with rpcaddr "0.0.0.0"

Step2: redownload the latest dist.zip from GitHub

Step3: open the index.html file click on the node switcher click custom node. For the URL type http:// < your remote IP > now click add. That's all you need to add a custom node. At first I thought you are trying to get the mew_relay to work. :) We no longer require the relay to add a custom node. Let me know how it goes.

3
  • 1
    You might wish to register your account, and we can merge your identities.
    – q9f
    Commented Jan 10, 2017 at 9:17
  • I assume running geth with rpcaddr "localhost" is more secure. So it is more reliable to force clients to run geth on their local machine and connect into that. But your both two answer works. Thanks!
    – alper
    Commented Jan 10, 2017 at 11:02
  • exactly running geth with 0.0.0.0 wich mapps it with all the addresses is risky. you should setup a firewall and an access whitelist Commented Jan 11, 2017 at 15:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.