peerchemist / Peerbox

DEPRECATED
GNU General Public License v3.0
19 stars 22 forks source link

After reboot peerbox-info cannot find ppcoind immediately - WARNING: ppcoind is not running! #6

Closed Thireus closed 9 years ago

Thireus commented 9 years ago

After reboot, peerbox-info takes a while to interface with ppcoind.

ppcoind is running, but peerbox-info can't find it.

[root@peerbox ~]# ps aux | grep ppcoind | grep -v grep
ppcoind    311 33.7 18.7 199888 91904 ?        SLsl 11:27   1:46 /usr/bin/ppcoind -daemon -conf=/etc/peercoin/peercoin.conf -pid=/run/ppcoind/ppcoind.pid -datadir=/var/lib/ppcoind -checkblocks=1000
[root@peerbox ~]# peerbox-info 
Peerbox:
{
    "peerbox version": "v0.23", 
    "ppcoind": "ppcoind inactive", 
    "raspi_board_rev": "0x10", 
    "serial": "000000003f2980c1", 
    "uptime": "0:05:41.970000"
}
WARNING: ppcoind is not running!

ppcoind running also, checked with netstat.

After about 5 min peerbox-info is able to interface with it (can take more time sometimes).

peerchemist commented 9 years ago

This is normal behaviour, and not related to peerbox-info but to ppcoind. The same will happen if you try "ppcoind getinfo" just after starting the daemon. I guess that ppcoind does not start RPC server until everything else is ready.

Thireus commented 9 years ago

Ok that's what I thought too. Maybe a good idea would be to change this warning message. Because ppcoind was running ;).

Could you add a feature to check if ppcoind and RPC are ready? So that you can display a different warning message in the different cases.

peerchemist commented 9 years ago

So something like "PPCOIND is not ready" if it is running but no RPC?

Thireus commented 9 years ago

Yes. ppcoind is running but not ready yet.

peerchemist commented 9 years ago

Ok, I will try something. Can you please open new issue with this feature request?

Thireus commented 9 years ago

Done. Thanks :)