I have created two nodes and connected the 1st node with the 2nd node in regtest mode . Now when I make the getblocktemplate command using bitcoin-cli . It fails with bitcoin is downloading the block.
 
Bitcoin core vs v0.16

_admin1@root:~/Projects/bitcoin$ ./src/bitcoin-cli -regtest -port=8333 -rpcport=8332 -rpcuser=test -rpcpassword=test getconnectioncount_
**1**
_admin1@root:~/Projects/bitcoin$ ./src/bitcoin-cli -regtest -port=8333 -rpcport=8332 -rpcuser=test -rpcpassword=test getblocktemplate_
**error code: -10
error message:
Bitcoin is downloading blocks.**
horizon_result.pushKV("decay", buckets.decay);
            horizon_result.pushKV("scale", (int)buckets.scale);
            horizon_result.pushKV("fail", failbucket);
            errors.push_back("Insufficient data or no feerate found which meets threshold");
            horizon_result.pushKV("errors",errors);
        }
        result.pushKV(StringForFeeEstimateHorizon(horizon), horizon_result);
    }
    return result;
}
static const CRPCCommand commands[] =
{ 
  
    { "mining",             "getnetworkhashps",       &getnetworkhashps,       {"nblocks","height"} },
    { "mining",             "getmininginfo",          &getmininginfo,          {} },
    { "mining",             "prioritisetransaction",  &prioritisetransaction,  {"txid","dummy","fee_delta"} },
    { "mining",             "getblocktemplate",       &getblocktemplate,       {"template_request"} },
    { "mining",             "submitblock",            &submitblock,            {"hexdata","dummy"} },
    { "mining",             "submitheader",           &submitheader,           {"hexdata"} },
    { "generating",         "generatetoaddress",      &generatetoaddress,      {"nblocks","address","maxtries"} },
    { "util",               "estimatesmartfee",       &estimatesmartfee,       {"conf_target", "estimate_mode"} },
    { "hidden",             "estimaterawfee",         &estimaterawfee,         {"conf_target", "threshold"} },
};
void RegisterMiningRPCCommands(CRPCTable &t)
{
    for (unsigned int vcidx = 0; vcidx < ARRAYLEN(commands); vcidx++)
        t.appendCommand(commands[vcidx].name, &commands[vcidx]);
}