How can I connect EthereumMist with Private-Network on mac - ethereum

I made Genesis block and turned on with geth
like this
geth --identity "PrivateNetwork" --datadir "/Users/username/dev/ethereum/data" --port "30303" --rpc --rpcaddr 0.0.0.0 --rpcport "8123" --rpccorsdomain "*" --nodiscover --networkid 1900 --nat "any" --rpcapi "db,eth,net,web3,miner" console
and... checked with this command:
eth.accounts'&'eth.getBalance(eth.accounts[0])
It works, however I don't know how to connect with mist
I had tried /Applications/Mist.app/Contents/MacOS/Mist --rpc http://localhost:8123 but what I can see is only this error message below
Error starting up node and/or syncing Error: Couldn't start swarm process.
at Timeout.error [as _onTimeout] (/Applications/Mist.app/Contents/Resources/app.asar/node_modules/swarm-js/lib/swarm.js:451:23)
at ontimeout (timers.js:386:14)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)"
I thought geth is CLI client and Mist is GUI client for ethereum net
I'm not sure even It is right
Do I need to turn on both of them? or turn on only one? please help me!

Make sure you dont use the same rpcport for both of the applications. Use a different port for each one.

I guess you given wrong ip address. So when you run the command you will find below on your gth console.
INFO [01-31|10:32:06] IPC endpoint opened:
/Users/divum/Desktop/local-network/geth.ipc INFO [01-31|10:32:06]
HTTP endpoint opened: http://127.0.0.1:8545
Now try with
/Applications/Mist.app/Contents/MacOS/Mist --rpc [HTTP_END_POINT_URL]
Replace HTTP_END_POINT_URL with your log http endpoint url.

Related

Fatal: Error starting protocol stack: listen tcp 127.0.0.1:8551: bind: Only one usage of each socket address is normally permitted

I'm trying to create three nodes with one private chain.
node1 is successfully created.
But node2 and node3 showing the following error.
Fatal: Error starting protocol stack: listen tcp 127.0.0.1:8551: bind: Only one usage of each socket address (protocol/network address/port) is normally permitted.
command used in node1
geth --networkid 15 --http --http.addr "0.0.0.0" --http.port "8549" --http.api "web3,net,eth,admin,personal" --http.corsdomain "*" --datadir nodedata0 --ipcdisable --allow-insecure-unlock --rpc.allow-unprotected-txs console
command used in node2
geth --http --http.port 8550 --nodiscover --datadir "./nodedata1" --port 30304 --http.api "web3,net,eth,admin,personal" --http.corsdomain "*" --networkid 15 --ipcdisable --allow-insecure-unlock --rpc.allow-unprotected-txs console
command use in node3
geth --http --http.port 8552 --nodiscover --datadir "./nodedata2" --port 30307 --http.api "web3,net,eth,admin,personal" --http.corsdomain "*" --networkid 15 --ipcdisable console
Please give some advance kindly, thanks a lot.
Using --authrpc.port should work, I tried with two nodes so the config was --authrpc.port 8551 and --authrpc.port 8552. Based on #season comment.

Greeter tutorial using Solc, geth and ethereum wallet

I'm trying to run a contract on a private local network so that I can develop and deploy a contract on the mainnet for some ERC20 token.
Starting with the greeter tutorial, I compiled the default example as follow
$ solc -o target_greeter --bin --abi src/the_greeter.sol
I also created a testnet as follow:
$ geth --identity "SolidityTestNode" --rpc --rpcport "8080" --rpccorsdomain "*" --datadir testnet/ --port "30303" --nodiscover --rpcapi "db,eth,net,web3" --networkid 1999 init testnet/CustomGenesis.json
Then I connected to my local network via ethereum wallet by starting it as follow:
$ ethereumwallet --network test --rpc testnet/geth.ipc
I then assumed that I could deploy a contract as follow:
But it returns error Could not compile source code.
I also tried to enter that code in the geth console, but greeterFactory.new() line never returns the prompt and I don't see any syntax error in the example
How am I supposed to deploy the Greeter contract on my local testnet ? The tutorial isn't precise enough in that regard.
Thank you for your support.

Why does admin.addPeer() work from certain nodes but not others?

I noticed that with a node on my AWS instance and geth node on my laptop, my AWS node can add my laptop as a peer, but my laptop cannot add my AWS instance.
Both nodes use a similar geth command line to the following:
geth --identity "node2" --rpc --rpcport "8000" --rpccorsdomain "*" --datadir "./" --port "30303" --rpcapi "db,eth,net,web3" --networkid 1432 --nat "any" console --nodiscover
Would anyone know the cause of this behavior?

Geth: "Error starting protocol stack: invalid argument"

I'm trying to set up a local Ethereum node in a Vagrant (trusty64, geth 1.7.1-stable):
geth --identity "test_remote" --datadir "./geth_data_remote" --trace "./geth_data_remote/trace.txt" --dev
and getting the following error:
19:00:20.199679 syncDir: sync /var/www/vhosts/localhost/htdocs/geth_data_remote/geth/chaindata: invalid argument 19:00:20.199749 CURRENT: sync /var/www/vhosts/localhost/htdocs/geth_data_remote/geth/chaindata: invalid argument
Locally (OSX 10.12.6, geth 1.6.7-stable) it works without any problems that's why I can't get the problem.
p.s. Setup in Vagrant works only with a default path. What could be the reason?

ethereum local cluster with bootnodes

Geth 1.6.7.
I have used this manual
https://github.com/ethereum/go-ethereum/wiki/Setting-up-private-network-or-local-cluster
looks very simple
run bootnode
./bootnode -nodekeyhex
dc90f8f7324f1cc7ba52c4077721c939f98a628ed17e51266d01c9cd0294033a
UDP listener up
self=enode://890b6b5367ef6072455fedbd7a24ebac239d442b18c5ab9d26f58a349dad35ee5783a0dd543e4f454fed22db9772efe28a3ed6f21e75674ef6203e47803da682#[::]:30301
run 2 geth`s on the local machine
geth --bootnodes
enode://890b6b5367ef6072455fedbd7a24ebac239d442b18c5ab9d26f58a349dad35ee5783a0dd543e4f454fed22db9772efe28a3ed6f21e75674ef6203e47803da682#127.0.0.1:30301
--datadir "./node1" --port 30310 --rpcport 8110 --ipcdisable --networkid 1024 --cache=512 --rpcapi personal,db,eth,net,web3 --rpc console 2>> ./node1/geth1.log
geth --bootnodes
enode://890b6b5367ef6072455fedbd7a24ebac239d442b18c5ab9d26f58a349dad35ee5783a0dd543e4f454fed22db9772efe28a3ed6f21e75674ef6203e47803da682#127.0.0.1:30301
--datadir "./node1" --port 30311 --rpcport 8111 --ipcdisable --networkid 1024 --cache=512 --rpcapi personal,db,eth,net,web3 --rpc console 2>> ./node1/geth1.log
checked peers via console
admin.peers []
As you can see nodes do not see each other. What have I done wrong?
Thanks.
You have to add the second instance to your admin node (i.e. your first instance). Run the command admin.addPeer(enodeUrlOfFirstInstance).