How to: Peerbox Support Thread (Updated to v0.6.1)


#183

Having the same issue.
I’m not finding any files in ~./ppcoin besides the conf file


#184

Is there a ~/.peercoin directory?


#185

Yes, I found it and checked the error log.
Looks like it’s just syncing the blockchain?

2017-12-25 06:18:50 ProcessBlock: ACCEPTED
2017-12-25 06:18:50 received block 0901af8808ba7291108996cef12e4395c9addd7c311f22f84942890867b11c0a
2017-12-25 06:18:50 SetBestChain: new best=0901af8808ba7291108996cef12e4395c9addd7c311f22f84942890867b11c0a height=108136 log2_trust=50.930732 moneysupply=21340559.55369 tx=507531 date=2014-04-22 17:56:19 progress=0.001009
2017-12-25 06:18:50 ProcessBlock: ACCEPTED
2017-12-25 06:18:50 received block ea15788c49d00c0e7a31b08ec8c9f8e67610ea41cbbbcbe4a9242b0f80538869
2017-12-25 06:18:51 SetBestChain: new best=ea15788c49d00c0e7a31b08ec8c9f8e67610ea41cbbbcbe4a9242b0f80538869 height=108137 log2_trust=50.930765 moneysupply=21340560.41369 tx=507533 date=2014-04-22 17:57:11 progress=0.001009
2017-12-25 06:18:51 ProcessBlock: ACCEPTED
2017-12-25 06:18:51 received block 58a743ea63b16d19f4815dc9c57e532663f7cab81fe5ef636b3bec65528a591d
2017-12-25 06:18:51 SetBestChain: new best=58a743ea63b16d19f4815dc9c57e532663f7cab81fe5ef636b3bec65528a591d height=108138 log2_trust=50.930797 moneysupply=21340584.82369 tx=507535 date=2014-04-22 17:58:37 progress=0.001009
2017-12-25 06:18:51 ProcessBlock: ACCEPTED
2017-12-25 06:18:51 received block 728279d786598ad076b49c8f0ae78bc8d9853d35f06529d6ca59d0d03dc17b61
2017-12-25 06:18:51 SetBestChain: new best=728279d786598ad076b49c8f0ae78bc8d9853d35f06529d6ca59d0d03dc17b61 height=108139 log2_trust=50.930829 moneysupply=21340585.46369 tx=507539 date=2014-04-22 18:06:04 progress=0.001009
2017-12-25 06:18:51 ProcessBlock: ACCEPTED
2017-12-25 06:18:51 received block f42decf97ad56025c4d88826befe4a5db331b1cb4acb94ea97f4076b6756408d

That’s what I see at the bottom of the debug log. This was after I left it alone for about an hour.
Earlier today, this is what the debug log was showing

proof-of-stake failed for block 6e23b4f5f7b1bc5858180c26f9cd9ae0e342193870f73a02a305b00323f334a4
2017-12-25 02:27:33 received block 18336b86b3b17ee7378aa2e13eaa90ca381aef2bf0278ddd17bd4bc05d21d2f2
2017-12-25 02:27:33 ERROR: CheckProofOfStake() : tx index not found
2017-12-25 02:27:33 WARNING: ProcessBlock(): check proof-of-stake failed for block 18336b86b3b17ee7378aa2e13eaa90ca381aef2bf0278ddd17bd4bc05d21d2f2
2017-12-25 02:27:33 received block 870dc6277786bbaff3c175965f0f5abedb4aadb288bb2f7a3c526e6900097e74
2017-12-25 02:27:33 ERROR: CheckProofOfStake() : tx index not found
2017-12-25 02:27:33 WARNING: ProcessBlock(): check proof-of-stake failed for block 870dc6277786bbaff3c175965f0f5abedb4aadb288bb2f7a3c526e6900097e74
2017-12-25 02:27:33 received block bdbd44306525fedf4f3bf526779d8b94ba682adc19f1b4bfc157dc75ea197149
2017-12-25 02:27:33 ERROR: CheckProofOfStake() : tx index not found
2017-12-25 02:27:33 WARNING: ProcessBlock(): check proof-of-stake failed for block bdbd44306525fedf4f3bf526779d8b94ba682adc19f1b4bfc157dc75ea197149
2017-12-25 02:27:33 received block 0000000000000000b3e927132cf847a6d331bf5767195228b56ac619fe30ca55
2017-12-25 02:27:33 ProcessBlock: ORPHAN BLOCK, prev=8eed9508f2aff145b5eb688a961259a22a15616e0c2bc9d3d443c6b6ea6ee2d5
2017-12-25 02:27:33 received block 0000000000000002f2333280d8f1a0fc5589d0bb9163dbab41ce2313488f1d55
2017-12-25 02:27:33 ProcessBlock: ORPHAN BLOCK, prev=bdbd44306525fedf4f3bf526779d8b94ba682adc19f1b4bfc157dc75ea197149
2017-12-25 02:27:33 received block 13bd7807d2ce4bcad7b97c4d226c9ec6e649390f5910da840a57e1ff96f3c51d
2017-12-25 02:27:34 ERROR: CheckProofOfStake() : tx index not found
2017-12-25 02:27:34 WARNING: ProcessBlock(): check proof-of-stake failed for block 13bd7807d2ce4bcad7b97c4d226c9ec6e649390f5910da840a57e1ff96f3c51d
2017-12-25 02:27:34 received block 2b4752be832a9e3aaffac2fe4f5569c6c56676296f55eebd88a8af69c9f7d071
2017-12-25 02:27:34 ERROR: ProcessBlock() : already have block (orphan)

