Note that there are some explanatory texts on larger screens.

plurals
  1. POMongodb error: JavaScript execution failed
    primarykey
    data
    text
    <p>In my application i am executing following query on Mongodb collection. It moves all the records of <code>collection</code> to <code>his_collection</code></p> <pre><code>`for record in collection.find(): his_collection.insert(record) collection.remove()` </code></pre> <p>With <strong>3k</strong> rows in <code>collection</code> table it works fine i.e All the rows are moved to his_collection.</p> <p>But when i executed the above command With <strong>10k</strong> rows in <code>collection</code>. It hanged</p> <p>Now when i am trying to connect Mongodb with command <code>mongo</code> in shell it throws following <strong>Error</strong></p> <pre><code>MongoDB shell version: 2.4.5 connecting to: test Fri Aug 23 12:41:28.762 JavaScript execution failed: Error: couldn't connect to server 127.0.0.1:27017 at src/mongo/shell/mongo.js:L112 exception: connect failed </code></pre> <p>I tried following commands in shell to get rid of this problem</p> <pre><code>service mongodb stop rm /mnt-data/data/mongodb/mongod.lock mongod –repair --dbpath=/mnt-data/data/mongodb/ service mongodb start </code></pre> <p>Please suggest me any suggestion what should i do?</p> <p><strong>LOG for mongod -repair</strong></p> <pre><code>Fri Aug 23 12:56:36.617 [initandlisten] MongoDB starting : pid=16997 port=27017 dbpath=/mnt-data/data/mongodb/ 64-bit host= Fri Aug 23 12:56:36.618 [initandlisten] db version v2.4.5 Fri Aug 23 12:56:36.618 [initandlisten] git version: Fri Aug 23 12:56:36.618 [initandlisten] build info: Linux Fri Aug 23 12:56:36.618 [initandlisten] allocator: tcmalloc Fri Aug 23 12:56:36.618 [initandlisten] options: { dbpath: "/mnt-data/data/mongo db/", repair: true } Fri Aug 23 12:56:36.625 [initandlisten] **** Fri Aug 23 12:56:36.625 [initandlisten] **** Fri Aug 23 12:56:36.625 [initandlisten] need to upgrade database jf_db with pdfi le version 4.5, new version: 4.5 Fri Aug 23 12:56:36.625 [initandlisten] starting upgrade Fri Aug 23 12:56:36.625 [initandlisten] jf_db repairDatabase jf_db Fri Aug 23 12:56:36.626 [initandlisten] jf_db Cannot repair database jf_db havi ng size: 12829327360 (bytes) because free disk space is: 3514216448 (bytes) Fri Aug 23 12:56:36.626 [initandlisten] jf_db Assertion failure doDBUpgrade( db Name , errmsg , h ) src/mongo/db/db.cpp 353 0xdd9e31 0xd9b04d 0x6d3116 0x6d6e88 0x6d74cd 0x6ddfb0 0x6dfc09 0x7f8ee2ba976d 0x 6cf979 mongod(_ZN5mongo15printStackTraceERSo+0x21) [0xdd9e31] mongod(_ZN5mongo12verifyFailedEPKcS1_j+0xfd) [0xd9b04d] mongod() [0x6d3116] mongod(_ZN5mongo14_initAndListenEi+0x5d8) [0x6d6e88] mongod(_ZN5mongo13initAndListenEi+0x1d) [0x6d74cd] mongod() [0x6ddfb0] mongod(main+0x9) [0x6dfc09] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed) [0x7f8ee2ba976d] mongod(__gxx_personality_v0+0x499) [0x6cf979] Fri Aug 23 12:56:36.629 [initandlisten] exception in initAndListen: 0 assertion src/mongo/db/db.cpp:353, terminating Fri Aug 23 12:56:36.629 dbexit: Fri Aug 23 12:56:36.629 [initandlisten] shutdown: going to close listening socke ts... Fri Aug 23 12:56:36.629 [initandlisten] shutdown: going to flush diaglog... Fri Aug 23 12:56:36.629 [initandlisten] shutdown: going to close sockets... Fri Aug 23 12:56:36.629 [initandlisten] shutdown: waiting for fs preallocator... Fri Aug 23 12:56:36.629 [initandlisten] shutdown: closing all files... Fri Aug 23 12:56:36.631 [initandlisten] closeAllFiles() finished Fri Aug 23 12:56:36.631 [initandlisten] shutdown: removing fs lock... Fri Aug 23 12:56:36.631 dbexit: really exiting now </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload