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?
Related
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.
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.
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.
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).
I have started two mongod processes for a shard server and a config server, here are the commands:
mongod --shardsvr --dbpath \data\a1\ --port 27018 --logpath \data\logs\loga1.a1
and
mongod --configsvr --dbpath \data\configdb\ --port 27019 --logpath \data\logs\log-config.a1
When I tried to run a mongos I got an error:
C:\mongodb\bin>mongos --configdb CTLDBADEL18:27019
2014-11-10T14:00:03.662-0600 warning: running with 1 config server
should be done only for testing purposes and is not recommended for
production 2014-11-10T14:00:03.671-0600 [mongosMain] MongoS version
2.6.4 starting: pid=5688 port=27017 64-bit host=CTLDBADEL18 (--help for usage) 2014-11-10T14:00:03.672-0600 [mongosMain] db version v2.6.4
2014-11-10T14:00:03.672-0600 [mongosMain] git version:
3a830be0eb92d772aa855ebb711ac91d658ee910 2014-11-10T14:00:03.672-0600
[mongosMain] build info: windows sys.getwindowsversion(major=6,
minor=1, build=7601, platform=2, service_pack='Service Pack 1')
BOOST_LIB_VERSION=1_49 2014-11-10T14:00:03.673-0600 [mongosMain]
allocator: system 2014-11-10T14:00:03.673-0600 [mongosMain] options: {
sharding: { configDB: "CTLDBADEL18:27019" } }
2014-11-10T14:00:03.688-0600 [mongosMain] creating WriteBackListener
for: CTLDBADEL18:27019 serverID: 000000000000000000000000
2014-11-10T14:00:03.706-0600 [mongosMain] scoped connection to
CTLDBADEL18:27019 not being returned to the pool
2014-11-10T14:00:03.707-0600 [mongosMain] ERROR: listen(): bind()
failed errno:10048 Only one usage of each socket address
(protocol/network address/port) is normally permitted. for socket:
0.0.0.0:27017 2014-11-10T14:00:03.707-0600 [Balancer] about to contact config servers and shards 2014-11-10T14:00:03.708-0600 [mongosMain]
dbexit: rc:48
Can you help me and see what I am doing wrong? I have tried with different names and commands:
>mongos --port 27017 --configdb CTLDBADEL18:27019
>mongos --configdb CTLDBADEL18:27019 --port 27017
>mongos --configdb 10.11.82.103:27019 --port 27017
>mongos --configdb 10.11.82.103:27019
Start mongos on a different than port 27017:
mongos --port 27077 --configdb CTLDBADEL18:27019
Or alternatively, check the process that is using port 27017 and kill it, then start mongos with port 27017.
In Windows you can use Start > All Programs > Accessories > System Tools > Resource Monitor (or Run resmon.exe) and select tab 'Network' and click on 'Listening Ports' to check the process using 27017