Problems upgrading MongoDB -


i have difficulty updating mongodb version 2.0.6 current 2.4. please help

below log file get:

tue may 14 08:02:03.339 [initandlisten] mongodb starting : pid=1906 port=27017 dbpath=/mnt2/var/lib/mongodb/ 64-bit host=ip-10-131-65-73 tue may 14 08:02:03.339 [initandlisten] db version v2.4.3 tue may 14 08:02:03.339 [initandlisten] git version: fe1743177a5ea03e91e0052fb5e2cb2945f6d95f tue may 14 08:02:03.340 [initandlisten] build info: linux ip-10-2-29-40 2.6.21.7-2.ec2.v1.2.fc8xen #1 smp fri nov 20 17:48:28 est 2009 x86_64 boost_lib_version=1_49 tue may 14 08:02:03.340 [initandlisten] allocator: tcmalloc tue may 14 08:02:03.340 [initandlisten] options: { dbpath: "/mnt2/var/lib/mongodb/" } tue may 14 08:02:03.347 [initandlisten] journal dir=/mnt2/var/lib/mongodb/journal tue may 14 08:02:03.347 [initandlisten] recover : no journal files present, no recovery needed tue may 14 08:02:03.554 [initandlisten] build index backendtemp.system.users { user: 1, usersource: 1 } tue may 14 08:02:03.557 [initandlisten] duplicate key exception while trying build unique index on backendtemp.system.users.  have user documents duplicate "user" fields.  resolve this, start version of mongodb prior 2.4, drop duplicate user documents, start again current version. tue may 14 08:02:03.557 [initandlisten] exception in initandlisten: 11000 e11000 duplicate key error index: backendtemp.system.users.$user_1_usersource_1  dup key: { : "ad", : null }, terminating tue may 14 08:02:03.557 dbexit:  tue may 14 08:02:03.557 [initandlisten] shutdown: going close listening sockets... tue may 14 08:02:03.557 [initandlisten] shutdown: going flush diaglog... tue may 14 08:02:03.557 [initandlisten] shutdown: going close sockets... tue may 14 08:02:03.558 [initandlisten] shutdown: waiting fs preallocator... tue may 14 08:02:03.558 [initandlisten] shutdown: lock final commit... tue may 14 08:02:03.558 [initandlisten] shutdown: final commit... tue may 14 08:02:03.572 [initandlisten] shutdown: closing files... tue may 14 08:02:03.573 [initandlisten] closeallfiles() finished tue may 14 08:02:03.573 [initandlisten] journalcleanup... tue may 14 08:02:03.573 [initandlisten] removejournalfiles tue may 14 08:02:03.575 [initandlisten] shutdown: removing fs lock... tue may 14 08:02:03.575 dbexit: exiting 

in version 2.4 mongodb introduced role-based access control requires uniqueness of user in user privilege documents per database. previous versions of mongodb didn't have requirement, database may have duplicate user entries in system.users.

you can either:

  1. downgrade mongodb older version, remove duplicate entries , upgrade mongodb again, or:
  2. if in development environment and/or don't care data (i.e. loosing entire database), can remove database files manually through filesystem. on linux located @ "/var/lib/mongodb/name-of-the-database". try starting mongodb after , cool.

see: mongodb 2.4 upgrade recommendations , checklist


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -