Skip to content

Instantly share code, notes, and snippets.

@haf
Last active December 15, 2015 18:09
Show Gist options
  • Save haf/5301339 to your computer and use it in GitHub Desktop.
Save haf/5301339 to your computer and use it in GitHub Desktop.
$ vagrant provision
[default] Running provisioner: VagrantPlugins::Puppet::Provisioner::Puppet...
Running Puppet with dev.jobAd.appserver.pp...
Warning: Config file /etc/puppet/hiera.yaml not found, using Hiera defaults
Notice: /Stage[main]/Riak::Appconfig/File[/var/log/riak]/group: group changed 'root' to 'riak'
Notice: /Stage[main]/Riak::Appconfig/File[/var/lib/riak]/group: group changed 'root' to 'riak'
Notice: /Stage[main]/Riak::Appconfig/File[/usr/lib/riak]/group: group changed 'root' to 'riak'
Error: Could not start Service[riak]: Execution of '/sbin/service riak start' returned 1:
Error: /Stage[main]/Riak/Service[riak]/ensure: change from stopped to running failed: Could not start Service[riak]: Execution of '/sbin/service riak start' returned 1:
Notice: /Stage[main]/Riak/Service[riak]: Triggered 'refresh' from 1 events
Notice: /Stage[main]/Riak/Anchor[riak::end]: Dependency Service[riak] has failures: true
Warning: /Stage[main]/Riak/Anchor[riak::end]: Skipping because of failed dependencies
Notice: Finished catalog run in 1.52 seconds
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
cd /tmp/vagrant-puppet/manifests && puppet apply --modulepath '/etc/puppet/modules:/tmp/vagrant-puppet/modules-0' dev.jobAd.appserver.pp --detailed-exitcodes || [ $? -eq 2 ]
$ vagrant ssh
[vagrant@vagrant-centos63 ~]$ sudo service riak start
Starting Riak: !!!!
!!!! WARNING: ulimit -n is 1024; 4096 is the recommended minimum.
!!!!
Node is already running!
[FAILED]
[vagrant@vagrant-centos63 ~]$ sudo service riak status
riak is stopped
[vagrant@vagrant-centos63 ~]$ riak-admin test
Attempting to restart script through sudo -H -u riak
Successfully completed 1 read/write cycle to '[email protected]'
[vagrant@vagrant-centos63 ~]$ netstat -napt
(No info could be read for "-p": geteuid()=500 but you should be root.)
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:6000 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:4369 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN -
tcp 0 0 10.0.2.15:8087 0.0.0.0:* LISTEN -
tcp 0 0 10.0.2.15:8098 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:8099 0.0.0.0:* LISTEN -
[vagrant@vagrant-centos63 riak]$ sudo su - riak -c "/usr/sbin/riak ping"
!!!!
!!!! WARNING: ulimit -n is 1024; 4096 is the recommended minimum.
!!!!
pong
[vagrant@vagrant-centos63 riak]$ echo $?
0
[vagrant@vagrant-centos63 riak]$ RETVAL=`sudo su - riak -c "/usr/sbin/riak ping"`
[vagrant@vagrant-centos63 riak]$ echo $RETVAL
!!!! !!!! WARNING: ulimit -n is 1024; 4096 is the recommended minimum. !!!! pong
$ cat /etc/init.d/riak
SNIP
status() {
RETVAL=`su - riak -c "$DAEMON ping"`
[ "$RETVAL" = "pong" ] && echo $"$NAME is running..." && return 0
echo $"$NAME is stopped"
return 3
}
SNIP
@haf
Copy link
Author

haf commented Apr 9, 2013

Sayz will be fixed in Riak 1.4.

@haf
Copy link
Author

haf commented Apr 9, 2013

In the mean-time, the puppet-riak module adds a ulimit configuration setting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment