Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: todu on July 25, 2011, 03:50:54 AM



Title: No bitcoin client asks to connect, even though 8333 forwarded - why?
Post by: todu on July 25, 2011, 03:50:54 AM
I still have only 8 connections even though I've forwarded port 8333 to my bitcoin (Ubuntu) computer. I've tried to connect from outside my firewall using telnet on port 8333 to verify that the forwarding works, and then my bitcoin client shows 9 connections. So the port forwarding works.
Using Wireshark I could verify that my bitcoin client could connect to the irc server. I saw irc traffic on port 6667 just as expected. Netstat confirms that the bitcoin client is listening to port 8333. I've been sniffing (with Wireshark) for incoming packets on port 8333 for a little more than half an hour now, and not received even one incoming packet.

Why doesn't any other bitcoin node send me any connection requests? My bitcoin client version is 0.3.23-beta.


Title: Re: No bitcoin client asks to connect, even though 8333 forwarded - why?
Post by: todu on July 25, 2011, 12:53:25 PM
Perhaps your ISP is blocking incoming connections on port 8333. (Unless by "tried to connect from outside my firewall", you mean that you tried to connect via another internet connection?)

Yes, the computer I was testing to telnet from is in the US, and my bitcoin client computer is in Sweden. Different ISPs. So my ISP isn't blocking port 8333.


Title: Re: No bitcoin client asks to connect, even though 8333 forwarded - why?
Post by: todu on July 27, 2011, 04:32:31 PM
Have you catched up with the block chain?

I've noticed that bitcoind gets a lot of connections initially when started, but this gradually drops down again to only 8 and stays there while you are still catching up with the block chain. Once you're catched up, the number of connections seems to go up again. (I'm not sure if this is the expected behavior, just what I observed.)

Yes, I had it catched up. It got updated at a very high speed, so maybe my client just figured connecting to more than eight peers would've been unnecessary.


Title: Re: No bitcoin client asks to connect, even though 8333 forwarded - why?
Post by: wumpus on July 28, 2011, 07:40:14 AM
I just noticed that bitcoind no longer receives incoming connections if the public IP of the machine changes while it is running. I guess bitcoind does not detects this, and never publishes the new IP to the rest of the network. After stopping and restaring bitcoind, I see incoming connections again.

Perhaps your issue is similar: maybe your machine has more than one public IP, and bitcoind is publishing the one that doesn't accept connections on port 8333.
Can you file a github issue please? This seems like an issue that the developers simply haven't thought about.


Title: Re: No bitcoin client asks to connect, even though 8333 forwarded - why?
Post by: todu on August 03, 2011, 01:42:39 AM
I just noticed that bitcoind no longer receives incoming connections if the public IP of the machine changes while it is running. I guess bitcoind does not detects this, and never publishes the new IP to the rest of the network. After stopping and restaring bitcoind, I see incoming connections again.

Perhaps your issue is similar: maybe your machine has more than one public IP, and bitcoind is publishing the one that doesn't accept connections on port 8333.

While I do have a dynamic ip, it has remained the same for over half a year at least. So this is not my issue. I also tried to download the currently latest stable version of bitcoin for Linux (0.3.24) and tried running both the 64 bit and 32 bit binaries. It still didn't work. Moreover, I tried to run ./bitcoin -testnet and forwarding port 18333 as well. When I run the client in testnet mode, it gets zero connections and consequently does not download the testnet blockchain at all. I tried telneting from a server outside of my client's ISP, and it showed one connection. When I exited the telnet session, it showed 0 connections again. So the port forwarding works. But what could be wrong with my setup, when the "main net" always shows at most 8 connections and the testnet shows at most 0 connections?

Edit1:
Here is the output from the logfile (tail -f ~/.bitcoin/testnet/debug.log): https://gist.github.com/1121785