i am trying to connect metamask with private node but its fails to connect

geth --rpc --rpcaddr --rpcport 8545 --rpccorsdomain "*" --rpcapi admin,db,eth,debug,miner,net,ssh,tapool,personal,web3 --datadir NODEDATA --networkid 123456 console

  • How do you connect it? Are they on the same machine? – Badr Bellaj Aug 6 '19 at 18:43
  • tell me about both same machine and different machine with metamask – Ranjeet Aug 7 '19 at 7:36

on the same machine use --rpcaddr to start the JSON RCP on the localhost network and only connections from your local machine reach the geth server

on a remote machine use --rpcaddr "" to allow remote connections.

For both case in metamask indicate the machine ip (for the first case use for the second case use the machine ip instead

| improve this answer | |
  • its not connecting i have given --rpcaddr "" if give the ip it shows error Fatal: Error starting protocol stack: listen tcp ip:8545: bind: cannot assign requested address – Ranjeet Aug 7 '19 at 10:21
  • Maybe another process is using that port try to use lsof -i :8545 to see if which process is listening – Badr Bellaj Aug 7 '19 at 13:50
  • i have checked no other process is using port 8545 – Ranjeet Aug 7 '19 at 15:05
  • change by its public ip – Badr Bellaj Aug 7 '19 at 15:15
  • sir still not connected i have written --rpcaddr – Ranjeet Aug 7 '19 at 15:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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