edelight / chef-mongodb

MongoDB Chef cookbook
https://community.opscode.com/cookbooks/mongodb
Apache License 2.0
363 stars 3 forks source link

Version '2.4.9' for 'mongodb-org' was not found #341

Closed sashazykov closed 10 years ago

sashazykov commented 10 years ago

I am getting this error on my ubuntu nodes which were deployed using this cookbook:

[2014-09-25T15:36:38+02:00] ERROR: package[mongodb-org] (mongodb::install line 65) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '100'
---- Begin output of apt-get -q -y -o Dpkg::Options::="--force-confold" install mongodb-org=2.4.9 ----
STDOUT: Reading package lists...
Building dependency tree...
Reading state information...
STDERR: E: Version '2.4.9' for 'mongodb-org' was not found
---- End output of apt-get -q -y -o Dpkg::Options::="--force-confold" install mongodb-org=2.4.9 ----

Please, help me to fix it. I have tried to change package version to 2.4.11, but it doesn't help.

sashazykov commented 10 years ago

It used to install 10gen package, but now it's trying to install mongodb-org.

sashazykov commented 10 years ago

Probably, it's happened after upgrading the cookbook from 0.13.4 to 0.16.1.

jamesonjlee commented 10 years ago

if you are latest head (which reminds me we need to push the latest to supermarket) this should be fixed.

sashazykov commented 10 years ago

Now I get this error:

Setting up mongodb-org-shell (2.6.4) ...
Setting up mongodb-org-server (2.6.4) ...
 * Starting database mongod
   ...fail!
Setting up mongodb-org-mongos (2.6.4) ...
Setting up mongodb-org-tools (2.6.4) ...
Processing triggers for ureadahead (0.100.0-16) ...
STDERR: invoke-rc.d: initscript mongod, action "start" failed.
dpkg: error processing package mongodb-org-server (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mongodb-org:
 mongodb-org depends on mongodb-org-server; however:
  Package mongodb-org-server is not configured yet.

dpkg: error processing package mongodb-org (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 mongodb-org-server
 mongodb-org
E: Sub-process /usr/bin/dpkg returned an error code (1)
---- End output of apt-get -q -y -o Dpkg::Options::="--force-confold" install mongodb-org=2.6.4 ----
Ran apt-get -q -y -o Dpkg::Options::="--force-confold" install mongodb-org=2.6.4 returned 100
jamesonjlee commented 10 years ago

so it says dependency problems, can you see what package it needs?

sashazykov commented 10 years ago

Now it says "Version '2.4.11' for 'mongodb-org' was not found" ;( I don't really understand what's happening. Maybe I somehow switched from another cookbook, I used to use replicaset_name and key_file attributes, but I can't find them in this cookbook docs.

sashazykov commented 10 years ago

I removed version number from my role configuration and now it works, but my old configuration is not used:

{
  "default_attributes": {
    "mongodb": {
      "replicaset_name": "uuset",
      "key_file": "secret",
      "rest": true,
      "auto_configure": {
        "replicaset": false
      }
    }
  }
}
jamesonjlee commented 10 years ago

@alexandrz that's because the cookbook on supermarket is outdated (and I have not bumped or released).

I will see if I can get some done through this week(end).

mguinada commented 10 years ago

I still see this issue on version 0.16.2 or the latest head!

0.16.2 log output:

FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
ERROR: package[mongodb-org] (mongodb::install line 77) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '100'
---- Begin output of apt-get -q -y -o Dpkg::Options::="--force-confold" --force-yes install mongodb-org=2.4.9 ----
STDOUT: Reading package lists...
Building dependency tree...
Reading state information...
STDERR: E: Version '2.4.9' for 'mongodb-org' was not found
---- End output of apt-get -q -y -o Dpkg::Options::="--force-confold" --force-yes install mongodb-org=2.4.9 ----
Ran apt-get -q -y -o Dpkg::Options::="--force-confold" --force-yes install mongodb-org=2.4.9 returned 100
[2014-11-24T15:05:14+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

Can someone shed some light on this?

david-martin commented 9 years ago

seeing a similar issue ubuntu 12.04

==> single: Mixlib::ShellOut::ShellCommandFailed
==> single: ------------------------------------
==> single: Expected process to exit with [0], but received '100'
==> single: ---- Begin output of apt-get -q -y -o Dpkg::Options::="--force-confold" --force-yes install mongodb-org=2.4.6 ----
==> single: STDOUT: Reading package lists...
==> single: Building dependency tree...
==> single: Reading state information...
==> single: STDERR: E: Version '2.4.6' for 'mongodb-org' was not found
==> single: ---- End output of apt-get -q -y -o Dpkg::Options::="--force-confold" --force-yes install mongodb-org=2.4.6 ----
==> single: Ran apt-get -q -y -o Dpkg::Options::="--force-confold" --force-yes install mongodb-org=2.4.6 returned 100

Looks like the mongodb-org package just isn't there at that version. Seems to be >=2.6.0 only http://downloads-distro.mongodb.org/repo/debian-sysvinit/dists/dist/10gen/binary-amd64/

david-martin commented 9 years ago

Including this recipe

include_recipe 'mongodb::10gen_repo'

results in the following log output from 10gen_repo.rb

WARN: 10gen_repo is deprecated, use mongodb_org_repo

This in turn sets the package name to mongodb-org in mongodb_org_repo.rb

node.override['mongodb']['package_name'] = 'mongodb-org'

Then when running recipes/install.rb, the mongodb-org package is the one that (attempts to) get installed Solution may be to override the package_name with mongodb-10gen after running mongodb::10gen_repo, then run mongodb::install