These are chat archives for bgw/ansible-honeybadger

9th
Mar 2015
nanpanman
@nanpanman
Mar 09 2015 01:17
Everything runs fine now! Thank you :) Log: http://pastebin.com/5bM73aiB
Benjamin Woodruff
@bgw
Mar 09 2015 01:17
Awesome! Glad to hear it.
nanpanman
@nanpanman
Mar 09 2015 01:18
It is the most complete bitcoind/tor setup script I've seen so far. So kudos for all the hard work you put into this.
Benjamin Woodruff
@bgw
Mar 09 2015 01:19
Make sure to watch your bandwidth, as bitcoind isn't throttled yet, and cloudatcost charges for overages (rather than suspending your machine)
There's an issue open for this of course: PiPeep/ansible-honeybadger#4
And sign up for the critical updates mailing list, in case there's some horrible security vulnerability with my scripts
nanpanman
@nanpanman
Mar 09 2015 01:39
Thanks. I subscribed.
I don't think the script installed bitcoind though.. I don't see it in the running processes...
and all the entries in the log have skipping: [localhost]
Benjamin Woodruff
@bgw
Mar 09 2015 01:40
You're right. Those tasks are marked as skipped.
nanpanman
@nanpanman
Mar 09 2015 01:40
I did select both Tor and Bitcoind and agreed to continue after the unmetered check
Benjamin Woodruff
@bgw
Mar 09 2015 01:41
I see. Must be a bug in autoconfig
add "bitcoind=True" (without the quotes) to the line in the hosts file, and re-run autosetup
nanpanman
@nanpanman
Mar 09 2015 01:41
I think maybe the first time I just pressed 'Enter' instead of 'Y'.
Benjamin Woodruff
@bgw
Mar 09 2015 01:41
I'll investigate what went wrong
nanpanman
@nanpanman
Mar 09 2015 01:42
okay, will do
Benjamin Woodruff
@bgw
Mar 09 2015 01:43
or I guess your host_vars/* file
Either should work
nanpanman
@nanpanman
Mar 09 2015 01:44
I added to hosts and reran
[bitcoind=True] Copying ssh key (if needed)
helpers/ssh-copy-id: ERROR: No identities found
Benjamin Woodruff
@bgw
Mar 09 2015 01:44
Sorry, I meant on the same line as the host.
eg. arial.benjam.info tor=True bitcoind=True
nanpanman
@nanpanman
Mar 09 2015 01:45
gotcha. will go and fix it
Benjamin Woodruff
@bgw
Mar 09 2015 01:45
Although I think the autosetup script prefers to put it in host_vars, so you might want to modify that instead
The autoconfig script is a clusterfuck
nanpanman
@nanpanman
Mar 09 2015 01:47
This is what my localhost file looks like:
root@ubuntu:~/ansible-honeybadger/host_vars# cat localhost.yml
---bitcoind: true
tor: true
tor_bandwidth_burst: 300 KBytes
tor_bandwidth_rate: 100 KBytes
tor_contact_info: 1VAANoBWCs7PVfXwoYQWEpTJ2P8hrPXq2
tor_nickname: honeybadger42
Benjamin Woodruff
@bgw
Mar 09 2015 01:47
Oh, that would explain things
nanpanman
@nanpanman
Mar 09 2015 01:47
So I guess I can just remove the dashes in front of bitcoind
Benjamin Woodruff
@bgw
Mar 09 2015 01:47
yeah, or put a newline
I was having trouble reproducing it in the dry-run mode, and the generation of the file follows a slightly different execution path there, so that explains it
Hey, how much disk space do you have?
I was looking at cloudatcost, and they charge a ton for disk, so maybe you can't even run it anyways?
nanpanman
@nanpanman
Mar 09 2015 01:49
This particular node has only 40GB so should be a close shave
Benjamin Woodruff
@bgw
Mar 09 2015 01:49
Okay.
nanpanman
@nanpanman
Mar 09 2015 01:50
It is the developer3 pacakge
They have a one time payment and usually 50% off
So only $70 for 'life'
Sound a bit cheap to me so my expectations are not too high but overall suits my needs
Hmm now bitcoind installs but also gives me the following error:

NOTIFIED: [bitcoind | restart bitcoind] *
failed: [localhost] => {"failed": true, "name": "bitcoind", "state": "restarted"}
msg: bitcoind process not presently configured with monit

FATAL: all hosts have already failed -- aborting

Benjamin Woodruff
@bgw
Mar 09 2015 01:53
Dammit!
nanpanman
@nanpanman
Mar 09 2015 01:53
haha. sorry :)
not making it easy for you
Benjamin Woodruff
@bgw
Mar 09 2015 01:53
Lemme try to reproduce it.
nanpanman
@nanpanman
Mar 09 2015 01:53
Maybe I should just start from scratch
Benjamin Woodruff
@bgw
Mar 09 2015 01:53
no, that's more effort for you and probably won't fix it
nanpanman
@nanpanman
Mar 09 2015 01:53
ok
Benjamin Woodruff
@bgw
Mar 09 2015 01:57
Oh, I think the restart command might get triggered before the monit reload command does
Can I see all the logs in the NOTIFIED section?
If that's the case, the good news is that rebooting your vm should solve it
nanpanman
@nanpanman
Mar 09 2015 01:58

NOTIFIED: [openssh | assemble sshd_config] **
changed: [localhost]

NOTIFIED: [openssh | reload openssh] **
changed: [localhost]

NOTIFIED: [monit | reload monit] **
changed: [localhost]

NOTIFIED: [bitcoind | restart bitcoind] *
failed: [localhost] => {"failed": true, "name": "bitcoind", "state": "restarted"}
msg: bitcoind process not presently configured with monit

FATAL: all hosts have already failed -- aborting

NOTIFIED: [bitcoind | restart bitcoind] *
FATAL: no hosts matched or all hosts have already failed -- aborting

FATAL: all hosts have already failed -- aborting

NOTIFIED: [bitcoind | restart bitcoind] *
FATAL: no hosts matched or all hosts have already failed -- aborting

Benjamin Woodruff
@bgw
Mar 09 2015 01:58
Oh, nope, nevermind
Might be an issue with the commands running too close together, like we had with the tor stuff
nanpanman
@nanpanman
Mar 09 2015 01:59
right. so add a few seconds wait?
Benjamin Woodruff
@bgw
Mar 09 2015 02:00
Yeah, basically, except that doing that in the notify section is a bit tricker than doing it in the tasks section, because of how the code is triggered.
Fortunately, the service module has a sleep property for this specific issue: http://docs.ansible.com/service_module.html
nanpanman
@nanpanman
Mar 09 2015 02:02
ok. I'm going out to get some food. Will check in in an hour of two. No rush :)
Benjamin Woodruff
@bgw
Mar 09 2015 02:02
Okay
Enjoy your food
nanpanman
@nanpanman
Mar 09 2015 02:02
thanks for all the help!
Benjamin Woodruff
@bgw
Mar 09 2015 02:12
I was able to reproduce your issue, and can confirm rebooting will fix it.
Testing a patch now
Benjamin Woodruff
@bgw
Mar 09 2015 02:42
It turns out I can't use 'sleep', because it only work on restart (not reload). If I restart monit, it won't be responsive for a few minutes, as monit has a startup delay.
Benjamin Woodruff
@bgw
Mar 09 2015 02:56
PiPeep/ansible-honeybadger@921a594
Reproduced the bug, and verified that it fixes it.
Benjamin Woodruff
@bgw
Mar 09 2015 03:08
And filed an issue against ansible: ansible/ansible-modules-core#911
nanpanman
@nanpanman
Mar 09 2015 04:41
Both Tor and Bitcoind are running now
Benjamin Woodruff
@bgw
Mar 09 2015 04:41
Yay!
nanpanman
@nanpanman
Mar 09 2015 04:42
only issue I have seems to be bitcoin.conf
root@ubuntu:~/ansible-honeybadger# bitcoin-cli getinfo
error: You must set rpcpassword=<password> in the configuration file:
/root/.bitcoin/bitcoin.conf
If the file does not exist, create it with owner-readable-only file permissions.
The file does not exist but I can create one
Benjamin Woodruff
@bgw
Mar 09 2015 04:42
Either use the ssh user, bitcoind-getinfo (probably not easy on putty)
nanpanman
@nanpanman
Mar 09 2015 04:43
oh I see
thanks!
Benjamin Woodruff
@bgw
Mar 09 2015 04:43
Or use bitcoin-cli -conf=/etc/bitcoin.conf getinfo
nanpanman
@nanpanman
Mar 09 2015 04:43
TIL :)
Benjamin Woodruff
@bgw
Mar 09 2015 04:43
bitcoind has some pretty poor defaults for being run as a system-wide daemon
nanpanman
@nanpanman
Mar 09 2015 04:44
that works fine. Again - thank you so much for the help!
Have a nice evening!
Benjamin Woodruff
@bgw
Mar 09 2015 04:44
I may eventually include aliases to smooth over that bit