Thank you very much for your reply.
Run ./bitcoin-cli getblocktemplate , I got following:
error code: -9
error message:
Bitcoin is not connected!
In debug log:
2018-04-29 14:41:29 Bitcoin Core version v0.16.0.0-9ea62a3dc-dirty (release build)
Oh, sorry I forgot to mention, in order to mine, the node has to connect to at least one peer node. So you need to run another instance of bitcoind and let it connect to the first node, like:
bitcoind -addnode=127.0.0.1:6333 -port=9333 -rpcport=9332 .... other arguments
replace 6333 with your first node's port.
After this, try restart the miner again.
Also from the debug.log you posted, it looks you didn't remove the dns seeds servers, that's ok, you can add "-dns=0 -dnsseed=0" to bitcoind command line arguments to disable them. If you are running your private network, there is no point to connect to public bitcoin nodes.