Ppcoind not responing; couldn't connect to server

I want to run ppcoind on my RPi but somehow it won’t respond to the commands.

$ cat ~/.ppcoin.conf

[code]rpcuser=ppcoind
rpcpassword=ppcoind

[/code]

$ cat /etc/peercoin/peercoin.conf

# ppcoind.conf
# Lines beginning with # are comments.
# 0 = False, 1 = True
# All files are relative to 'datadir', which is set by the ppcoind systemd
# service to /var/lib/ppcoind by default.

#Listen for connections on <port> (default: 9901 or testnet: 9903)
#port=9901

# Pay transaction fee amount per kilobyte. Default 0.01 (1 cent)
#paytxfee=0.01

# Username for JSON-RPC connections.
rpcuser=ppcoind

# Password for JSON-RPC connections.
rpcpassword=ppcoind

listen = 1

# Allow JSON-RPC connections from the specified IP address.
# Multiple rpcallowip can be specified.
#
## Local access.
rpcallowip=127.0.0.1
#
## Uncomment the following (and change the IP if needed) to allow remote access.
## NOTE: Always use SSL (see below) whenever allowing remote access, otherwise
## your coins could be stolen.
#rpcallowip=192.168.1.*

# Listen for JSON-RPC connections on <port> (default: 9902)
#rpcport=9902


# Use OpenSSL (https) for JSON-RPC connections. 
rpcssl=0

###########################
###### RPC-SSL NOTE #######
###########################
# In order for RPC to be encrypted using SSL, a cryto (public/private) key-pair
# and a certificate need to created. For example (as root),
# $ cd /var/lib/ppcoind
# $ touch server.pem
# $ chmod 0600 server.pem
# $ openssl genrsa -out server.pem 4096
# $ chown ppcoind: server.pem
# $ openssl req -new -x509 -nodes -sha1 -days 3650 -key server.pem > server.cert
#######################

# Server certificate file.
rpcsslcertificatechainfile=server.cert

# Server private key.
rpcsslprivatekeyfile=server.pem

After starting the daemon;
$ ppcoind getinfo

error: couldn't connect to server

AFAIK there is no verbose option for ppcoind or a log I could check so I’m stuck. Anyone an idea how to fix this?

is this related to Peerbox? Or you use some other distro?

I run ArchArm but not peerbox. ppcoind is from your(peerbox) repo though.

I run ArchArm but not peerbox. ppcoind is from your(peerbox) repo though.[/quote]

you need .ppcoin/ppcoin.conf

you can copy it form /etc/skel into your home dir/.ppcoin

you need .ppcoin/ppcoin.conf

you can copy it form /etc/skel into your home dir/.ppcoin[/quote]

Sure, did that. (there were no clear diffs?)
lsa ~/.ppcoin:
$ lsa

total 16K
drwxr-xr-x  2 hidden hidden 4.0K Aug 12 17:50 .
drwx------ 11 hidden hidden 4.0K Aug 12 17:56 ..
-rw-------  1 hidden hidden  111 Aug 12 17:53 ppcoin.conf
-rw-------  1 hidden hidden  111 Aug 12 17:50 ppcoind.conf

where ppcoin.conf == ppcoind.conf

$ cat ppcoin.conf

[code]# Username for JSON-RPC connections.
rpcuser=ppcoind

Password for JSON-RPC connections.

rpcpassword=ppcoind
[/code]

There’s no need for ppcoind.conf; both daemon and qt GUI use the same ppcoin.conf.

This is probably a needless question, but what syntax are you using to launch ppcoind? Does it show as running under “jobs”?

then you probably need whole lot of stuff I sometimes forget Peerbox uses.
For a start:

systemctl status ppcoind

@learnmore
I know, its just that the skeleton was named that way so just to be sure I kept it.

