it turned out the problem was with bitcoind not cron. i had not configured bitcoind to run as root so it was bombing out at boot. i'm not sure why but the die message was not showing up in /tmp/bitcoind.out
. anyway when i tried just from the command line running bitcoind
as root i got:
$ sudo bitcoind
Error: To use bitcoind, you must set a rpcpassword in the configuration file:
/root/.bitcoin/bitcoin.conf
It is recommended you use the following random password:
rpcuser=bitcoinrpc
rpcpassword=xxxxxxxxxxxxxxxxxxxxxxxxx
(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 "Bitcoin Alert" admin@foo.com
so i fixed it by running bitcoind as my user:
$ sudo crontab -e # note that this is still root's crontab!
@reboot sudo -u myusername /usr/bin/bitcoind 2>&1 >/tmp/bitcoind.cron-out
and now it runs at boot. maybe it would have been better to put this in my own crontab? i'm not sure if this would mean that it only runs when i log in as my user through? i'll test it again later on today and update the answer if this works...
update
yes it does still run even when i don't login if i delete the entry from root's crontab and then add it to my user's crontab:
$ sudo crontab -e # note that this is still root's crontab!
<delete last line/>
<save and exit/>
crontab: installing new crontab
$ crontab -e
@reboot /usr/bin/bitcoind 2>&1 >/tmp/bitcoind.cron-out
crontab: installing new crontab
Any interesting in the
/tmp/bitcoind.out
file? – Braiam – 2013-12-15T12:44:17.080nope. its blank. i think the problem would be the same with any executable. i will test this... – mulllhausen – 2013-12-15T12:49:50.030