RPC server not started? (error: couldn't connect to server)


#1

Hey!

peercoind is running and seems to be working just fine when I read debug.log. However, when I try to use peercoin-cli to get some information I always get error: couldn't connect to server. I’ve tried to search a solution for hours but I can’t find anything relevant.

Here is an excerpt of debug.log from the most recent start to the last message:

2019-03-10 00:21:17 Peercoin version v0.7.1.0-g5d575017586 ()
2019-03-10 00:21:17 Using OpenSSL version OpenSSL 1.1.0j  20 Nov 2018
2019-03-10 00:21:17 Default data directory /home/users/david/.peercoin
2019-03-10 00:21:17 Using data directory /home/users/david/.peercoin
2019-03-10 00:21:17 Using at most 125 connections (1024 file descriptors available)
2019-03-10 00:21:17 Using 4 threads for script verification
2019-03-10 00:21:17 init message: Verifying wallet...
2019-03-10 00:21:17 dbenv.open LogDir=/home/users/david/.peercoin/database ErrorFile=/home/users/david/.peercoin/db.log
2019-03-10 00:21:17 Bound to [::]:9901
2019-03-10 00:21:17 Bound to 0.0.0.0:9901
2019-03-10 00:21:17 init message: Loading block index...
2019-03-10 00:21:17 Opening LevelDB in /home/users/david/.peercoin/blocks/index
2019-03-10 00:21:17 Opened LevelDB successfully
2019-03-10 00:21:17 Opening LevelDB in /home/users/david/.peercoin/chainstate
2019-03-10 00:21:19 Opened LevelDB successfully
2019-03-10 00:21:19 Peercoin Network: genesis=0x0000000032fe677166d5 nBitsLimit=0x1d00ffff nBitsInitial=0x1c00ffff nStakeMinAge=2592000 nCoinbaseMaturity=500 nModifierInterval=21600
2019-03-10 00:21:43 LoadBlockIndexDB(): last block file = 4
2019-03-10 00:21:43 LoadBlockIndexDB(): last block file info: CBlockFileInfo(blocks=35768, size=25875059, heights=383146...418892, time=2018-08-24...2019-03-10)
2019-03-10 00:21:43 LoadBlockIndexDB(): synchronized checkpoint 0000000032fe677166d54963b62a4677d8957e87c508eaa4fd7eb1c880cd27e3
2019-03-10 00:21:43 LoadBlockIndexDB(): transaction index enabled
2019-03-10 00:21:43 LoadBlockIndexDB(): hashBestChain=00000000000000009a0cea731861724881c5285b156c102f1aa2c5cbbe82b457  height=418892 date=2019-03-10 00:09:05
2019-03-10 00:21:43 init message: Verifying blocks...
2019-03-10 00:21:43 Verifying last 288 blocks at level 3
2019-03-10 00:21:45 No coin database inconsistencies in last 289 blocks (727 transactions)
2019-03-10 00:21:45  block index           27741ms
2019-03-10 00:21:45 init message: Loading wallet...
2019-03-10 00:21:49 nFileVersion = 80600
2019-03-10 00:21:49  wallet                 4151ms
2019-03-10 00:21:49 init message: Loading addresses...
2019-03-10 00:21:49 Loaded 9486 addresses from peers.dat  57ms
2019-03-10 00:21:49 mapBlockIndex.size() = 418998
2019-03-10 00:21:49 nBestHeight = 418892
2019-03-10 00:21:49 setKeyPool.size() = 101
2019-03-10 00:21:49 mapWallet.size() = 3
2019-03-10 00:21:49 mapAddressBook.size() = 3
2019-03-10 00:21:49 AddLocal([2a02:a03f:4818:cf00:8274:9f46:3dde:2b21]:9901,1)
2019-03-10 00:21:49 IPv6 eth0: 2a02:a03f:4818:cf00:8274:9f46:3dde:2b21
2019-03-10 00:21:49 dnsseed thread start
2019-03-10 00:21:49 Loading addresses from DNS seeds (could take a while)
2019-03-10 00:21:49 net thread start
2019-03-10 00:21:49 dumpaddr thread start
2019-03-10 00:21:49 ThreadStakeMinter started
2019-03-10 00:21:49 CPUMiner started for proof-of-stake
2019-03-10 00:21:49 init message: Done loading
2019-03-10 00:21:49 addcon thread start
2019-03-10 00:21:49 opencon thread start
2019-03-10 00:21:49 msghand thread start
2019-03-10 00:21:49 GetMyExternalIP() received [109.128.105.159] 109.128.105.159:0
2019-03-10 00:21:49 GetMyExternalIP() returned 109.128.105.159
2019-03-10 00:21:49 AddLocal(109.128.105.159:9901,4)
2019-03-10 00:21:49 Added 2 addresses from ::: 8 tried, 9478 new
2019-03-10 00:21:50 Added 2 addresses from ::: 8 tried, 9479 new
2019-03-10 00:21:50 trying connection 151.40.78.83:9901 lastseen=169.3hrs
2019-03-10 00:21:50 Added 4 addresses from ::: 8 tried, 9481 new
2019-03-10 00:21:50 106 addresses found from DNS seeds
2019-03-10 00:21:50 dnsseed thread exit
2019-03-10 00:21:55 connection timeout
2019-03-10 00:21:55 trying connection [2a02:2f07:d806:c000:5124:b4d6:34f9:7b0c]:9901 lastseen=0.2hrs
2019-03-10 00:21:55 connected [2a02:2f07:d806:c000:5124:b4d6:34f9:7b0c]:9901
2019-03-10 00:21:55 send version message: version 70002, blocks=418892, us=[2a02:a03f:4818:cf00:8274:9f46:3dde:2b21]:9901, them=[2a02:2f07:d806:c000:5124:b4d6:34f9:7b0c]:9901, peer=[2a02:2f07:d806:c000:5124:b4d6:34f9:7b0c]:9901
2019-03-10 00:21:55 Added time data, samples 2, offset -3 (+0 minutes)
2019-03-10 00:21:55 receive version message: /Satoshi:0.8.6/Peercoin:0.7.1v0.7.1ppc/: version 70002, blocks=418892, us=[2a02:a03f:4818:cf00:8274:9f46:3dde:2b21]:53534, them=[2a02:2f07:d806:c000:5124:b4d6:34f9:7b0c]:9901, peer=[2a02:2f07:d806:c000:5124:b4d6:34f9:7b0c]:9901
2019-03-10 00:21:56 trying connection 92.37.147.82:9901 lastseen=6.3hrs
2019-03-10 00:21:57 Added 598 addresses from 2a02:2f07:d806:c000:5124:b4d6:34f9:7b0c: 8 tried, 9505 new
2019-03-10 00:21:57 Added 647 addresses from 2a02:2f07:d806:c000:5124:b4d6:34f9:7b0c: 8 tried, 9460 new
2019-03-10 00:21:57 Added 137 addresses from 2a02:2f07:d806:c000:5124:b4d6:34f9:7b0c: 8 tried, 9457 new
2019-03-10 00:22:01 connection timeout
2019-03-10 00:22:01 trying connection 151.55.155.68:9901 lastseen=4.7hrs
2019-03-10 00:22:03 connected 151.55.155.68:9901
2019-03-10 00:22:03 send version message: version 70002, blocks=418892, us=109.128.105.159:9901, them=151.55.155.68:9901, peer=151.55.155.68:9901
2019-03-10 00:22:03 trying connection 188.68.40.28:9901 lastseen=0.2hrs
2019-03-10 00:22:03 connected 188.68.40.28:9901
2019-03-10 00:22:03 send version message: version 70002, blocks=418892, us=109.128.105.159:9901, them=188.68.40.28:9901, peer=188.68.40.28:9901
2019-03-10 00:22:03 Added time data, samples 3, offset +0 (+0 minutes)
2019-03-10 00:22:03 receive version message: /Satoshi:0.8.6/Peercoin:0.6.4v0.6.4ppc/: version 70001, blocks=418892, us=109.128.105.159:37606, them=188.68.40.28:9901, peer=188.68.40.28:9901
2019-03-10 00:22:04 trying connection 80.110.85.108:9901 lastseen=465.0hrs
2019-03-10 00:22:04 Added time data, samples 4, offset +3 (+0 minutes)
2019-03-10 00:22:04 Moving 151.55.155.68:9901 to tried
2019-03-10 00:22:04 receive version message: /Satoshi:0.8.6/Peercoin:0.6.4v0.6.4ppc/: version 70001, blocks=418892, us=109.128.105.159:44026, them=151.55.155.68:9901, peer=151.55.155.68:9901
2019-03-10 00:22:08 Added 689 addresses from 151.55.155.68: 9 tried, 9629 new
2019-03-10 00:22:08 Added 743 addresses from 188.68.40.28: 9 tried, 9591 new
2019-03-10 00:22:08 Added 760 addresses from 188.68.40.28: 9 tried, 9556 new
2019-03-10 00:22:08 Added 397 addresses from 188.68.40.28: 9 tried, 9568 new
2019-03-10 00:22:09 connection timeout
2019-03-10 00:22:09 trying connection 213.127.23.55:9901 lastseen=422.2hrs
2019-03-10 00:22:10 Added 707 addresses from 151.55.155.68: 9 tried, 9717 new
2019-03-10 00:22:10 Added 353 addresses from 151.55.155.68: 9 tried, 9789 new
2019-03-10 00:22:14 connection timeout
2019-03-10 00:22:15 trying connection [2604:a880:400:d1::783:1001]:9901 lastseen=0.2hrs
2019-03-10 00:22:15 connected [2604:a880:400:d1::783:1001]:9901
2019-03-10 00:22:15 send version message: version 70002, blocks=418892, us=[2a02:a03f:4818:cf00:8274:9f46:3dde:2b21]:9901, them=[2604:a880:400:d1::783:1001]:9901, peer=[2604:a880:400:d1::783:1001]:9901
2019-03-10 00:22:15 Added time data, samples 5, offset +0 (+0 minutes)
2019-03-10 00:22:15 nTimeOffset = +0  (+0 minutes)
2019-03-10 00:22:15 receive version message: /Satoshi:0.8.6/Peercoin:0.7.1v0.7.1ppc/: version 70002, blocks=418892, us=[2a02:a03f:4818:cf00:8274:9f46:3dde:2b21]:54608, them=[2604:a880:400:d1::783:1001]:9901, peer=[2604:a880:400:d1::783:1001]:9901
2019-03-10 00:22:15 trying connection 79.168.204.34:9901 lastseen=10.2hrs
2019-03-10 00:22:15 connected 79.168.204.34:9901
2019-03-10 00:22:15 send version message: version 70002, blocks=418892, us=109.128.105.159:9901, them=79.168.204.34:9901, peer=79.168.204.34:9901
2019-03-10 00:22:16 Added 700 addresses from 2604:a880:400:d1::783:1001: 9 tried, 9754 new
2019-03-10 00:22:16 Added time data, samples 6, offset +0 (+0 minutes)
2019-03-10 00:22:16 Moving 79.168.204.34:9901 to tried
2019-03-10 00:22:16 receive version message: /Satoshi:0.8.6/Peercoin:0.7.0v0.7.0ppc/: version 70002, blocks=418892, us=109.128.105.159:60362, them=79.168.204.34:9901, peer=79.168.204.34:9901
2019-03-10 00:22:16 Added 708 addresses from 2604:a880:400:d1::783:1001: 10 tried, 9714 new
2019-03-10 00:22:16 Added 365 addresses from 2604:a880:400:d1::783:1001: 10 tried, 9690 new
2019-03-10 00:22:16 trying connection 199.193.14.118:9901 lastseen=253.3hrs
2019-03-10 00:22:19 Added 721 addresses from 79.168.204.34: 10 tried, 9806 new
2019-03-10 00:22:19 Added 710 addresses from 79.168.204.34: 10 tried, 9911 new
2019-03-10 00:22:19 Added 380 addresses from 79.168.204.34: 10 tried, 9965 new
2019-03-10 00:22:21 connection timeout
2019-03-10 00:22:21 trying connection 65.185.183.150:9901 lastseen=324.7hrs
2019-03-10 00:22:26 connection timeout
2019-03-10 00:22:27 trying connection 1.233.82.114:9901 lastseen=197.6hrs
2019-03-10 00:22:27 connect() failed after select(): Connection refused
2019-03-10 00:22:28 trying connection 84.249.25.157:9901 lastseen=10.4hrs
2019-03-10 00:22:33 connection timeout
2019-03-10 00:22:33 trying connection 209.239.123.108:9901 lastseen=0.2hrs
2019-03-10 00:22:33 connected 209.239.123.108:9901
2019-03-10 00:22:33 send version message: version 70002, blocks=418892, us=109.128.105.159:9901, them=209.239.123.108:9901, peer=209.239.123.108:9901
2019-03-10 00:22:34 Added time data, samples 7, offset -1 (+0 minutes)
2019-03-10 00:22:34 nTimeOffset = +0  (+0 minutes)
2019-03-10 00:22:34 receive version message: /Satoshi:0.8.6/Peercoin:0.6.3v0.6.3ppc/: version 70001, blocks=418892, us=109.128.105.159:46252, them=209.239.123.108:9901, peer=209.239.123.108:9901
2019-03-10 00:22:34 trying connection 86.22.12.111:9901 lastseen=2.0hrs
2019-03-10 00:22:34 connected 86.22.12.111:9901
2019-03-10 00:22:34 send version message: version 70002, blocks=418892, us=109.128.105.159:9901, them=86.22.12.111:9901, peer=86.22.12.111:9901
2019-03-10 00:22:34 Added time data, samples 8, offset +0 (+0 minutes)
2019-03-10 00:22:34 Moving 86.22.12.111:9901 to tried
2019-03-10 00:22:34 receive version message: /Satoshi:0.8.6/Peercoin:0.6.1v0.6.1ppc/: version 70001, blocks=418892, us=109.128.105.159:52288, them=86.22.12.111:9901, peer=86.22.12.111:9901
2019-03-10 00:22:34 trying connection 27.34.16.47:9901 lastseen=407.5hrs
2019-03-10 00:22:37 Added 702 addresses from 209.239.123.108: 11 tried, 9925 new
2019-03-10 00:22:37 Added 745 addresses from 209.239.123.108: 11 tried, 9886 new
2019-03-10 00:22:37 Added 379 addresses from 209.239.123.108: 11 tried, 9874 new
2019-03-10 00:22:39 connection timeout
2019-03-10 00:22:40 trying connection 92.210.86.251:9901 lastseen=5.1hrs
2019-03-10 00:22:43 Added 681 addresses from 86.22.12.111: 11 tried, 10093 new
2019-03-10 00:22:43 Added 689 addresses from 86.22.12.111: 11 tried, 10297 new
2019-03-10 00:22:43 Added 352 addresses from 86.22.12.111: 11 tried, 10393 new
2019-03-10 00:22:45 connection timeout
2019-03-10 00:22:45 trying connection 80.109.190.206:9901 lastseen=7.7hrs
2019-03-10 00:22:45 connected 80.109.190.206:9901
2019-03-10 00:22:45 send version message: version 70002, blocks=418892, us=109.128.105.159:9901, them=80.109.190.206:9901, peer=80.109.190.206:9901
2019-03-10 00:22:46 Added time data, samples 9, offset +0 (+0 minutes)
2019-03-10 00:22:46 nTimeOffset = +0  (+0 minutes)
2019-03-10 00:22:46 Moving 80.109.190.206:9901 to tried
2019-03-10 00:22:46 receive version message: /Satoshi:0.8.6/Peercoin:0.6.1v0.6.1.0g8c9f8b589bb/: version 70001, blocks=418892, us=109.128.105.159:56152, them=80.109.190.206:9901, peer=80.109.190.206:9901
2019-03-10 00:22:47 Added 702 addresses from 80.109.190.206: 12 tried, 10657 new
2019-03-10 00:22:47 Added 703 addresses from 80.109.190.206: 12 tried, 10882 new
2019-03-10 00:22:47 Added 346 addresses from 80.109.190.206: 12 tried, 10984 new
2019-03-10 00:28:12 ResendWalletTransactions()
2019-03-10 00:31:29 received block 000000000000000063ee78c2a62f2de2a9b2ec6ba5dde78dbb7e44e8f905b450
2019-03-10 00:31:29 Committing 978 changed transactions to coin database...
2019-03-10 00:31:29 SetBestChain: new best=000000000000000063ee78c2a62f2de2a9b2ec6ba5dde78dbb7e44e8f905b450  height=418893  log2_trust=53.571515  moneysupply=25250710.170764  tx=1603235  date=2019-03-10 00:20:20 progress=0.999993
2019-03-10 00:31:29 SetBestChain: 3 of last 100 blocks above version 2
2019-03-10 00:31:29 ProcessBlock: ACCEPTED
2019-03-10 00:31:29 getblocks -1 to 0000000000000000000000000000000000000000000000000000000000000000 limit 500
2019-03-10 00:31:29 getblocks -1 to 0000000000000000000000000000000000000000000000000000000000000000 limit 500
2019-03-10 00:31:30 getblocks -1 to 0000000000000000000000000000000000000000000000000000000000000000 limit 500
2019-03-10 00:33:26 AcceptToMemoryPool: 209.239.123.108:9901 /Satoshi:0.8.6/Peercoin:0.6.3v0.6.3ppc/ : accepted aff62ca279dcbba4f4aeebd5c9ddad20fe4ddd790a5578f54542b8a63f6ba760 (poolsz 1)

And here is peercoin.conf:

rpcuser=peercoinrpc
rpcpassword=<yadayada-this-isn't-my-real-password>
rpcport=54454

Something I noticed: there is no mention at all of RPC or 54454 in the log nor does netstat -an show any connections with port 54454, thus I think the RPC server isn’t being started for some reason.

Any help would be greatly appreciated!
David


#2

Welp, I just fixed it by adding server=1 to the config file :man_facepalming:

I wonder why it wasn’t necessary previously though :confused: