I have a script to setup a geth Ethereum node which has worked well for me most of the time. (been using it for the last 2-3 weeks). I have used it regularly to setup multiple geth instances on different docker instances.
However, today, when I created some nodes on different docker instances (all running on same box), I saw issues. For starters, the 2 nodes are unable to talk to each other when I use admin.addPeer(). Mining doesnt work either. On investigation, I figured out all the nodes created have the same enode id.
This is a bizzare issue - seeing it for the first time. I made no changes in my script or how I start the multiple geth instances. Anything I can do to prevent this? I tried using bootnode also as follows -
bootnode -genkey boot.key bootnode -nodekey boot.key INFO [10-11|08:51:32.325] UDP listener up self=enode://e3e9eec5fad93a169f7667905733d831f9e6c9ad233fcf2430dd65d8822c688310784f1b3c8bba38e1037bab1916b1e755124ff6973d752fed8912c6e2ba2569@[::]:30301
I expect to see the above id picked up when I do geth --bootnodes
However, I see something totally different.