etc etc. I’m thinking just let it sit there until the blockchain is fully downloaded?


#186

Looks like it’s syncing to me. Leave it alone.


#187

Still no luck. Processor usage for ppcoin is hovering around 4%, same message.

Edit: checked the log, it’s still downloading. Made it up to about May 2015 :wink:


#188

No luck. Block chain is up to date, still getting the same error message. I restarted the machine and looking at the debug log, Peerbox is connecting to other peers.


#189

By all accounts the node is running, the debug log shows sync activity.
CPU activity is hovering right around 15%
The interesting thing is when I run other commands like -health, this is what I get:

Checking if we are on the right chain…
Using peercoin.mintr.org as reference.

Traceback (most recent call last):
File “/usr/bin/peerbox”, line 443, in
health_check()
File “/usr/bin/peerbox”, line 278, in health_check
r = _check()
File “/usr/bin/peerbox”, line 245, in _check
local = _local()
File “/usr/bin/peerbox”, line 235, in _local
local[“height”] = int(node.getblockcount())
File “/usr/lib/python2.7/dist-packages/peercoin_rpc/peercoin_rpc.py”, line 101, in getblockcount
return self.req(“getblockcount”)
File “/usr/lib/python2.7/dist-packages/peercoin_rpc/peercoin_rpc.py”, line 76, in req
“jsonrpc”: “1.1”})
File “/usr/lib/python2.7/dist-packages/requests/models.py”, line 793, in json
return json.loads(self.text, **kwargs)
File “/usr/lib/python2.7/json/init.py”, line 338, in loads
return _default_decoder.decode(s)
File “/usr/lib/python2.7/json/decoder.py”, line 366, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File “/usr/lib/python2.7/json/decoder.py”, line 384, in raw_decode
raise ValueError(“No JSON object could be decoded”)
ValueError: No JSON object could be decoded

When I run peerbox - balance, I get

Traceback (most recent call last):
File “/usr/bin/peerbox”, line 456, in
print(json.dumps(balance(), indent=4))
File “/usr/bin/peerbox”, line 295, in balance
return { ‘balance’: node.getbalance() }
File “/usr/lib/python2.7/dist-packages/peercoin_rpc/peercoin_rpc.py”, line 116, in getbalance
return self.req(“getbalance”)
File “/usr/lib/python2.7/dist-packages/peercoin_rpc/peercoin_rpc.py”, line 76, in req
“jsonrpc”: “1.1”})
File “/usr/lib/python2.7/dist-packages/requests/models.py”, line 793, in json
return json.loads(self.text, **kwargs)
File “/usr/lib/python2.7/json/init.py”, line 338, in loads
return _default_decoder.decode(s)
File “/usr/lib/python2.7/json/decoder.py”, line 366, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File “/usr/lib/python2.7/json/decoder.py”, line 384, in raw_decode
raise ValueError(“No JSON object could be decoded”)
ValueError: No JSON object could be decoded

Any ideas?


#190

those commands depend on external api for info about the blockchain and price, Mintr seems to have some issues now https://peercoin.mintr.org/

the health command gives the same error for me, -balance works for me (did you type it with the added space or without?)


#191

Typed it with the space, so peerbox -balance

I tried to see if my node shows up online on bitinfo charts, not yet as of now; not sure how many days it must be online first.


#192

Thanks for the quick replay!
The probably gives a clue, but i can’t really find the right one. I don’t have any coins in my wallet yet. Might that be the problem. I haven’t initialized any wallet either. It seems like Peerbox is starting over and over again but fails at some point. I also noticed that the time on the raspberry is one hour behind compared to local time here. Here are some excerpts from the debug.log which show one of these tries:

