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

uninitialized constant IRB::Abort #162

Open
mateusduboli opened this issue Jun 12, 2017 · 4 comments
Open

uninitialized constant IRB::Abort #162

mateusduboli opened this issue Jun 12, 2017 · 4 comments

Comments

@mateusduboli
Copy link
Contributor

I'm getting this error message from trying run chef on a newly created mongodb instance with a replica set configuration:

Message

aws_instance.graylog-mongodb.0 (chef):     - restart service service[mongod]
aws_instance.graylog-mongodb.0 (chef):   * ruby_block[config_replicaset] action create

aws_instance.graylog-mongodb.0 (chef):
aws_instance.graylog-mongodb.0 (chef):     ================================================================================
aws_instance.graylog-mongodb.0 (chef):     Error executing action `create` on resource 'ruby_block[config_replicaset]'
aws_instance.graylog-mongodb.0 (chef):     ================================================================================

aws_instance.graylog-mongodb.0 (chef):     NameError
aws_instance.graylog-mongodb.0 (chef):     ---------
aws_instance.graylog-mongodb.0 (chef):     uninitialized constant IRB::Abort

aws_instance.graylog-mongodb.0 (chef):     Cookbook Trace:
aws_instance.graylog-mongodb.0 (chef):     ---------------
aws_instance.graylog-mongodb.0 (chef):     /var/chef/cache/cookbooks/sc-mongodb/libraries/mongodb.rb:97:in `configure_replicaset'
aws_instance.graylog-mongodb.0 (chef):     /var/chef/cache/cookbooks/sc-mongodb/definitions/mongodb.rb:246:in `block (3 levels) in from_file'

aws_instance.graylog-mongodb.0 (chef):     Resource Declaration:
aws_instance.graylog-mongodb.0 (chef):     ---------------------
aws_instance.graylog-mongodb.0 (chef):     # In /var/chef/cache/cookbooks/sc-mongodb/definitions/mongodb.rb
aws_instance.graylog-mongodb.0 (chef):
aws_instance.graylog-mongodb.0 (chef):     244:     ruby_block 'config_replicaset' do
aws_instance.graylog-mongodb.0 (chef):     245:       block do
aws_instance.graylog-mongodb.0 (chef):     246:         MongoDB.configure_replicaset(node, replicaset_name, rs_nodes) unless new_resource.replicaset.nil?
aws_instance.graylog-mongodb.0 (chef):     247:       end
aws_instance.graylog-mongodb.0 (chef):     248:       action :nothing
aws_instance.graylog-mongodb.0 (chef):     249:     end
aws_instance.graylog-mongodb.0 (chef):     250:
aws_instance.graylog-mongodb.0 (chef):
aws_instance.graylog-mongodb.0 (chef):     Compiled Resource:
aws_instance.graylog-mongodb.0 (chef):     ------------------
aws_instance.graylog-mongodb.0 (chef):     # Declared in /var/chef/cache/cookbooks/sc-mongodb/definitions/mongodb.rb:244:in `block in from_file'
aws_instance.graylog-mongodb.0 (chef):
aws_instance.graylog-mongodb.0 (chef):     ruby_block("config_replicaset") do
aws_instance.graylog-mongodb.0 (chef):       params {:mongodb_type=>"mongod", :action=>[:enable, :start], :logpath=>"/var/log/mongodb/mongod.log", :configservers=>[], :replicaset=>true, :notifies=>[], :not_if=>[], :name=>"mongod"}
aws_instance.graylog-mongodb.0 (chef):       action [:nothing]
aws_instance.graylog-mongodb.0 (chef):       default_guard_interpreter :default
aws_instance.graylog-mongodb.0 (chef):       block_name "config_replicaset"
aws_instance.graylog-mongodb.0 (chef):       declared_type :ruby_block
aws_instance.graylog-mongodb.0 (chef):       cookbook_name "sc-mongodb"
aws_instance.graylog-mongodb.0 (chef):       recipe_name "replicaset"
aws_instance.graylog-mongodb.0 (chef):       block #<Proc:0x0000000489a400@/var/chef/cache/cookbooks/sc-mongodb/definitions/mongodb.rb:245>
aws_instance.graylog-mongodb.0 (chef):     end
aws_instance.graylog-mongodb.0 (chef):
aws_instance.graylog-mongodb.0 (chef):     System Info:
aws_instance.graylog-mongodb.0 (chef):     ------------
aws_instance.graylog-mongodb.0 (chef):     chef_version=13.1.31
aws_instance.graylog-mongodb.0 (chef):     platform=centos
aws_instance.graylog-mongodb.0 (chef):     platform_version=7.3.1611
aws_instance.graylog-mongodb.0 (chef):     ruby=ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux]
aws_instance.graylog-mongodb.0 (chef):     program_name=chef-client worker: ppid=8166;start=18:41:34;
aws_instance.graylog-mongodb.0 (chef):     executable=/opt/chef/bin/chef-client

I'm running chef using terraform and the only recipe in the run-list is sc-mongodb::replicaset.

Any reason why is this happening?

@dyf182
Copy link

dyf182 commented Jun 24, 2017

+1

1 similar comment
@tayeke
Copy link

tayeke commented Aug 15, 2017

+1

@mateusduboli
Copy link
Contributor Author

This happens when you run the cookbook first with sc-mongodb::install and then use sc-mongodb::replicaset.

It can be fixed if you install mongo using sc-mongodb::replicaset with node['mongodb']['auto_configure']['replicaset'] = false to not run the replicaset script.

I didn't looked much into it, but seems to be a valid workaround.

@github-actions
Copy link

Marking stale due to inactivity. Remove stale label or comment or this will be closed in 7 days. Alternatively drop by the #sous-chefs channel on the Chef Community Slack and we'll be happy to help! Thanks, Sous-Chefs.

@github-actions github-actions bot added the Stale label Sep 30, 2020
@xorimabot xorimabot removed the Stale label Sep 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants