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)
2018-04-29 14:41:29 InitParameterInteraction: parameter interaction: -whitelistforcerelay=1 -> setting -whitelistrelay=1
2018-04-29 14:41:29 Assuming ancestors of block 0000000000000000005214481d2d96f898e3d5416e43359c145944a909d242e0 have valid signatures.
2018-04-29 14:41:29 Setting nMinimumChainWork=0000000000000000000000000000000000000000000000000000000100010001
2018-04-29 14:41:29 Using the 'sse4' SHA256 implementation
2018-04-29 14:41:29 Using RdRand as an additional entropy source
2018-04-29 14:41:29 Default data directory /home/zhq/.bitcoin
2018-04-29 14:41:29 Using data directory /home/zhq/.bitcoin
2018-04-29 14:41:29 Using config file /home/zhq/.bitcoin/bitcoin.conf
2018-04-29 14:41:29 Using at most 125 automatic connections (1024 file descriptors available)
2018-04-29 14:41:29 Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
2018-04-29 14:41:29 Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
2018-04-29 14:41:29 Using 2 threads for script verification
2018-04-29 14:41:29 scheduler thread start
2018-04-29 14:41:29 Binding RPC on address 0.0.0.0 port 8962 failed.
2018-04-29 14:41:29 HTTP: creating work queue of depth 16
2018-04-29 14:41:29 Starting RPC
2018-04-29 14:41:29 Starting HTTP RPC server
2018-04-29 14:41:29 Config options rpcuser and rpcpassword will soon be deprecated. Locally-run instances may remove rpcuser to use cookie-based auth, or may be replaced with rpcauth. Please see share/rpcuser for rpcauth auth generation.
2018-04-29 14:41:29 HTTP: starting 4 worker threads
2018-04-29 14:41:29 Using wallet directory /home/zhq/.bitcoin
2018-04-29 14:41:29 init message: Verifying wallet(s)...
2018-04-29 14:41:29 Using BerkeleyDB version Berkeley DB 4.8.30: (April 9, 2010)
2018-04-29 14:41:29 Using wallet wallet.dat
2018-04-29 14:41:29 CDBEnv::Open: LogDir=/home/zhq/.bitcoin/database ErrorFile=/home/zhq/.bitcoin/db.log
2018-04-29 14:41:29 Cache configuration:
2018-04-29 14:41:29 * Using 2.0MiB for block index database
2018-04-29 14:41:29 * Using 8.0MiB for chain state database
2018-04-29 14:41:29 * Using 440.0MiB for in-memory UTXO set (plus up to 286.1MiB of unused mempool space)
2018-04-29 14:41:29 init message: Loading block index...
2018-04-29 14:41:29 Opening LevelDB in /home/zhq/.bitcoin/blocks/index
2018-04-29 14:41:29 Opened LevelDB successfully
2018-04-29 14:41:29 Using obfuscation key for /home/zhq/.bitcoin/blocks/index: 0000000000000000
2018-04-29 14:41:29 LoadBlockIndexDB: last block file = 0
2018-04-29 14:41:29 LoadBlockIndexDB: last block file info: CBlockFileInfo(blocks=1, size=305, heights=0...0, time=2018-04-18...2018-04-18)
2018-04-29 14:41:29 Checking all blk files are present...
2018-04-29 14:41:29 LoadBlockIndexDB: transaction index disabled
2018-04-29 14:41:29 Opening LevelDB in /home/zhq/.bitcoin/chainstate
2018-04-29 14:41:29 Opened LevelDB successfully
2018-04-29 14:41:29 Using obfuscation key for /home/zhq/.bitcoin/chainstate: d5db8947d9371fc8
2018-04-29 14:41:29 Loaded best chain: hashBestChain=00000000ad913538b8764573d00c3eb4a87723e11d8bd008f9125246c58e0252 height=0 date=2018-04-18 03:12:39 progress=0.000000
2018-04-29 14:41:29 init message: Rewinding blocks...
2018-04-29 14:41:29 init message: Verifying blocks...
2018-04-29 14:41:29 block index 21ms
2018-04-29 14:41:29 init message: Loading wallet...
2018-04-29 14:41:29 nFileVersion = 160000
2018-04-29 14:41:29 Keys: 2001 plaintext, 0 encrypted, 2001 w/ metadata, 2001 total
2018-04-29 14:41:29 wallet 25ms
2018-04-29 14:41:29 setKeyPool.size() = 2000
2018-04-29 14:41:29 mapWallet.size() = 0
2018-04-29 14:41:29 mapAddressBook.size() = 0
2018-04-29 14:41:29 mapBlockIndex.size() = 1
2018-04-29 14:41:29 nBestHeight = 0
2018-04-29 14:41:29 Imported mempool transactions from disk: 0 succeeded, 0 failed, 0 expired, 0 already there
2018-04-29 14:41:29 Bound to [::]:8963
2018-04-29 14:41:29 Bound to 0.0.0.0:8963
2018-04-29 14:41:29 init message: Loading P2P addresses...
2018-04-29 14:41:29 torcontrol thread start
2018-04-29 14:41:29 Loaded 1191 addresses from peers.dat 3ms
2018-04-29 14:41:29 init message: Loading banlist...
2018-04-29 14:41:29 init message: Starting network threads...
2018-04-29 14:41:29 net thread start
2018-04-29 14:41:29 init message: Done loading
2018-04-29 14:41:29 opencon thread start
2018-04-29 14:41:29 msghand thread start
2018-04-29 14:41:29 addcon thread start
2018-04-29 14:41:29 dnsseed thread start
2018-04-29 14:41:30 connect() to [2600:3c02::f03c:91ff:fe8e:bcd9]:8333 failed after select(): Connection refused (111)
2018-04-29 14:41:31 connect() to [2001:0:9d38:6abd:180b:29be:3429:fede]:8333 failed after select(): Connection refused (111)
2018-04-29 14:41:31 connect() to [2001:0:9d38:6abd:180b:29be:3429:fede]:8333 failed after select(): Connection refused (111)
2018-04-29 14:41:37 connect() to [2001:0:9d38:953c:3445:1bcb:b8b5:9653]:8333 failed after select(): Connection refused (111)
2018-04-29 14:41:37 ThreadRPCServer method=getblocktemplate
2018-04-29 14:41:39 ThreadRPCServer method=getblocktemplate
2018-04-29 14:41:40 Loading addresses from DNS seeds (could take a while)
2018-04-29 14:41:40 0 addresses found from DNS seeds
2018-04-29 14:41:40 dnsseed thread exit
2018-04-29 14:41:43 connect() to [2001:0:9d38:6ab8:d3:69e:d0a0:1b73]:8333 failed after select(): Connection refused (111)
2018-04-29 14:41:43 connect() to [2001:0:5ef5:79fb:2851:c:524c:a180]:8333 failed after select(): Connection refused (111)
2018-04-29 14:41:44 connect() to [2001:0:9d38:6ab8:878:21cf:2b5b:2860]:8333 failed after select(): Connection refused (111)
2018-04-29 14:41:45 connect() to [2a01:4f8:140:524a::2]:8333 failed after select(): Connection refused (111)
2018-04-29 14:41:46 connect() to [2002:d917:d95::d917:d95]:8333 failed after select(): Connection refused (111)
2018-04-29 14:41:47 connect() to [2a03:b0c0:3:d0::23fb:6001]:8333 failed after select(): Connection refused (111)
2018-04-29 14:41:47 connect() to [2001:41f0:61:0:72f3:95ff:fe09:7521]:8333 failed after select(): Connection refused (111)
2018-04-29 14:41:48 connect() to [2a03:b0c0:3:d0::44b9:4001]:8333 failed after select(): Connection refused (111)
2018-04-29 14:41:48 connect() to [2001:0:9d38:90d7:3c2c:10a4:bbfa:e09d]:8333 failed after select(): Connection refused (111)
2018-04-29 14:41:49 connect() to [2a02:c207:2002:9013::1]:8333 failed after select(): Connection refused (111)
2018-04-29 14:41:49 connect() to [2001:0:9d38:6ab8:183d:3649:b8f5:35d9]:8333 failed after select(): Connection refused (111)
2018-04-29 14:41:50 connect() to [2a00:ee2:1200:1900:20c:29ff:fe81:a0a3]:8333 failed after select(): Connection refused (111)
2018-04-29 14:41:50 connect() to [2601:186:c100:6bcd:16bd:cea1:235d:1c19]:8333 failed after select(): Connection refused (111)
2018-04-29 14:41:52 connect() to [2400:dd01:1034:e00:f21f:afff:fedc:164d]:8333 failed after select(): Connection refused (111)
2018-04-29 14:41:53 connect() to [2a01:680:10:10::1]:8333 failed after select(): Connection refused (111)
2018-04-29 14:41:53 connect() to [2001:0:9d38:6abd:1c96:24dc:a753:d6f2]:8333 failed after select(): Connection refused (111)
2018-04-29 14:42:06 connect() to [2001:0:9d38:6ab8:868:1baa:b174:b764]:8333 failed after select(): Connection refused (111)
2018-04-29 14:42:06 connect() to [2001:0:9d38:6abd:9e:3294:c2b5:67d7]:8333 failed after select(): Connection refused (111)
2018-04-29 14:42:07 connect() to [2001:0:4137:9e76:3424:211:b600:b4cb]:8333 failed after select(): Connection refused (111)
2018-04-29 14:42:07 connect() to [2002:b4b2:3612::b4b2:3612]:8333 failed after select(): Connection refused (111)
2018-04-29 14:42:08 connect() to [2001:0:9d38:6abd:3470:346d:af23:d41b]:8333 failed after select(): Connection refused (111)
2018-04-29 14:42:09 connect() to [2604:a880:400:d0::2004:c001]:8333 failed after select(): Connection refused (111)
2018-04-29 14:42:10 connect() to [2001:980:231b:1:8e89:a5ff:fee3:f8be]:8333 failed after select(): Connection refused (111)
2018-04-29 14:42:10 connect() to [2002:9247:4cec::9247:4cec]:8333 failed after select(): Connection refused (111)
2018-04-29 14:42:11 connect() to [2a02:c205:2008:272::1]:8333 failed after select(): Connection refused (111)
2018-04-29 14:42:12 connect() to [2600:1f18:609f:da02:b283:b16e:aac4:749f]:8333 failed after select(): Connection refused (111)
2018-04-29 14:42:19 connect() to [2001:0:9d38:6abd:2436:3c96:91e9:2de3]:8333 failed after select(): Connection refused (111)
2018-04-29 14:42:19 connect() to [2001:0:9d38:90d7:34f3:3584:d0a4:aa5]:8333 failed after select(): Connection refused (111)
2018-04-29 14:42:37 connect() to [2a01:4f8:10a:3fe4::2]:8333 failed after select(): Connection refused (111)
2018-04-29 14:42:38 connect() to 208.100.137.204:8333 failed after select(): Connection refused (111)
2018-04-29 14:42:39 connect() to [2001:0:9d38:78cf:3cb3:2773:4da3:d4c]:8333 failed after select(): Connection refused (111)
2018-04-29 14:42:40 connect() to 99.198.237.76:8333 failed after select(): Connection refused (111)
2018-04-29 14:42:41 connect() to [2a01:4f8:171:d4a::2]:8333 failed after select(): Connection refused (111)
2018-04-29 14:42:43 connect() to [2001:0:5ef5:79fb:281c:2085:518d:9c97]:8333 failed after select(): Connection refused (111)
2018-04-29 14:42:49 connect() to [2a02:7b40:50d0:e335::1]:8333 failed after select(): Connection refused (111)
2018-04-29 14:42:49 connect() to [2001:0:9d38:6ab8:2436:3c78:431d:d559]:8333 failed after select(): Connection refused (111)
2018-04-29 14:42:50 connect() to [2001:0:9d38:6abd:109f:379e:aeff:3957]:8333 failed after select(): Connection refused (111)
2018-04-29 14:42:50 connect() to [2606:df00:7:4:4caa:2c79:b619:27c9]:8333 failed after select(): Connection refused (111)