@peerchemist
$ systemctl status ppcoind

  • ppcoind.service - PPCoin Daemon
    Loaded: loaded (/usr/lib/systemd/system/ppcoind.service; disabled)
    Active: active (running) since Wed 2014-08-13 08:38:06 UTC; 50s ago
    Process: 2413 ExecStart=/usr/bin/ppcoind -daemon -conf=/etc/peercoin/peercoin.conf -pid=/run/ppcoind/ppcoind.pid -datadir=/var/lib/ppcoind $ARGS (code=exited, status=0/SUCCESS)
    Main PID: 2414 (ppcoind)
    CGroup: /system.slice/ppcoind.service
    `-2414 /usr/bin/ppcoind -daemon -conf=/etc/peercoin/peercoin.conf -pid=/run/ppcoind/ppcoind.pid -datadir=/var/lib/ppcoind -chec…

you need data dir

new dir needs to be created in /var/lib/ppcoin

and chmod -R to ppcoind:ppcoind

@peerchemist

It has and is used. Though i noticed something in the debug.log. Will check it out first if I can find something.

SetBestChain: new best=7143840d04475fb99290  height=100672  trust=1860360669305139  moneysupply=21214150.879604
ProcessBlock: ACCEPTED
received block c52894e08819be7ea12d
SetBestChain: new best=c52894e08819be7ea12d  height=100673  trust=1860403982440251  moneysupply=21214152.579604
ProcessBlock: ACCEPTED
received block cbb0e24e2e2a2103f5f8
2014-08-02 20:06:51 UTC Flushing wallet.dat
Flushed wallet.dat 11146ms
socket closed
disconnecting node 148.251.126.241:28653
socket no message in first 60 seconds, 1 0
SetBestChain: new best=cbb0e24e2e2a2103f5f8  height=100674  trust=1860447315058388  moneysupply=21214152.709604
ProcessBlock: ACCEPTED
received block 57d6dc8eb0cd39bab6bb
disconnecting node 84.114.233.13:50923
SetBestChain: new best=57d6dc8eb0cd39bab6bb  height=100675  trust=1860490666603289  moneysupply=21214152.969604
ProcessBlock: ACCEPTED
received block d43cbbc685b3fd3e493a
SetBestChain: new best=d43cbbc685b3fd3e493a  height=100676  trust=1860534095355721  moneysupply=21214153.229604
ProcessBlock: ACCEPTED
received block 46eca0858de859f730dd
2014-08-02 20:08:08 UTC Flushing wallet.dat
Flushed wallet.dat 28246ms

## LOTS OF WHITESPACE##





PPCoin version v0.4.0ppc-3-g1f058b6-beta (2014-05-11 03:55:21 +0100)
Default data directory /var/lib/ppcoind/.ppcoin
Loading addresses...
dbenv.open LogDir=/var/lib/ppcoind/database ErrorFile=/var/lib/ppcoind/db.log
Loaded 8267 addresses
 addresses     1407063178830ms
Loading block index...
PPCoin Network: genesis=0x0000000032fe677166d5 nBitsLimit=0x1d00ffff nBitsInitial=0x1c00ffff nStakeMinAge=2592000 nCoinbaseMaturity=500 nModifierInterval=21600




















PPCoin version v0.4.0ppc-3-g1f058b6-beta (2014-05-11 03:55:21 +0100)
Default data directory /var/lib/ppcoind/.ppcoin
Loading addresses...
dbenv.open LogDir=/var/lib/ppcoind/database ErrorFile=/var/lib/ppcoind/db.log
Loaded 8267 addresses
 addresses             18906ms
Loading block index...
PPCoin Network: genesis=0x0000000032fe677166d5 nBitsLimit=0x1d00ffff nBitsInitial=0x1c00ffff nStakeMinAge=2592000 nCoinbaseMaturity=500 nModifierInterval=21600




















PPCoin version v0.4.0ppc-3-g1f058b6-beta (2014-05-11 03:55:21 +0100)
Default data directory /var/lib/ppcoind/.ppcoin
Loading addresses...
dbenv.open LogDir=/var/lib/ppcoind/database ErrorFile=/var/lib/ppcoind/db.log
Loaded 8267 addresses
 addresses             15577ms
Loading block index...
PPCoin Network: genesis=0x0000000032fe677166d5 nBitsLimit=0x1d00ffff nBitsInitial=0x1c00ffff nStakeMinAge=2592000 nCoinbaseMaturity=500 nModifierInterval=21600

Above the intresting part out my logs. I’ve got no clue what happened at the time which broke ppcoind(after flushing the wallet). Though after that point it doesn’t start properly anymore as you can see.
In db.log the tail --lines 200 consists off these lines repeated:

BDB0058 page 4294967295: illegal page type or format
BDB0061 PANIC: Invalid argument
BDB0060 PANIC: fatal region error detected; run recovery
BDB0058 page 4294967295: illegal page type or format
BDB0061 PANIC: Invalid argument
BDB0060 PANIC: fatal region error detected; run recovery
BDB0058 page 4294967295: illegal page type or format
BDB0061 PANIC: Invalid argument
BDB0060 PANIC: fatal region error detected; run recovery
BDB0058 page 4294967295: illegal page type or format
BDB0061 PANIC: Invalid argument
BDB0060 PANIC: fatal region error detected; run recovery

Im thinking something is corrupt because off a dirty shutdown, so is it best to reinstall and remove all the data and hope it works this time?
Because I can read most off the c++ stuff and get it goes wrong here, but the rapid hole is too deep because off my lack off sound c++ knowledge.

Edit:
Reinstalled ppcoind and removed /var/lib/ppcoind/*
Now it all works, though I still wonder what happend. I expect at this point a dirty shutdown of ppcoind which corrupted the files in /var/lib/ppcoind?