Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: chr1s on December 18, 2014, 03:55:05 PM



Title: Problem running a connectable full node after 24h disconnect
Post by: chr1s on December 18, 2014, 03:55:05 PM
Hi,

I have already posted this to reddit but sadly did not get any reply so I am trying it here now.

I am running a full node and it's working fine until the 24 hours adsl disconnect (NAT with port forwarding enabled). But I don't get any incoming connections after the disconnect. I think the problem is that my new external ip address is not dicovered:

bitcoind@bitcoind:~$ ./bitcoin-0.9.3-linux/bin/64/bitcoin-cli getnetworkinfo
{ "version" : 90300, "protocolversion" : 70002, "timeoffset" : 0, "connections" : 8, "proxy" : "", "relayfee" : 0.00001000, "localaddresses" : [ { "address" : "84.x.x.99", "port" : 8333, "score" : 538 } ] }

The address .99 is old, I got a new address:

bitcoind@bitcoind:~$ dig +short myip.opendns.com @resolver1.opendns.com
84.x.x.25

The new address is connectable through getaddr.bitnodes.io:

84.x.x.25 /Satoshi:0.9.3/

But there a no more connections than 8 until I restart my node. After restart incoming connections work fine until next disconnect.

Is there any way to tell bitcoind to check my external ip regulary? I did not find any setting in bitcoin.conf

And does someone know the meaning of the score inside the localaddresses output?

Thanks

Chris


Title: Re: Problem running a connectable full node after 24h disconnect
Post by: shorena on December 18, 2014, 04:49:26 PM
Hi,

I have already posted this to reddit but sadly did not get any reply so I am trying it here now.

I am running a full node and it's working fine until the 24 hours adsl disconnect (NAT with port forwarding enabled). But I don't get any incoming connections after the disconnect. I think the problem is that my new external ip address is not dicovered:

Yes, its a known problem. It was discussed on github a while back and the core devs decided that not enough people have the problem to care about it IIRC.

-snip-
Is there any way to tell bitcoind to check my external ip regulary? I did not find any setting in bitcoin.conf

Nope, unless you restart it. There is currently no way to reinitiate the initial "whats my IP?" code.


Title: Re: Problem running a connectable full node after 24h disconnect
Post by: chr1s on December 18, 2014, 05:09:52 PM
Thanks for clarification.

I think there are a lot of users affected which use their home server to host bitcoind behind a dynamic address and are probably not aware of this bug.

I'll use a cronjob for a daily restart as a work around.


Title: Re: Problem running a connectable full node after 24h disconnect
Post by: shorena on December 18, 2014, 05:41:22 PM
Thanks for clarification.

I think there are a lot of users affected which use their home server to host bitcoind behind a dynamic address and are probably not aware of this bug.

Found it [1] its almost 4 years old now and it was worse back then, but the core problem still exists. I dont know how difficult it would be to create an external command (e.g. bitcoind rescanownip) that is executing the code needed to detect the local IP.

I'll use a cronjob for a daily restart as a work around.

That should work. Esp. if the disconnectes are at a fixed time.


[1] https://github.com/bitcoin/bitcoin/issues/48