2017-12-28 09:20:01 Peercoin version v0.6.1.0-g8c9f8b589bb ()
2017-12-28 09:20:01 Using OpenSSL version OpenSSL 1.0.1t 3 May 2016
2017-12-28 09:20:01 Default data directory /home/pi/.peercoin
2017-12-28 09:20:01 Using data directory /home/pi/.peercoin
2017-12-28 09:20:01 Using at most 125 connections (1024 file descriptors available)
2017-12-28 09:20:01 Using 4 threads for script verification
2017-12-28 09:20:01 init message: Verifying wallet…
2017-12-28 09:20:01 dbenv.open LogDir=/home/pi/.peercoin/database ErrorFile=/home/pi/.peercoin/db.log
2017-12-28 09:20:01 Bound to [::]:9901
2017-12-28 09:20:01 Bound to 0.0.0.0:9901
2017-12-28 09:20:01 init message: Loading block index…
2017-12-28 09:20:01 Opening LevelDB in /home/pi/.peercoin/blocks/index
2017-12-28 09:20:01 Opened LevelDB successfully
2017-12-28 09:20:01 Opening LevelDB in /home/pi/.peercoin/chainstate
2017-12-28 09:20:01 Opened LevelDB successfully
2017-12-28 09:20:01 Peercoin Network: genesis=0x0000000032fe677166d5 nBitsLimit=0x1d00ffff nBitsInitial=0x1c00ffff nStakeMinAge=2592000 nCoinbaseMaturity=500 nModifierInterval=21600
2017-12-28 09:20:01 LoadBlockIndexDB(): last block file = 0
2017-12-28 09:20:01 LoadBlockIndexDB(): last block file info: CBlockFileInfo(blocks=1, size=238, heights=0…0, time=2012-08-16…2012-08-16)
2017-12-28 09:20:01 LoadBlockIndexDB(): synchronized checkpoint 0000000032fe677166d54963b62a4677d8957e87c508eaa4fd7eb1c880cd27e3
2017-12-28 09:20:01 LoadBlockIndexDB(): transaction index enabled
2017-12-28 09:20:01 LoadBlockIndexDB(): hashBestChain=0000000032fe677166d54963b62a4677d8957e87c508eaa4fd7eb1c880cd27e3 height=0 date=2012-08-16 02:31:27
2017-12-28 09:20:01 init message: Verifying blocks…
2017-12-28 09:20:01 block index 44ms
2017-12-28 09:20:01 init message: Loading wallet…
2017-12-28 09:20:03 nFileVersion = 80600
2017-12-28 09:20:03 wallet 2146ms
2017-12-28 09:20:03 init message: Loading addresses…
2017-12-28 09:20:03 Loaded 10 addresses from peers.dat 0ms
2017-12-28 09:20:03 mapBlockIndex.size() = 1
2017-12-28 09:20:03 nBestHeight = 0
2017-12-28 09:20:03 setKeyPool.size() = 100
2017-12-28 09:20:03 mapWallet.size() = 0
2017-12-28 09:20:03 mapAddressBook.size() = 1
2017-12-28 09:20:03 AddLocal([2003:ed:a731:e2c8:90a7:edc0:3010:b7e1]:9901,1)
2017-12-28 09:20:03 IPv6 eth0: 2003:ed:a731:e2c8:90a7:edc0:3010:b7e1
2017-12-28 09:20:03 dnsseed thread start
2017-12-28 09:20:03 Loading addresses from DNS seeds (could take a while)
2017-12-28 09:20:03 upnp thread start
2017-12-28 09:20:03 net thread start
2017-12-28 09:20:03 opencon thread start
2017-12-28 09:20:03 msghand thread start
2017-12-28 09:20:03 dumpaddr thread start
2017-12-28 09:20:03 Error: To use peercoind, you must set a rpcpassword in the configuration file:
/home/pi/.peercoin/peercoin.conf
It is recommended you use the following random password:
rpcuser=peercoinrpc
rpcpassword=HKRjEitYGKz2qr2hdd1qYTnKEogHizENGVHuXjUAGuFa
(you do not need to remember this password)
The username and password MUST NOT be the same.
If the file does not exist, create it with owner-readable-only file permissions.
It is also recommended to set alertnotify so you are notified of problems;
for example: alertnotify=echo %s | mail -s “Peercoin Alert” admin@foo.com

