-
Notifications
You must be signed in to change notification settings - Fork 20.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
admin.addPeer() doesn't add 'permament' static nodes #2766
Comments
Permanent static nodes are also possible, but they have to be manually configured in a config file: https://github.com/ethereum/go-ethereum/wiki/Connecting-to-the-network#static-nodes |
@karalabe Could you add 'Private Network' label please. |
@fjl Could we perhaps extend the |
But this link https://github.com/ethereum/go-ethereum/wiki/Connecting-to-the-network#static-nodes shows to add the static-nodes.json the folder which contains both keystore and chaindata folder, but in geth version 1.9 those those files/folders reside in two different folders.Then |
@galladivya Thanks, the wiki page is updated now. |
+1 for @karalabe’s suggestion of adding flag to allow addition of static peers during runtime. @fjl, As per the documentation at https://github.com/ethereum/go-ethereum/wiki/Connecting-to-the-network#static-nodes static-nodes.json needs to be present in datadir/geth directory. But I accidentally put it in datadir directory and all the static nodes were shown in peer list. Is this expected behavior or is this a bug? |
Hey can someone tell, how to connect/add other peers when a node is connected.I have used admin.addPeers() but the added nodes are temporary.I used --bootnodes command for the other nodes to connect,but no output. |
@galladivya , |
My node is not connecting with any peer even I added static-nodes.json file to the data directory folder. |
@fjl |
I am not sure. The only thing I can suggest you is to copy the contents of JSON file into a notepad or something where special characters will be discarded and try again. Because I don't see 'â' anywhere. Or may be someone else can suggest something. |
@fjl using statis-nodes.json results in tens of minutes to connect to my other peers. Is this normal? Also, has the trusted-nodes feature been deprecated? Is there any difference between the two in recent Geth versions? Thanks |
The functionality already exists in the form of static nodes json file, I'm closing this |
System information
Geth version:
geth version
OS & Version: Windows/Linux/OSX
Commit hash : (if
develop
)Expected behaviour
Based on documentation
from Connecting to the network
I expect that node added with admin.addPeer() will be reconnected after geth restart.
Actual behaviour
After restart there are not connected nodes ('--bootnodes' is broken as well - see 2708)
Steps to reproduce the behaviour
admin.peers
admin.addnode('enode://node_address')
The text was updated successfully, but these errors were encountered: