1

I created a private network using go-ethereum with 2 clien which are VMs(ubuntu 14.04).

On VM1 (IP:192.168.217.131):,my command to create private network:

 ./geth --genesis private.json --port "50301" --networkid 1234 --datadir /home/user/Documents/genesisdata  console

On VM2 (IP:192.168.217.132):,my command to create my private network:

./geth --genesis private.json --port "50302" --networkid 1234 --datadir /home/user/Documents/genesisdata  console

Where private.json is the same and has content below:

{
  "nonce": "0x0000000000000042",
    "mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000",
    "difficulty": "0x4000",
    "alloc": {
     "0xcef9d7c780ab257c563e9ece3d28a176d6ce86c5": {
    "balance": "10000000000000000000"},
  "0x25eda5d755638ff6c8b433c20364f0c8b5a5684a": {
    "balance": "20000000000000000000"}},
    "coinbase": "0x0000000000000000000000000000000000000000",
    "timestamp": "0x00",
    "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
    "extraData": "Custem Ethereum Genesis Block",
    "gasLimit": "0xffffffff"
}

0x25eda5d755638ff6c8b433c20364f0c8b5a5684a is an account I created on VM1,and I import some ether to it by above "alloc".

After Created and join to private network, I tried add peer by admin.addPeer, and check again by admin.peers. Everything is ok, I can see the other clients from any VMs.

Also on VM1, I'm continue to create a simple contract and start to mining by miner.start(1). After mined, i check and see that my new contract work very well.

But on VM2, I receive this message:

I0715 06:49:16.089919 eth/downloader/downloader.go:299] Synchronisation failed: block time is in the future: BlockFutureErr, 1469151037 > 1468540186
I0715 06:49:26.090252 eth/downloader/downloader.go:299] Synchronisation failed: block time is in the future: BlockFutureErr, 1469151037 > 1468540196
I0715 06:49:36.085763 eth/downloader/downloader.go:299] Synchronisation failed: block time is in the future: BlockFutureErr, 1469151037 > 1468540206
I0715 06:49:46.089321 eth/downloader/downloader.go:299] Synchronisation failed: block time is in the future: BlockFutureErr, 1469151037 > 1468540216
I0715 06:49:56.076320 eth/downloader/downloader.go:299] Synchronisation failed: block time is in the future: BlockFutureErr, 1469151037 > 1468540226

I tried to find a solution to solve "Synchronisation failed" issue. But I don't know what is the reason and how to solve it.

May be the configuration of my private network has problems or the other?

Please give me the suggestion or solution to solve it. Thank in advance.

  • Have you checked if your NTP time is synced with your clock? – rupshabagchi Jul 25 '16 at 11:33
  • Based on the hypervisor you're using, there are ways to keep the time in guests (VMs) in sync with the Host's time. – galahad Jul 25 '16 at 14:10
1

Make sure that each virtual machine has the same system time.

Set the date accordingly on each machine:

sudo hwclock --set --date="25/07/2016 16:45:05"

(adjust the time to match on both machines). Clear the block chain and start over.

  • I sure the time of two VMs is the same. I get time from ntp server. – Ajk Thu Jul 26 '16 at 4:01
  • What does the command date show in each virtual machine? – Sebi Jul 26 '16 at 7:22
  • Are you using the same data directory to run multiple networks? – Sebi Jul 26 '16 at 7:24
  • I found a solution to solve it. It's not come from time. Please review my post. Thank in advance – Ajk Thu Jul 26 '16 at 7:27
1

I found out how to solve this issue. You just need to remove everything in .ethash locate at /home/youruser.

And run again with parameter --mine to re-generate DGA.

It will work well!!!

0

I had some problems with synchronization at one point. I dont know if it is the same for you case but they solved when I started using the new way of initializing the chain.

/usr/bin/geth --networkid "189" init conf/genesis.json

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.