2017-12-28 09:20:03 ThreadStakeMinter started
2017-12-28 09:20:03 CPUMiner started for proof-of-stake
2017-12-28 09:20:03 init message: Done loading
2017-12-28 09:20:03 addcon thread start
2017-12-28 09:20:03 dumpaddr thread stop
2017-12-28 09:20:03 Shutdown : In progress…
2017-12-28 09:20:03 Flush(false)
2017-12-28 09:20:03 wallet.dat refcount=0
2017-12-28 09:20:03 opencon thread interrupt
2017-12-28 09:20:03 addcon thread interrupt
2017-12-28 09:20:03 wallet.dat checkpoint
2017-12-28 09:20:03 msghand thread interrupt
2017-12-28 09:20:03 stakeminter thread interrupt
2017-12-28 09:20:03 ThreadStakeMinter exiting
2017-12-28 09:20:03 wallet.dat detach
2017-12-28 09:20:03 2 addresses found from DNS seeds
2017-12-28 09:20:03 dnsseed thread exit
2017-12-28 09:20:03 wallet.dat closed
2017-12-28 09:20:03 DBFlush(false) ended 11ms
2017-12-28 09:20:03 StopNode()
2017-12-28 09:20:03 net thread interrupt
2017-12-28 09:20:08 connection timeout
2017-12-28 09:20:08 ERROR: GetMyExternalIP() : connection to 91.198.22.70:80 failed
2017-12-28 09:20:11 No valid UPnP IGDs found
2017-12-28 09:20:11 upnp thread exit
2017-12-28 09:20:11 Flushed 10 addresses to peers.dat 9ms
2017-12-28 09:20:11 Committing 0 changed transactions to coin database…
2017-12-28 09:20:11 Flush(true)
2017-12-28 09:20:11 wallet.dat refcount=0
2017-12-28 09:20:11 wallet.dat checkpoint
2017-12-28 09:20:11 wallet.dat detach
2017-12-28 09:20:11 wallet.dat closed
2017-12-28 09:20:11 DBFlush(true) ended 8ms
2017-12-28 09:20:11 Shutdown : done


#193

looks like there is no config file, can you have a look in ~/.peercoin ? see what is there?
peerbox should generate the file, idk what went wrong, can you try remove it and reinstall it? apt-get remove peerbox, apt-get update, apt-get install peerbox
else you could try create the config file yourself and see if that helps, but it shouldn’t be needed


#194

There is a config file. I checked that before, but it’s not in ~/.peercoin but in ~/.ppcoin.
I moved the file to ~/.peercoin.
According to the debug file blocks are coming in now!!!
Thanks a lot!
What about this ~/.ppcoin folder?


#195

I’m going to try reinstalling peerbox also to see if that takes care of my issue. Will an uninstall wipe out the blockchain? I just want to make sure I back it up first if that’s the case


#196

@denisebryson First, backup the wallet.dat in ~/.ppcoin just in case, then delete the directory.


#197

Hi! trying to setup peerbox on OrangePi Zero, but cannot start peerbox script.
peerbox -start do nothing
@syslog
Starting Peercoin daemon…
Started Peercoin daemon.
Failed at step NO_NEW_PRIVILEGES spawning /usr/bin/ppcoind: Invalid argument
ppcoind@root.service: main process exited, code=exited, status=227/NO_NEW_PRIVILEGES
Unit ppcoind@root.service entered failed state.
When I try to run just a ppccoind it sucessfully writes to ~/.peercoin/debug.log
Linux version 3.4.39 (root@curry) (gcc version 4.6.3 20120201 (prerelease) (crosstool-NG linaro-1.13.1-2012.02-20120222 - Linaro GCC 2012.02) ) #2 SMP PREEMPT Mon Nov 21 16:23:11 CST 2016
OS Raspbian Server for Orange pi.
Thanks in advance !


#198

I found a solution.
Have changed in /usr/lib/systemd/system/ppcoind@.service
NoNewPrivileges=true to NoNewPrivileges=false.
After that the problem is gone.


#199

Reinstalled peerbox. Still getting the daemon unresponsive message. Any ideas?


#200

can you see if debug.log gives a clue (in ~/.ppcoin ), you are using jessie?


#201

Yep, I am using Jesse. I looked at the error log in ~/.peercoin and there are literally no error messages. Peerbox seems to be running successfully. I see it connecting to peers and syncing the blockchain. Some commands do work, like -version and -rates, but the rest give me the error I mentioned above in a screenshot, while -info just tells me the daemon is unresponsive.


#202

Hi guys,

I just want to inform you, that I’ve taken over maintenance and development for the peerbox scripts from @peerchemist as he doesn’t have enough spare time to actively maintain the scripts. So if you find bugs or feel the need for new features just get in contact me. I’ll try to come back to you asap.

That said, I also want to inform you, that I’m aware of the fact that some of you are already waiting for a new peerbox version supporting raspbian stretch. As this is also related to software parts which are not in my scope, please understand that I cannot tell or promise you anything related to this topic right now. If I have any news for you I’ll let you know.