title: Upgraded MongoDB to 2.6 and now get "ClientCursorMonitor exception"
body: <p>I did not manually upgrade the database. I updated the packages on my Ubuntu virtual machine and it updated the mongodb to 2.6.10 from 2.4.10. Now the mongodb process won't start. I read that there are some changes to the way authentication is done in 2.6. I am not sure if that is what is causing this error?</p>
  
  <pre><code>2018-02-10T06:52:42.780-0600 ***** SERVER RESTARTED *****
  2018-02-10T06:52:42.782-0600 [initandlisten] MongoDB starting : pid=3705 port=27017 dbpath=/var/lib/mongodb 64-bit
  2018-02-10T06:52:42.782-0600 [initandlisten] db version v2.6.10
  2018-02-10T06:52:42.782-0600 [initandlisten] git version: nogitversion
  2018-02-10T06:52:42.782-0600 [initandlisten] OpenSSL version: OpenSSL 1.0.2g  1 Mar 2016
  2018-02-10T06:52:42.782-0600 [initandlisten] build info: Linux lgw01-12 3.19.0-25-generic #26~14.04.1-Ubuntu SMP Fri Jul 24 21:16:20 UTC 2015 x86_64 BOOST_LIB_VERSION=1_58
  2018-02-10T06:52:42.782-0600 [initandlisten] allocator: tcmalloc
  2018-02-10T06:52:42.782-0600 [initandlisten] options: { config: "mongodb.conf", net: { bindIp: "127.0.0.1", port: 27017 }, storage: { dbPath: "/var/lib/mongodb", journal: { enabled: true },
  smallFiles: true }, systemLog: { destination: "file", logAppend: true, path: "/var/log/mongodb/mongod.log" } }
  2018-02-10T06:52:42.785-0600 [initandlisten] journal dir=/var/lib/mongodb/journal
  2018-02-10T06:52:42.785-0600 [initandlisten] recover : no journal files present, no recovery needed
  2018-02-10T06:52:42.782-0600 [initandlisten] options: { config: "mongodb.conf", net: { bindIp: "127.0.0.1", port: 27017 }, storage: { dbPath: "/var/lib/mongodb", journal: { enabled: true },
  smallFiles: true }, systemLog: { destination: "file", logAppend: true, path: "/var/log/mongodb/mongod.log" } }
  2018-02-10T06:52:42.785-0600 [initandlisten] journal dir=/var/lib/mongodb/journal
  2018-02-10T06:52:42.785-0600 [initandlisten] recover : no journal files present, no recovery needed
  2018-02-10T06:52:42.914-0600 [initandlisten] admin.system.version Assertion failure 0 == _descriptor-&gt;version() || 1 == _descriptor-&gt;version() src/mongo/db/index/btree_based_access_method.cp
  p 54
  2018-02-10T06:52:42.918-0600 [initandlisten] admin.system.version 0xedb3e9 0xe6fb3f 0xe4aae2 0x963f2c 0x96226c 0x740760 0x742c0b 0x743ec8 0x723177 0x72f913 0xaeb109 0x86eda6 0x86effa 0x6d9f9
  8 0x6ddef7 0x6c18aa 0x6be82e 0x61fc9a 0x620903 0x5e943c
   mongod(_ZN5mongo15printStackTraceERSo+0x39) [0xedb3e9]
   mongod(_ZN5mongo10logContextEPKc+0x21f) [0xe6fb3f]
   mongod(_ZN5mongo12verifyFailedEPKcS1_j+0x142) [0xe4aae2]
   mongod() [0x963f2c]
   mongod(_ZN5mongo17BtreeAccessMethodC1EPNS_17IndexCatalogEntryE+0x2c) [0x96226c]
   mongod(_ZN5mongo12IndexCatalog19_createAccessMethodEPKNS_15IndexDescriptorEPNS_17IndexCatalogEntryE+0x200) [0x740760]
   mongod(_ZN5mongo12IndexCatalog24_setupInMemoryStructuresEPNS_15IndexDescriptorE+0xeb) [0x742c0b]
   mongod(_ZN5mongo12IndexCatalog4initEv+0x258) [0x743ec8]
   mongod(_ZN5mongo10CollectionC2ERKNS_10StringDataEPNS_16NamespaceDetailsEPNS_8DatabaseE+0x297) [0x723177]
   mongod(_ZN5mongo8Database13getCollectionERKNS_10StringDataE+0xe3) [0x72f913]
   mongod(_ZN5mongo9getRunnerEPNS_14CanonicalQueryEPPNS_6RunnerEm+0x89) [0xaeb109]
   mongod(_ZN5mongo7Helpers7findOneERKNS_10StringDataERKNS_7BSONObjEb+0xb6) [0x86eda6]
   mongod(_ZN5mongo7Helpers7findOneERKNS_10StringDataERKNS_7BSONObjERS4_b+0x2a) [0x86effa]
   mongod(_ZN5mongo31AuthzManagerExternalStateMongod7findOneERKNS_15NamespaceStringERKNS_7BSONObjEPS4_+0x88) [0x6d9f98]
   mongod(_ZN5mongo30AuthzManagerExternalStateLocal29getStoredAuthorizationVersionEPi+0x67) [0x6ddef7]
   mongod(_ZN5mongo20AuthorizationManager23getAuthorizationVersionEPi+0x34a) [0x6c18aa]
   mongod(_ZN5mongo9authindex22configureSystemIndexesERKNS_10StringDataE+0x3e) [0x6be82e]
   mongod(_ZN5mongo14_initAndListenEi+0xada) [0x61fc9a]
   mongod(_ZN5mongo13initAndListenEi+0x23) [0x620903]
   mongod(main+0x23c) [0x5e943c]
  2018-02-10T06:52:42.919-0600 [clientcursormon] admin.system.version Assertion failure 0 == _descriptor-&gt;version() || 1 == _descriptor-&gt;version() src/mongo/db/index/btree_based_access_method.
  cpp 54
  2018-02-10T06:52:42.922-0600 [clientcursormon] admin.system.version 0xedb3e9 0xe6fb3f 0xe4aae2 0x963f2c 0x96226c 0x740760 0x742c0b 0x743ec8 0x723177 0x72f913 0x72ad7a 0x75e005 0xe4dcad 0x7f5
  6a1b765d5 0x7f56a10c96ba 0x7f569feb141d
   mongod(_ZN5mongo15printStackTraceERSo+0x39) [0xedb3e9]
   mongod(_ZN5mongo10logContextEPKc+0x21f) [0xe6fb3f]
   mongod(_ZN5mongo12verifyFailedEPKcS1_j+0x142) [0xe4aae2]
   mongod() [0x963f2c]
   mongod(_ZN5mongo17BtreeAccessMethodC1EPNS_17IndexCatalogEntryE+0x2c) [0x96226c]
   mongod(_ZN5mongo12IndexCatalog19_createAccessMethodEPKNS_15IndexDescriptorEPNS_17IndexCatalogEntryE+0x200) [0x740760]
   mongod(_ZN5mongo12IndexCatalog24_setupInMemoryStructuresEPNS_15IndexDescriptorE+0xeb) [0x742c0b]
   mongod(_ZN5mongo12IndexCatalog4initEv+0x258) [0x743ec8]
   mongod(_ZN5mongo10CollectionC2ERKNS_10StringDataEPNS_16NamespaceDetailsEPNS_8DatabaseE+0x297) [0x723177]
   mongod(_ZN5mongo8Database13getCollectionERKNS_10StringDataE+0xe3) [0x72f913]
   mongod(_ZN5mongo19GlobalCursorIdCache14timeoutCursorsEj+0x7ba) [0x72ad7a]
   mongod(_ZN5mongo19ClientCursorMonitor3runEv+0x95) [0x75e005]
   mongod(_ZN5mongo13BackgroundJob7jobBodyEv+0x14d) [0xe4dcad]
   /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.58.0(+0x115d5) [0x7f56a1b765d5]
   /lib/x86_64-linux-gnu/libpthread.so.0(+0x76ba) [0x7f56a10c96ba]
   /lib/x86_64-linux-gnu/libc.so.6(clone+0x6d) [0x7f569feb141d]
  2018-02-10T06:52:42.922-0600 [clientcursormon] ERROR: backgroundjob ClientCursorMonitor exception: assertion src/mongo/db/index/btree_based_access_method.cpp:54
  2018-02-10T06:52:42.922-0600 [initandlisten] exception in initAndListen: 0 assertion src/mongo/db/index/btree_based_access_method.cpp:54, terminating
  2018-02-10T06:52:42.922-0600 [initandlisten] dbexit:
  2018-02-10T06:52:42.922-0600 [initandlisten] shutdown: going to close listening sockets...
  2018-02-10T06:52:42.922-0600 [initandlisten] shutdown: going to flush diaglog...
  2018-02-10T06:52:42.922-0600 [initandlisten] shutdown: going to close sockets...
  2018-02-10T06:52:42.922-0600 [initandlisten] shutdown: waiting for fs preallocator...
  2018-02-10T06:52:42.922-0600 [initandlisten] shutdown: lock for final commit...
  2018-02-10T06:52:42.922-0600 [initandlisten] shutdown: final commit...
  2018-02-10T06:52:42.922-0600 [initandlisten] shutdown: closing all files...
  2018-02-10T06:52:42.922-0600 [initandlisten] closeAllFiles() finished
  2018-02-10T06:52:42.922-0600 [initandlisten] journalCleanup...
  2018-02-10T06:52:42.922-0600 [initandlisten] removeJournalFiles
  2018-02-10T06:52:42.924-0600 [initandlisten] shutdown: removing fs lock
  </code></pre>
  
  <p>Below is the truncated apt log:</p>
  
  <pre><code>Log started: 2018-02-01  18:11:44
  Unpacking linux-image-4.4.0-1050-aws (4.4.0-1050.59) ...
  Preparing to unpack .../linux-aws_4.4.0.1050.52_amd64.deb ...
  Unpacking linux-aws (4.4.0.1050.52) over (4.4.0.1049.51) ...
  Preparing to unpack .../linux-image-aws_4.4.0.1050.52_amd64.deb ...
  Unpacking linux-image-aws (4.4.0.1050.52) over (4.4.0.1049.51) ...
  Selecting previously unselected package linux-aws-headers-4.4.0-1050.
  Preparing to unpack .../linux-aws-headers-4.4.0-1050_4.4.0-1050.59_all.deb ...
  Unpacking linux-aws-headers-4.4.0-1050 (4.4.0-1050.59) ...
  Selecting previously unselected package linux-headers-4.4.0-1050-aws.
  Preparing to unpack .../linux-headers-4.4.0-1050-aws_4.4.0-1050.59_amd64.deb ...
  Unpacking linux-headers-4.4.0-1050-aws (4.4.0-1050.59) ...
  Preparing to unpack .../linux-headers-aws_4.4.0.1050.52_amd64.deb ...
  Unpacking linux-headers-aws (4.4.0.1050.52) over (4.4.0.1049.51) ...
  Preparing to unpack .../mongodb-org-shell_3.4.10_amd64.deb ...
  Unpacking mongodb-org-shell (3.4.10) over (3.4.9) ...
  Preparing to unpack .../mongodb-org-server_3.4.10_amd64.deb ...
  Unpacking mongodb-org-server (3.4.10) over (3.4.9) ...
  Preparing to unpack .../mongodb-org-mongos_3.4.10_amd64.deb ...
  Unpacking mongodb-org-mongos (3.4.10) over (3.4.9) ...
  Preparing to unpack .../mongodb-org-tools_3.4.10_amd64.deb ...
  Unpacking mongodb-org-tools (3.4.10) over (3.4.9) ...
  Preparing to unpack .../mongodb-org_3.4.10_amd64.deb ...
  Unpacking mongodb-org (3.4.10) over (3.4.9) ...
  Setting up linux-image-aws (4.4.0.1050.52) ...
  Setting up linux-aws-headers-4.4.0-1050 (4.4.0-1050.59) ...
  Setting up linux-headers-4.4.0-1050-aws (4.4.0-1050.59) ...
  Setting up linux-headers-aws (4.4.0.1050.52) ...
  Setting up linux-aws (4.4.0.1050.52) ...
  Setting up mongodb-org-shell (3.4.10) ...
  Setting up mongodb-org-server (3.4.10) ...
  Setting up mongodb-org-mongos (3.4.10) ...
  Setting up mongodb-org-tools (3.4.10) ...
  Setting up mongodb-org (3.4.10) ...
  Found kernel: /boot/vmlinuz-4.4.0-1022-aws
  Updating /boot/grub/menu.lst ... done
  
  Setting up overlayroot (0.27ubuntu1.5) ...
  Installing new version of config file /etc/overlayroot.conf ...
  Setting up unattended-upgrades (0.90ubuntu0.9) ...
  Setting up cloud-init (17.1-46-g7acc9e68-0ubuntu1~16.04.1) ...
  Installing new version of config file /etc/cloud/cloud.cfg ...
  Installing new version of config file /etc/cloud/templates/hosts.suse.tmpl ...
  Installing new version of config file /etc/cloud/templates/ntp.conf.sles.tmpl ...
  Installing new version of config file /etc/cloud/templates/sources.list.debian.tmpl ...
  Leaving 'diversion of /etc/init/ureadahead.conf to /etc/init/ureadahead.conf.disabled by cloud-init'
  Processing triggers for initramfs-tools (0.122ubuntu8.10) ...
  update-initramfs: Generating /boot/initrd.img-4.4.0-1050-aws
  W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.
  Setting up ubuntu-server (1.361.1) ...
  Setting up python3-distupgrade (1:16.04.23) ...
  Setting up python3-update-manager (1:16.04.10) ...
  Setting up ubuntu-release-upgrader-core (1:16.04.23) ...
  Setting up update-manager-core (1:16.04.10) ...
  Processing triggers for systemd (229-4ubuntu21) ...
  Processing triggers for ureadahead (0.100.0-19) ...
  Processing triggers for libc-bin (2.23-0ubuntu10) ...
  Processing triggers for resolvconf (1.78ubuntu5) ...
  Log ended: 2018-02-01  18:13:05
  </code></pre>
  
  <p>After the apt update... this is the log from mongodb...</p>
  
  <pre><code>2018-02-01T18:22:07.805-0600 I CONTROL  [signalProcessingThread] got signal 15 (Terminated), will terminate after current cmd ends
  2018-02-01T18:22:07.817-0600 I NETWORK  [signalProcessingThread] shutdown: going to close listening sockets...
  2018-02-01T18:22:07.820-0600 I NETWORK  [signalProcessingThread] closing listening socket: 7
  2018-02-01T18:22:07.820-0600 I NETWORK  [signalProcessingThread] closing listening socket: 8
  2018-02-01T18:22:07.821-0600 I NETWORK  [signalProcessingThread] removing socket file: /tmp/mongodb-27017.sock
  2018-02-01T18:22:07.821-0600 I NETWORK  [signalProcessingThread] shutdown: going to flush diaglog...
  2018-02-01T18:22:07.831-0600 I FTDC     [signalProcessingThread] Shutting down full-time diagnostic data capture
  2018-02-01T18:22:07.846-0600 I STORAGE  [signalProcessingThread] shutdown: waiting for fs preallocator...
  2018-02-01T18:22:07.846-0600 I STORAGE  [signalProcessingThread] shutdown: final commit...
  2018-02-01T18:22:07.846-0600 I JOURNAL  [signalProcessingThread] journalCleanup...
  2018-02-01T18:22:07.846-0600 I JOURNAL  [signalProcessingThread] removeJournalFiles
  2018-02-01T18:22:07.850-0600 I JOURNAL  [signalProcessingThread] old journal file will be removed: /var/lib/mongodb/journal/j._0
  2018-02-01T18:22:07.860-0600 I JOURNAL  [signalProcessingThread] Terminating durability thread ...
  2018-02-01T18:22:07.953-0600 I JOURNAL  [journal writer] Journal writer thread stopped
  2018-02-01T18:22:07.953-0600 I JOURNAL  [durability] Durability thread stopped
  2018-02-01T18:22:07.953-0600 I STORAGE  [signalProcessingThread] shutdown: closing all files...
  2018-02-01T18:22:07.953-0600 I STORAGE  [signalProcessingThread] closeAllFiles() finished
  2018-02-01T18:22:07.953-0600 I STORAGE  [signalProcessingThread] shutdown: removing fs lock...
  2018-02-01T18:22:07.954-0600 I CONTROL  [signalProcessingThread] now exiting
  2018-02-01T18:22:07.954-0600 I CONTROL  [initandlisten] shutting down with code:0
  2018-02-01T18:22:41.706-0600 I CONTROL  [main] ***** SERVER RESTARTED *****
  2018-02-01T18:22:41.719-0600 I CONTROL  [initandlisten] MongoDB starting : pid=1307 port=27017 dbpath=/var/lib/mongodb 64-bit host=ip-
  2018-02-01T18:22:41.719-0600 I CONTROL  [initandlisten] db version v3.4.10
  2018-02-01T18:22:41.719-0600 I CONTROL  [initandlisten] git version: 078f28920cb24de0dd479b5ea6c66c644f6326e9
  2018-02-01T18:22:41.719-0600 I CONTROL  [initandlisten] OpenSSL version: OpenSSL 1.0.2g  1 Mar 2016
  2018-02-01T18:22:41.719-0600 I CONTROL  [initandlisten] allocator: tcmalloc
  2018-02-01T18:22:41.719-0600 I CONTROL  [initandlisten] modules: none
  2018-02-01T18:22:41.719-0600 I CONTROL  [initandlisten] build environment:
  2018-02-01T18:22:41.719-0600 I CONTROL  [initandlisten]     distmod: ubuntu1604
  2018-02-01T18:22:41.719-0600 I CONTROL  [initandlisten]     distarch: x86_64
  2018-02-01T18:22:41.719-0600 I CONTROL  [initandlisten]     target_arch: x86_64
  2018-02-01T18:22:41.719-0600 I CONTROL  [initandlisten] options: { config: "/etc/mongodb.conf", net: { bindIp: "127.0.0.1" }, storage: { dbPath: "/var/lib/mo
  ngodb", journal: { enabled: true } }, systemLog: { destination: "file", logAppend: true, path: "/var/log/mongodb/mongodb.log" } }
  2018-02-01T18:22:41.827-0600 I -        [initandlisten] Detected data files in /var/lib/mongodb created by the 'mmapv1' storage engine, so setting the active
   storage engine to 'mmapv1'.
  2018-02-01T18:22:41.854-0600 I JOURNAL  [initandlisten] journal dir=/var/lib/mongodb/journal
  2018-02-01T18:22:41.855-0600 I JOURNAL  [initandlisten] recover : no journal files present, no recovery needed
  2018-02-01T18:22:41.855-0600 I JOURNAL  [initandlisten]
  2018-02-01T18:22:41.855-0600 E JOURNAL  [initandlisten] Insufficient free space for journal files
  2018-02-01T18:22:41.855-0600 I JOURNAL  [initandlisten] Please make at least 3379MB available in /var/lib/mongodb/journal or use --smallfiles
  2018-02-01T18:22:41.855-0600 I JOURNAL  [initandlisten]
  2018-02-01T18:22:41.866-0600 I STORAGE  [initandlisten] exception in initAndListen: 15926 Insufficient free space for journals, terminating
  2018-02-01T18:22:41.866-0600 I NETWORK  [initandlisten] shutdown: going to close listening sockets...
  2018-02-01T18:22:41.866-0600 I NETWORK  [initandlisten] removing socket file: /tmp/mongodb-27017.sock
  2018-02-01T18:22:41.866-0600 I NETWORK  [initandlisten] shutdown: going to flush diaglog...
  2018-02-01T18:22:41.866-0600 I STORAGE  [initandlisten] shutdown: waiting for fs preallocator...
  2018-02-01T18:22:41.866-0600 I STORAGE  [initandlisten] shutdown: final commit...
  2018-02-01T18:22:41.866-0600 I STORAGE  [initandlisten] shutdown: closing all files...
  2018-02-01T18:22:41.866-0600 I STORAGE  [initandlisten] closeAllFiles() finished
  2018-02-01T18:22:41.866-0600 I CONTROL  [initandlisten] now exiting
  2018-02-01T18:22:41.866-0600 I CONTROL  [initandlisten] shutting down with code:100
  </code></pre>
  
  <p>After seeing the insufficient free space message in the logs, I added smallFiles:true to the config file and restarted the database which is what caused the original error reported above.</p>