Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error for clustering cluster_nodes use with cluster.rb #265

Closed
rlanore opened this issue May 12, 2015 · 2 comments

Comments

Projects
None yet
4 participants
@rlanore
Copy link

commented May 12, 2015

into readme it's write:

node['rabbitmq']['clustering']['cluster_nodes'] = [ { :name => 'rabbit@rabbit1', :type => 'disc' },

name attributes is only with single quote.

On my debian 7 and rabbitmq-server 3.5.1-1 the result of

rabbitmqctl eval "node()."

is

'rabbit@silog-front3'

so into cluster.rb:230

var_cluster_node_type = parse_cluster_nodes_string(new_resource.cluster_nodes).select { |node| node['name'] == var_node_name }.first['type']

I have an

undefined method `[]' for nil:NilClass

If i write my attribute with :

node.default['rabbitmq']['clustering']['cluster_nodes'] = [{:name => "'rabbit@silog-front3'",:type => "disc"}]

It's work

@monkey1016

This comment has been minimized.

Copy link

commented May 12, 2015

Looks like there are some cases where rabbitmqctl eval "node()." returns a name with single-quotes and some other instances where it returns a name without single-quotes. I think it has to do with dashes in the short hostname:

[vagrant@rabbitmq1 ~]$ sudo rabbitmqctl eval "node()."
rabbit@rabbitmq1

vs

[vagrant@rabbitmq-1 ~]$ sudo rabbitmqctl eval "node()."
'rabbit@rabbitmq-1'
@jperville

This comment has been minimized.

Copy link
Contributor

commented May 27, 2015

+1, thanks for fixing the issue @monkey1016

@jjasghar jjasghar closed this Oct 22, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.