Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: sieler on June 10, 2011, 01:04:17 AM



Title: bitcoin not connected (after 129686 blocks)?
Post by: sieler on June 10, 2011, 01:04:17 AM
Hi,

I'm new to bitcoin.  I googled/searched to see if this was a known problem, but most hits I found dealt with people who
had received 0 blocks.  I'm using a Mac Pro, OSX 10.6.7, bitcoin 0.3.21-beta.

I installed bitcoin and started it.  Some hours later, I noticed all my CPUs were active
with bitcoin.  But ... a few minutes later, I noticed it had 129687 blocks and it was now using no CPU
and said "not connected". 
I stopped/restarted bitcoin several times, no change ... still "not connected".
(Yes, checked "Generate" after each restart.)

Since I was originally working fine, I can assume there's no firewall problem
(and we made no local network changes today :)

Is this a known problem (e.g., is there a limited supply of blocks that can lead to half-hour or
longer pauses in bitcoin)?

thanks,
Stan


Title: Re: bitcoin not connected (after 129686 blocks)?
Post by: URSAY on June 10, 2011, 01:08:36 AM
Check current block status...

http://blockexplorer.com/q/getblockcount

You shouldn't use generate.

If you have problems connecting then try opening Utilities/Terminal

Type...

cd /Applications/

Hit return.

Then type...

bitcoin-0.3.21/Bitcoin.app/contents/macos/bitcoin -addnode=69.164.218.197 -addnode=64.22.103.150 -addnode=173.242.112.53 -addnode=178.79.147.99 -addnode=184.106.111.41 -addnode=91.85.220.84 -addnode=173.224.125.222 -addnode=86.5.50.90

Hit return.

Wait.  

You should see connections.

Someone correct me if I am wrong.  :)


Title: Re: bitcoin not connected (after 129686 blocks)?
Post by: mewantsbitcoins on June 10, 2011, 01:13:07 AM
Not entirely. People usually drag Bitcoin.app to their /Applications/ folder so there's no need for bitcoin-0.3.21/ in front
http://forum.bitcoin.org/index.php?topic=14242.0


Title: Re: bitcoin not connected (after 129686 blocks)?
Post by: sequence on June 10, 2011, 01:20:19 AM
I have had this issue for a while now. The only way I am able to connect and add new blocks is by backing up my wallet.dat file.  Then I delete the bitcoin client completely from my computer then I re-install the client, add my wallet again and the blocks start to download. As long as you backup your wallet your transactions will appear.  If they do not you can use -rescan and they will show up.


Title: Re: bitcoin not connected (after 129686 blocks)?
Post by: sieler on June 10, 2011, 01:21:40 AM
Check current block status...


bitcoin-0.3.21/Bitcoin.app/contents/macos/bitcoin -addnode=69.164.218.197 -addnode=64.22.103.150 -addnode=173.242.112.53 -addnode=178.79.147.99 -addnode=184.106.111.41 -addnode=91.85.220.84 -addnode=173.224.125.222 -addnode=86.5.50.90


Interesting...that gets me five connections, although it still doesn't seem to start using CPU again.
If I terminate the above and re-run via standard Mac "double-click-on-app", bitcoin starts up and
I'm now seeing 1 connection (instead of none) ... but still no CPU use.

thanks,

Stan


Title: Re: bitcoin not connected (after 129686 blocks)?
Post by: phillipsjk on June 10, 2011, 02:26:02 AM
If you want to generate, you need to use the "-gen" command-line option.

It has been decided that mining should be de-emphasised for the average user.

With the dangerous concentration of mining with the deepbit mining pool, I have been personally been convinced the average user should still mine at 1-5% of CPU time. I don't think the client supports this.


Title: Re: bitcoin not connected (after 129686 blocks)?
Post by: MarketNeutral on June 10, 2011, 03:20:24 AM
I have the same issue, and it's annoying–––running terminal and pasting the same command every time I want to run the client. I don't mind, because I have a soft spot for command line interfaces, but most Mac users would cringe at having to do this EVERY SINGLE TIME they want to run the client.



Title: Re: bitcoin not connected (after 129686 blocks)?
Post by: phillipsjk on June 10, 2011, 04:01:31 AM
Code:
#!/bin/sh
./bitcoin -gen -datadir=/path/to/datastorage


Title: Re: bitcoin not connected (after 129686 blocks)?
Post by: MoonShadow on June 10, 2011, 04:28:18 AM
I suspect that there is an attack of the p2p network itself underway.  Use the -addnode= switch and some fallback node IP addresses.  Better yet, use the -connect= switch with several nodes and the -noirc switch to not announce your IP address on the irc bootstrapping channel.  I suspect, but cannot verify, that IP numbers that show up on the irc bootstrapping channel are getting cut off somehow.


Title: Re: bitcoin not connected (after 129686 blocks)?
Post by: benjamindees on June 10, 2011, 12:07:59 PM
I think so too.  I'm using the following script to "mine" my addr.dat for valid nodes, and then connecting manually.

Code:
#!/bin/bash
#
# Checks addresses in addr.dat file
#  by pinging and then connecting to Bitcoin port
#

FILE="addr.dat"

db4.6_dump "$FILE" | grep -o '........208d$' | sed 's/208d$//' | sort -u | sort -R |

while read LINE
do
 if
  IP="$(ping -c2 "0x$LINE" | head -1 | egrep -o '\([0-9]+.[0-9]+.[0-9]+.[0-9]+\)' | tr -d '(' | tr -d ')')"
 then
#  echo "$IP responds, checking for Bitcoin..."
  if
   OUTPUT="$(nmap -p 8333 "$IP"|grep open &>/dev/null)"
  then
   echo -n " -addnode=$IP"
  fi
 fi
done

And this is what I get at the moment:

Code:
bitcoin -addnode=212.18.43.59 -addnode=82.181.125.210 -addnode=76.11.66.168 -addnode=129.186.116.7 -addnode=91.121.79.35 -addnode=109.169.46.223 -addnode=12.47.47.47 -noirc &