low getconnectioncount issue

3 replies 329 views
chain777Member
Posts: 16 · Reputation: 148
#1Dec 26, 2017, 11:11 PM
Just got into running a node. I'm using a pretty basic machine, and whenever I call `bitcoin-cli getconnectioncount`, it usually shows only about 1 to 3 connections, never more than 4. But on my more powerful setup, it jumps to around 10 connections in just a few moments after starting `bitcoind`. What's the deal with this? Is it that other nodes are being picky based on my machine's specs and choosing not to connect?
4 Reply Quote Share
sage_moonSenior Member
Posts: 273 · Reputation: 1371
#2Dec 27, 2017, 12:21 AM
No, other nodes don't know your machine's specifications. They only see your ip address and the port you're using. If your machine has limited resources (cpu, ram, bandwidth), it may take longer to sync or maintain stable connections, which affects the number of peers. Also, check that you're not limiting connections in your bitcoin.conf file (for example, with maxconnections) and make sure port 8333 is open and properly forwarded on your network. Sometimes it's just a matter of giving it more time to stabilize.
2 Reply Quote Share
gr3g.0rbitHero Member
Posts: 1025 · Reputation: 2646
#3Dec 28, 2017, 06:18 PM
First, please specify your Bitcoin Client's name and version. Then, your related config set in the GUI, bitcoin.conf file and command line options, excluding credentials like RPC username/password. Most importantly, your debug.log contents which should have both of the above, and could have an indicator of the underlying issue. Take note that it can get more than 10 if you managed to enable inbound connections by configuring "port forwarding" in your router. Here's a tutorial in bitcoin.org but the actual setup should be specific to your router: https://bitcoin.org/en/full-node#port-forwarding
1 Reply Quote Share
paul.ninjaFull Member
Posts: 152 · Reputation: 539
#4Dec 28, 2017, 08:29 PM
No one filters you for having a "weak" box. Core will open around 10 outbound peers by itself; you only go above that if you accept inbound (port 8333 reachable). If you're stuck at 1-4, it's almost always local/network config. Things to check: Run bitcoin-cli getnetworkinfo --> check connections, inbound/outbound, localaddresses (should say reachable: true). Make sure you didn't cap it: no maxconnections= (or it's >10), no connect= list, listen=1. Open/forward TCP 8333 to that machine; if your ISP uses CGNAT, you won't get inbound--ask for a public IP. Look in debug.log for clues: repeated connect() failed, dnsseed, UPnP, or too many open files (raise ulimit -n). Very slow IBD can delay filling slots; give it time, but outbound should still reach ~8-10 eventually.
2 Reply Quote Share

Related topics