evertrue / zookeeper-cookbook

Chef cookbook for installing and managing Zookeeper.
https://supermarket.chef.io/cookbooks/zookeeper
Apache License 2.0
81 stars 117 forks source link

doesn't seem to auto start on centos/amazon linux #71

Closed aarondodd closed 9 years ago

aarondodd commented 10 years ago

I'm running amazon linux (centos) and while Exhibitor and Zookeeper start fine if I manually execute the exec line of /etc/init/exhibitor.conf, the recipe itself hangs at

Recipe: zookeeper::exhibitor

for 5+ minutes before reporting a successful finish. But, chef doesn't actually start it. a ps shows no java running or anything for exhibitor.

issuing "start exhibitor" seems to just hang and not do anything.

jakedavis commented 10 years ago

Hey @aarondodd, sincere apologies for never digging into this. CentOS support is hard to come by for us; we're a strictly Ubuntu shop. However, I'm working on a massive refactor of this cookbook and want to at least try to support CentOS as well. If you can hang on for a short bit, I think we'll get there.

synhershko commented 10 years ago

I can confirm OpsWorks has hard time working with this cookbook as well when running on Amazon Linux. Will be happy to see this resolved!

jakedavis commented 10 years ago

Hey @synhershko, so this cookbook has changed quite a lot the past couple months. Do you mind if I ask what version of the cookbook you're on?

synhershko commented 10 years ago

Directly from the master branch...

jakedavis commented 10 years ago

Okay, can you provide a stacktrace, test conditions, any debugging information, etc? My comment above has mostly been accomplished, so things which aren't working at this point are likely bugs and we'll probably have to go out of our way to fix 'em up. Thanks!

synhershko commented 10 years ago

Let me retract my comment - it seems to be working fine now. It probably required some more patience on my end.

zanzan42 commented 9 years ago

I'm still having issues with zookeeper starting when the zookeeper::service recipe is run under OpsWorks with the upstart provider set. The command which the recipe runs is /sbin/start zookeeper, and that fails. Running that manually returns a no such job found error.

Using the runit provider starts the service, but then I get issues with the leader election process because it doesn't seem to have listeners at 2888/3888 for the quorum stuff.

Looks like this recipe doesn't include functionality related to zookeeper clustering, in general. I had to do a supplemental recipe to lay down the myid file, for instance.

More info: Amazon linux uses upstart by default, but initially I kept getting errors when trying to use initctl to manage starting the service. Your recipe is writing zookeeper.conf into /etc/init, but /var/log/messages showed that upstart didn't like either your limit or console stanzas in the conf file.

Commenting out those stanzas made zookeeper show up in initctl list, but the service still failed to start properly, respawning several times and then stopping due to the default respawn limits on init.

Interestingly, rewriting the limit nofile 8192 8192 line in the conf file didn't throw the same stanza error. On the off chance that there was some issue in the file template (like a bad carriage return or some other invisible character), I went through the installed file line by line with vi and redid all the carriage returns.

The contents of the installed file no longer throws a stanza error, and initctl sees that the zookeeper job exists, but initctl start zookeeper still goes through a fast respawn process and then stops. So something is still not right.