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 starting service on Ubuntu 16.04 (xenial64) #132

Open
gigo6000 opened this issue Mar 6, 2017 · 1 comment
Open

Error starting service on Ubuntu 16.04 (xenial64) #132

gigo6000 opened this issue Mar 6, 2017 · 1 comment

Comments

@gigo6000
Copy link
Contributor

gigo6000 commented Mar 6, 2017

I'm using this box in Vagrant:

   8   # box
   9   config.vm.box = 'ubuntu/xenial64'

And here's the error:

==> default: - restart service service[chef-client]
==> default: 
==> default: 
==> default: [2017-03-06T17:24:50+00:00] INFO: template[/etc/mongodb.conf] sending restart action to service[mongodb] (delayed)
==> default: Recipe: sc-mongodb::default
==> default:   * service[mongodb] action restart
==> default: [2017-03-06T17:24:50+00:00] ERROR: service[mongodb] (sc-mongodb::default line 197) had an error: Errno::ENOENT: No such file or directory - /sbin/status; ignore_failure is set, continuing
==> default: 
==> default:     
==> default:     
==> default: ================================================================================
==> default:     Error executing action `restart` on resource 'service[mongodb]'
==> default:     ================================================================================
==> default:     
==> default: 
==> default:     
==> default: Errno::ENOENT
==> default: 
==> default:     
==> default: -------------
==> default:     No such file or directory - /sbin/status
==> default:     
==> default:     Resource Declaration:
==> default:     ---------------------
==> default:     # In /var/chef/cache/cookbooks/sc-mongodb/definitions/mongodb.rb
==> default:     
==> default:     197:   service new_resource.name do
==> default:     198:     provider Chef::Provider::Service::Upstart if node['mongodb']['apt_repo'] == 'ubuntu-upstart'
==> default:     199:     supports status: true, restart: true
==> default:     
==> default: 200:     action new_resource.service_action
==> default: 
==> default:     
==> default: 201:     new_resource.service_notifies.each do |service_notify|
==> default:     
==> default: 202:       notifies :run, service_notify
==> default:     203:     end
==> default:     204:     notifies :create, 'ruby_block[config_replicaset]', :immediately if new_resource.is_replicaset && new_resource.auto_configure_replicaset
==> default:     205:     notifies :create, 'ruby_block[config_sharding]', :immediately if new_resource.is_mongos && new_resource.auto_configure_sharding
==> default:     206:     # we don't care about a running mongodb service in these cases, all we need is stopping it
==> default: 
==> default:     207:     ignore_failure true if new_resource.name == 'mongodb'
==> default:     
==> default: 208:   end
==> default:     209: 
==> default:     210:   # replicaset
==> default:     211:   if new_resource.is_replicaset && new_resource.auto_configure_replicaset
==> default:     212:     rs_nodes = search(
==> default:     213:       :node,
==> default:     
==> default: 214:       "mongodb_cluster_name:#{new_resource.replicaset['mongodb']['cluster_name']} AND \
==> default:     
==> default: 215:        mongodb_is_replicaset:true AND \
==> default:     
==> default: 216:        mongodb_config_replSet:#{new_resource.replicaset['mongodb']['config']['replSet']} AND \
==> default:     217:        chef_environment:#{new_resource.replicaset.chef_environment}"
==> default:     218:     )
==> default:     219: 
==> default:     220:     ruby_block 'config_replicaset' do
==> default:     
==> default: 221:       block do
==> default:     222:         MongoDB.configure_replicaset(new_resource.replicaset, replicaset_name, rs_nodes) unless new_resource.replicaset.nil?
==> default:     223:       end
==> default:     224:       action :nothing
==> default:     
==> default: 225:     end
==> default:     226: 
==> default:     
==> default: 227:     ruby_block 'run_config_replicaset' do
==> default:     228:       block {}
==> default:     229:       notifies :create, 'ruby_block[config_replicaset]'
==> default:     230:     end
==> default:     231:   end
==> default:     
==> default: 232: 
==> default:     
==> default:     Compiled Resource:
==> default:     
==> default: ------------------
==> default:     # Declared in /var/chef/cache/cookbooks/sc-mongodb/definitions/mongodb.rb:197:in `block in from_file'
==> default:     
==> default:     service("mongodb") do
==> default:       params {:mongodb_type=>"mongod", :action=>[:enable, :start], :logpath=>"/var/log/mongodb/mongodb.log", :dbpath=>"/data", :configservers=>[], :replicaset=>nil, :notifies=>[], :bind_ip=>"0.0.0.0", :port=>27017, :enable_rest=>false, :smallfiles=>false, :only_if=>[], :name=>"mongodb"}
==> default:       provider Chef::Provider::Service::Upstart
==> default:     
==> default:   action [:enable, :start]
==> default:     
==> default:   supports {:status=>true, :restart=>true}
==> default:       ignore_failure true
==> default:     
==> default:   retries 0
==> default:       retry_delay 2
==> default:       default_guard_interpreter :default
==> default:       service_name "mongodb"
==> default:     
==> default:   enabled nil
==> default:     
==> default:   running nil
==> default:     
==> default:   masked nil
==> default:     
==> default:   pattern "mongodb"
==> default:     
==> default:   declared_type :service
==> default: 
==> default:     
==> default:   cookbook_name "sc-mongodb"
==> default: 
==> default:       recipe_name "default"
==> default:     end
==> default:     
==> default: 
==> default: 
==> default:     Platform:
==> default:     ---------
==> default:     x86_64-linux


Fix here: #131

@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

2 participants