user60481: I am very new to bitcoin but finally managed to get it all installed and compiled. I am following along with Mastering Bitcoin.
There is an example to use getrawtransaction as follows:
bitcoin-cli getrawtransaction  0627052b6f28912f2703066a912ea577f2ce4da4caa5a5fbd8a57286c345c2f2.
I get the error no such mempool transaction. Using block explorer, this transaction appears in block 277316. 
I noticed that when I run bitcoin-cli getblockcount, I only get 180024, which was mined in 2012. Why am I getting such old data?

user208: 
I get the error no such mempool transaction. Using block explorer, this transaction appears in block 277316. 

Unless you're running with the -txindex command line option, or a txindex=1 line in your bitcoin.conf file, getrawtransaction only works for mempool transactions (not transactions already in the blockchain).

I noticed that when I run bitcoin-cli getblockcount, I only get 180024, which was mined in 2012. Why am I getting such old data?

Presumably your bitcoind is still synchronizing with the network. This may take hours (or even days, on slow hardware).

60481: <p>I am very new to bitcoin but finally managed to get it all installed and compiled. I am following along with Mastering Bitcoin.</p>

<p>There is an example to use <code>getrawtransaction</code> as follows:</p>

<p><code>bitcoin-cli getrawtransaction  0627052b6f28912f2703066a912ea577f2ce4da4caa5a5fbd8a57286c345c2f2</code>.</p>

<p>I get the error <code>no such mempool transaction</code>. Using block explorer, this transaction appears in block 277316. </p>

<p>I noticed that when I run <code>bitcoin-cli getblockcount</code>, I only get 180024, which was mined in 2012. Why am I getting such old data?</p>
 208: <blockquote>
  <p>I get the error no such mempool transaction. Using block explorer, this transaction appears in block 277316. </p>
</blockquote>

<p>Unless you're running with the <code>-txindex</code> command line option, or a <code>txindex=1</code> line in your <code>bitcoin.conf</code> file, <code>getrawtransaction</code> only works for mempool transactions (not transactions already in the blockchain).</p>

<blockquote>
  <p>I noticed that when I run bitcoin-cli getblockcount, I only get 180024, which was mined in 2012. Why am I getting such old data?</p>
</blockquote>

<p>Presumably your <code>bitcoind</code> is still synchronizing with the network. This may take hours (or even days, on slow hardware).</p>
