Connect command line bugs (multiple) #1873

issue darkhosis opened this issue on September 27, 2012
  1. darkhosis commented at 5:45 PM on September 27, 2012: none

    When using connect command line function it opens two connections to the IP specified...

    09/27/12 17:32:31 accepted connection xx:22348 09/27/12 17:32:31 accepted connection xx:22347

    It also continues to open connections up to your maximum # of outgoing connections rather than the stated "Connect only to the specified node(s)". The double connection is counted as 1, so if you have the default max of 8 outgoing connections, it'll open 7 more. It doesn't allow incoming connections.

    observed behavior in bitcoin-qt and bitcoind (windows)

  2. jgarzik commented at 5:50 PM on September 27, 2012: contributor

    This message is a bit confusing. The "accepted connection" message only occurs for incoming connections.

    Maybe you can provide your exact bitcoin.conf (sans password) and command line being used?

  3. darkhosis commented at 5:57 PM on September 27, 2012: none

    bitcoin-qt.exe -connect=5.x.x.x, or bitcoind -connect=5.x.x.x (when I run it with maxconnections=1, it'll still open two connections to the peer listed under -connect, but no others)

    whoops, should have included source log:

    09/27/12 17:40:29 connected 5.x.x.x (no port shown) 09/27/12 17:40:29 send version message: version 60002, blocks=200778, us=0.0.0.0:0, them=5.x.x.x:8333, peer=5.x.x.x:8333 09/27/12 17:40:29 connected 5.x.x.x:8333 09/27/12 17:40:29 send version message: version 60002, blocks=200778, us=0.0.0.0:0, them=5.x.x.x:8333, peer=5.x.x.x:8333 09/27/12 17:40:30 receive version message: version 60002, blocks=200778, us=76.x.x.x:22379, them=5.x.x.x:8333, peer=5.x.x.x:8333 09/27/12 17:40:30 receive version message: version 60002, blocks=200778, us=76.x.x.x:22378, them=5.x.x.x:8333, peer=5.x.x.x:8333

  4. laanwj commented at 7:08 AM on May 28, 2014: member

    You need to pass -nolisten as well if you want no further connections. -connect limits the number of outgoing connections to one, but by design doesn't limit the number of incoming connections.

  5. laanwj closed this on Sep 25, 2014

  6. KolbyML referenced this in commit 7bba3947af on Dec 5, 2020
  7. DrahtBot locked this on Sep 8, 2021
Labels

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-29 03:16 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me