Cannot get peers

Hey guys,

I keep trying to get geth to sync, but it doesn't work. I have generated the genesis block but when I run geth --genesis ./genesis_block.json it gets stuck at: Listening on [::]:30303. Also when checking the number of peers I get 0. What am I doing wrong here?


Comments

  • ledgerwatchledgerwatch Member Posts: 57
    Most probably, the genesis block you have generated does not match the one that is now built into the geth client. Try to run it without --genesis option.
    The "correct" genesis hash is d4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3, and in your case it appears to be something like 3aa4d...
  • hotsnowhotsnow Member Posts: 8
    I deleted the genesis_block.json file and built the genesis block again using this line:

    python mk_genesis_block.py --extradata 0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3 > genesis_block.json

    I also deleted the .ethereum folder. When I start geth without the --genesis option it gets stuck to this:


  • ledgerwatchledgerwatch Member Posts: 57
    I tried to telnet your port 30303, and it worked. I tried to add you as a peer, but looks like the node Id is not shown fully on your screenshot.
    When I try to run geth with a brand new data directory, it shows me this:


    I0901 09:42:14.267291 559 backend.go:328] Blockchain DB Version: 3
    I0901 09:42:14.806188 559 chain_manager.go:106] WARNING: Wrote default ethereum genesis block
    I0901 09:42:14.806266 559 chain_manager.go:237] Last block (#0) d4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3 TD=17179869184
    I0901 09:42:14.809490 559 cmd.go:125] Starting Geth/v1.1.0/darwin/go1.5


    Try to do the same. Run "geth --datadir test", and see if you get the same default block hash
  • hotsnowhotsnow Member Posts: 8
    When I ran "geth --datadir test" it started to sync with the blockchain.
  • hotsnowhotsnow Member Posts: 8
    edited September 2015
    I think this is my node ID: 2ce286dd8bb2dee2c19044cf592762982ec1eae44dd8030cf6b633cf84f873587c112385fe1fffa8b8e4560d3c8a261c5cc5a786500880556c3ab85712fe70ee
  • ledgerwatchledgerwatch Member Posts: 57
    So if it started to sync in the "test" directory, this means that you still had some remnants of incorrect Genesis block in your default one. Have a look in your "test" directory now and try to find the equivalents in your default one, so you can clean them up better
  • hotsnowhotsnow Member Posts: 8
    I gave up trying to set it up on Ubuntu, I just installed windows and ran ethminer on it. It's much easier to set up on windows.
  • corsarocorsaro Member Posts: 28
    did you try do open port 30303 on your firewall?

    Alternatively, it is not best practice but you can try to add manually some peers (you need to trust them).

    If you need, I can give you a list of peers to which I am connected to.
Sign In or Register to comment.