Comments (11)
It might be best to try the latest tagged version, 1.4.9, until we can troubleshoot.
thanks for the report.
from zookeeper-cookbook.
Would the latest 1.4.9 be the same version that is in the chef community
cookbook?
Because that is the one I initially tried before trying the latest commit.
And I got the same problem.
Thanks
On 27 Jan 2014 16:54, "Matthew Hooker" [email protected] wrote:
It might be best to try the latest tagged version, 1.4.9https://github.com/SimpleFinance/chef-zookeeper/tree/v1.4.9until we can troubleshoot.
thanks for the report.
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/51#issuecomment-33427540
.
from zookeeper-cookbook.
yeah, 1.4.9 will be latest community cb. That's good to know.
Debugging now, I'll update you soon
from zookeeper-cookbook.
Having trouble reproducing.
check-local-zk.py
blocks the init script until it can reach zookeeper. It tries for 5 minutes. When you run exhibitor manually, it doesn't run that script, which is why it's starting okay.
Could you run that script after starting exhibitor manually and tell me what the output is?
It would also be useful to see the changes you made to the attributes.
from zookeeper-cookbook.
Sure, I did this on a new machine Amazon Linux machine:
Added ec2-user to the sudoers file:
sudo visudo
+ ec2-user ALL=(ALL) ALL
Did a yum update and installed patch which is needed by the recipe (Maybe a dependency needs to be defined somewhere?):
sudo yum update sudo yum install patch
Make the parent directory that contains my snapshot,logs/transaction directories:
mkdir ~/zookeeper
My only changes were made to default.rb and my diff of the default.rb file:
nottaway:zookeeper aalkhatib$ git diff
diff --git a/attributes/default.rb b/attributes/default.rb
index 8045329..8ff515f 100644
--- a/attributes/default.rb
+++ b/attributes/default.rb
@@ -2,8 +2,8 @@ default[:zookeeper][:version] = "3.4.5"
default[:zookeeper][:mirror] = "http://mirrors.ibiblio.org/apache/zookeeper/zookeeper-#{default[:zookeeper][:version]}/zookeeper-#{default[:zookeeper][:version]}.tar.gz"
default[:zookeeper][:checksum] = 'e92b634e99db0414c6642f6014506cc22eefbea42cc912b57d7d0527fb7db132'
default[:zookeeper][:install_dir] = "/opt/zookeeper"
-default[:zookeeper][:user] = "zookeeper"
-default[:zookeeper][:group] = "zookeeper"
+default[:zookeeper][:user] = "ec2-user"
+default[:zookeeper][:group] = "ec2-user"
default[:gradle][:version] = "1.5"
default[:gradle][:mirror] = "http://services.gradle.org/distributions/gradle-#{default[:gradle][:version]}-bin.zip"
@@ -14,9 +14,9 @@ default[:exhibitor][:install_dir] = "/opt/exhibitor"
default[:exhibitor][:script_dir] = '/usr/local/bin/'
-default[:exhibitor][:snapshot_dir] = "/tmp/zookeeper"
-default[:exhibitor][:transaction_dir] = "/tmp/zookeeper"
-default[:exhibitor][:log_index_dir] = "/tmp/zookeeper_log_indexes"
+default[:exhibitor][:snapshot_dir] = "/home/ec2-user/zookeeper/snapshots"
+default[:exhibitor][:transaction_dir] = "/home/ec2-user/zookeeper/txn"
+default[:exhibitor][:log_index_dir] = "/home/ec2-user/zookeeper/logs"
default[:exhibitor][:log_to_syslog] = "1"
# Port for the HTTP Server
@@ -24,15 +24,13 @@ default[:exhibitor][:opts][:port] = "8080"
default[:exhibitor][:opts][:hostname] = node[:ipaddress]
default[:exhibitor][:opts][:defaultconfig] = "#{node[:exhibitor][:install_dir]}/exhibitor.properties"
-default[:exhibitor][:opts][:configtype] = "file"
+default[:exhibitor][:opts][:configtype] = "s3"
default[:exhibitor][:loglevel] = "info"
# For --configtype s3, set:
-# [:exhibitor][:s3key] = "key"
-# [:exhibitor][:s3secret] = "secret"
-# [:exhibitor][:opts][:s3config] = "bucket:config-key"
-# [:exhibitor][:opts][:s3region] = "region" # i.e. us-east-1
+default[:exhibitor][:s3key] = "MY-KEY"
+default[:exhibitor][:s3secret] = "MY-SECRET"
+default[:exhibitor][:opts][:s3config] = "MYBUCKET:KEY"
+default[:exhibitor][:opts][:s3region] = "us-east-1" # i.e. us-east-1
# For --contiftype file
default[:exhibitor][:opts][:fsconfigdir] = "/tmp"
Then I start the bootstrap:
knife cookbook upload zookeeper
Uploading zookeeper [1.4.9]
Uploaded 1 cookbook.
knife bootstrap x.x.x.x --ssh-user ec2-user --run-list "recipe[zookeeper]" --sudo
from zookeeper-cookbook.
So it actually hung at:
* remote_file[/var/chef/cache/zookeeper-3.4.5.tar.gz] action create
I checked the machine and no chef process was running, so I just restarted it, and will update when it is finished.
from zookeeper-cookbook.
Ok, so the bootstrap hung again at the point where it was starting the process and waitiing for the check-local-zk.py script to return.
In /var/log/messages:
Jan 28 16:02:48 init: exhibitor main process (31063) terminated with status 1
Jan 28 16:02:48 init: exhibitor main process ended, respawning
Jan 28 16:07:49 init: exhibitor post-start process (31064) terminated with status 1
Jan 28 16:07:49 init: exhibitor main process (31077) terminated with status 1
Then when I started the zookeeper instance manualy by copy/pasting the command in /etc/init/exhibitor.conf:
sudo -u $USER bash -c "java -Dlog4j.configuration=file:///opt/exhibitor/log4j.properties -jar /opt/exhibitor/1.5.0.jar \
--configtype s3 --defaultconfig /opt/exhibitor/exhibitor.properties --hostname x.x.x.x --port 8080 --s3config bucket:name --s3credentials /opt/exhibitor/exhibitor.s3.properties --s3region us-east-1 | logger -t zookeeper"
That worked and I was able to connect to zookeeper, and the s3 configuration was updated, and that machine joined my ensemble.
and the check-local-zookeeper.py exits with a 0 status
[ec2-user@machine ~]$ /usr/local/bin/check-local-zk.py
[ec2-user@machine ~]$ echo $?
0
Killing the exhibitor/zookeeper I started and trying to start it as a service:
sudo start -v exhibitor
/var/log/messages:
Jan 28 16:26:32 init: exhibitor main process (31611) terminated with status 1
Jan 28 16:26:32 init: exhibitor main process ended, respawning
and the script:
python /usr/local/bin/check-local-zk.py
<urlopen error [Errno 111] Connection refused>
<urlopen error [Errno 111] Connection refused>
<urlopen error [Errno 111] Connection refused>
If you need anymore information, or would like me to do anything let me know.
from zookeeper-cookbook.
Any other information I can provide to help debug this issue?
from zookeeper-cookbook.
let me try with an Amazon Linux image
from zookeeper-cookbook.
dunno why this didn't click, but it's probably because this cookbook supports upstart, which is an ubuntu thing. You might try applying the patches in #19
I'll see if I can add support for runit
from zookeeper-cookbook.
closing. Please track in #54
from zookeeper-cookbook.
Related Issues (20)
- Upstart services fail to start zookeeper HOT 8
- Question about your pinning strategy HOT 2
- link logic for ZK not working. HOT 1
- No way to set Java Opts? HOT 2
- service[zookeeper] cannot be found in the resource collection. HOT 10
- cookbook dependancies in the metadata HOT 4
- Support "package" install style HOT 4
- Make the defaults for install_dir consistent across resources HOT 1
- Checksum has not changed with 3.4.9 update HOT 1
- Any feedback with ZK 3.5.2 dynamic configuration ? HOT 3
- Zookeeper sysv script
- How to run ZooKeeper as a service HOT 1
- Support Ubuntu 16.04 HOT 3
- support direct link to tar for download path HOT 2
- zookeeper-3.5.3-beta artifact breaks due to (lack of) gzip compression HOT 3
- 2.6.0 version error using chef-client 12 HOT 2
- MYID HOT 4
- Passing java options with special characters has unexpected output HOT 6
- Default install fails with failure to download Zookeeper 3.4.12 HOT 2
- Inconsistency in username properties across resources HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zookeeper-cookbook.