Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I already change the owner of the directory I want to use

root@ip-10-138-30-205:/media/newdrive# ls -l                                                                                                                                                                                     
total 20
drwxr-xr-x 3 mongodb root  4096 Aug 30 11:32 data
drwx------ 2 root    root 16384 Aug 30 09:56 lost+found
root@ip-10-138-30-205:/media/newdrive# 

I already restart mongodb

root@ip-10-138-30-205:/media/newdrive# service mongodb restart
mongodb stop/waiting
mongodb start/running, process 17140
root@ip-10-138-30-205:/media/newdrive# 

my mongodb.conf has already been changed

# Note: if you run mongodb as a non-root user (recommended) you may
# need to create and set permissions for this directory manually,
# e.g., if the parent directory isn't mutable by the mongodb user.                                                                                                                                                               
dbpath=/media/newdrive/data

#where to log
logpath=/var/log/mongodb/mongodb.log                                                                                                                                                                                             

logappend=true

#port = 27017                                                                                                                                                                                                                    

# Disables write-ahead journaling                                                                                                                                                                                                
# nojournal = true

# Enables periodic logging of CPU utilization and I/O wait

What else should I have done? I am using amazon ec2

Update: I already know what the problem is but here is the log anyway per comments. Thanks for the answer.

Thu Aug 30 17:52:30 [conn6]  isikota Btree::insert: key too large to index, skipping isikota.tablebusiness.$Long_IndexContents_Prominent 1106 { : BinData, : [ "a", "an", "and", "andi", "andid", "andido", "av", "ave", "aven", "aveni", "avenid", "avenida", "c", "ca", "can", "cand", "candi", "candid", "candido", "d", "da", "di", "did", "dido", "do", "e", "ei", "eir", "eira", "en", "eni", "enid", "enida", "i", "id", "ida", "ido", "il", "ilv", "ilve", "ilvei", "ilveir", "ilveira", "ir", "ira", "j", "jo", "jos", "josé", "l", "lv", "lve", "lvei", "lveir", "lveira", "n", "nd", "ndi", "ndid", "ndido", "ni", "nid", "nida", "o", "os", "osé", "r", "ra", "s", "si", "sil", "silv", "silve", "silvei", "silveir", "silveira", "sé", "v", "ve", "vei", "veir", "veira", "ven", "veni", "venid", "venida", "é" ], : 249.0 }
Thu Aug 30 17:52:30 [conn6]  isikota Btree::insert: key too large to index, skipping isikota.tablebusiness.$Long_IndexContents_Prominent 1156 { : BinData, : [ "(", "(p", "(pr", "(pri", "(priv", "(priva", "(privat", "(private", "(private)", ")", "0", "1", "19", "190", "9", "90", "a", "ag", "age", "agem", "at", "ate", "ate)", "c", "co", "con", "cont", "conta", "contag", "contage", "contagem", "e", "e)", "em", "g", "ge", "gem", "h", "ho", "hom", "home", "i", "iv", "iva", "ivat", "ivate", "ivate)", "m", "me", "n", "nt", "nta", "ntag", "ntage", "ntagem", "o", "om", "ome", "on", "ont", "onta", "ontag", "ontage", "ontagem", "p", "pr", "pri", "priv", "priva", "privat", "private", "private)", "r", "ri", "riv", "riva", "rivat", "rivate", "rivate)", "t", "ta", "tag", "tage", "tagem", "te", "te)", "v", "va", "vat", "vate", "vate)" ], : 9.0 }
Thu Aug 30 17:52:30 [conn6]  isikota Btree::insert: key too large to index, skipping isikota.tablebusiness.$Long_IndexContents_Prominent 1134 { : BinData, : [ "(", "(p", "(pr", "(pri", "(priv", "(priva", "(privat", "(private", "(private)", ")", "a", "at", "ate", "ate)", "c", "co", "cov", "covi", "covil", "d", "do", "e", "e)", "h", "ho", "hom", "home", "hos", "hoso", "i", "il", "in", "inh", "inho", "inhos", "inhoso", "iv", "iva", "ivat", "ivate", "ivate)", "l", "m", "me", "n", "nh", "nho", "nhos", "nhoso", "o", "om", "ome", "os", "oso", "ov", "ovi", "ovil", "p", "pr", "pri", "priv", "priva", "privat", "private", "private)", "r", "ri", "riv", "riva", "rivat", "rivate", "rivate)", "s", "so", "t", "te", "te)", "ti", "tin", "tinh", "tinho", "tinhos", "tinhoso", "v", "va", "vat", "vate", "vate)", "vi", "vil" ], : 2.0 }
Thu Aug 30 17:52:30 [conn6]  isikota Btree::insert: key too large to index, skipping isikota.tablebusiness.$Long_IndexContents_Prominent 1111 { : BinData, : [ ",", "a", "ag", "age", "an", "ana", "ar", "ara", "arag", "arage", "as", "at", "ati", "atio", "ation", "c", "ci", "cia", "e", "el", "ell", "ell,", "g", "ga", "gar", "gara", "garag", "garage", "gas", "ge", "h", "he", "hel", "hell", "hell,", "i", "ia", "io", "ion", "l", "l,", "ll", "ll,", "lu", "luc", "luci", "lucia", "n", "na", "o", "on", "or", "os", "ost", "osto", "p", "po", "pos", "post", "posto", "r", "ra", "rag", "rage", "s", "sh", "she", "shel", "shell", "shell,", "st", "sta", "stat", "stati", "statio", "station", "sto", "t", "ta", "tat", "tati", "tatio", "tation", "ti", "tio", "tion", "to", "u", "uc", "uci", "ucia" ], : 16.0 }
Thu Aug 30 17:52:30 [conn6]  isikota Btree::insert: key too large to index, skipping isikota.tablebusiness.$Long_IndexContents_Prominent 2132 { : BinData, : [ "a", "an", "anc", "anch", "ancho", "anchon", "anchone", "anchonet", "anchonete", "ane", "aneo", "aneou", "aneous", "c", "ce", "cel", "cell", "cella", "cellan", "cellane", "cellaneo", "cellaneou", "cellaneous", "ch", "cho", "chon", "chone", "chonet", "chonete", "d", "do", "e", "el", "ell", "ella", "ellan", "ellane", "ellaneo", "ellaneou", "ellaneous", "eo", "eou", "eous", "er", "et", "ete", "eu", "eul", "eule", "euler", "h", "ho", "hon", "hone", "honet", "honete", "hop", "i", "is", "isc", "isce", "iscel", "iscell", "iscella", "iscellan", "iscellane", "iscellaneo", "iscellaneou", "iscellaneous", "l", "la", "lan", "lanc", "lanch", "lancho", "lanchon", "lanchone", "lanchonet", "lanchonete", "lane", "laneo", "laneou", "laneous", "le", "ler", "ll", "lla", "llan", "llane", "llaneo", "llaneou", "llaneous", "m", "mi", "mis", "misc", "misce", "miscel", "miscell", "miscella", "miscellan", "miscellane", "miscellaneo", "miscellaneou", "miscellaneous", "n", "nc", "nch", "ncho", "nchon", "nchone", "nchonet", "nchonete", "ne", "neo", "neou", "neous", "net", "nete", "o", "on", "one", "onet", "onete", "op", "ou", "ous", "p", "r", "s", "sc", "sce", "scel", "scell", "scella", "scellan", "scellane", "scellaneo", "scellaneou", "scellaneous", "sh", "sho", "shop", "t", "te", "u", "ul", "ule", "uler", "us" ], : 5.0 }
Thu Aug 30 17:52:30 [conn6]  isikota Btree::insert: key too large to index, skipping isikota.tablebusiness.$Long_IndexContents_Prominent 1186 { : BinData, : [ "a", "ac", "aca", "acao", "am", "amp", "ampg", "ampgr", "ampgro", "ampgrou", "ampgroun", "ampground", "an", "ani", "anim", "anima", "animac", "animaca", "animacao", "ao", "as", "asa", "c", "ca", "cam", "camp", "campg", "campgr", "campgro", "campgrou", "campgroun", "campground", "cao", "cas", "casa", "d", "da", "g", "gr", "gro", "grou", "groun", "ground", "i", "im", "ima", "imac", "imaca", "imacao", "m", "ma", "mac", "maca", "macao", "mp", "mpg", "mpgr", "mpgro", "mpgrou", "mpgroun", "mpground", "n", "nd", "ni", "nim", "nima", "nimac", "nimaca", "nimacao", "o", "ou", "oun", "ound", "p", "pg", "pgr", "pgro", "pgrou", "pgroun", "pground", "r", "ro", "rou", "roun", "round", "s", "sa", "u", "un", "und" ], : 1.0 }
Thu Aug 30 17:52:30 [conn6]  isikota Btree::insert: key too large to index, skipping isikota.tablebusiness.$Long_IndexContents_Prominent 1396 { : BinData, : [ "a", "ab", "aba", "abar", "abará", "ar", "ará", "at", "b", "ba", "bar", "bará", "c", "d", "do", "doo", "door", "doors", "e", "ea", "eat", "er", "g", "gr", "gre", "grea", "great", "h", "he", "her", "hi", "his", "hist", "histo", "histor", "histori", "historic", "i", "ic", "is", "ist", "isto", "istor", "istori", "istoric", "it", "ite", "o", "oo", "oor", "oors", "or", "ori", "oric", "ors", "ot", "oth", "othe", "other", "ou", "out", "outd", "outdo", "outdoo", "outdoor", "outdoors", "r", "re", "rea", "reat", "ri", "ric", "rs", "rá", "s", "sa", "sab", "saba", "sabar", "sabará", "si", "sit", "site", "st", "sto", "stor", "stori", "storic", "t", "td", "tdo", "tdoo", "tdoor", "tdoors", "te", "th", "the", "ther", "to", "tor", "tori", "toric", "u", "ut", "utd", "utdo", "utdoo", "utdoor", "utdoors", "á" ], : 318.0 }
Thu Aug 30 17:52:30 [conn6]  isikota Btree::insert: key too large to index, skipping isikota.tablebusiness.$Long_IndexContents_Prominent 1183 { : BinData, : [ "(", "(p", "(pr", "(pri", "(priv", "(priva", "(privat", "(private", "(private)", ")", "a", "ar", "arg", "arge", "argem", "argemi", "argemir", "argemiro", "as", "asa", "at", "ate", "ate)", "c", "ca", "cas", "casa", "d", "de", "e", "e)", "em", "emi", "emir", "emiro", "g", "ge", "gem", "gemi", "gemir", "gemiro", "h", "ho", "hom", "home", "i", "ir", "iro", "iv", "iva", "ivat", "ivate", "ivate)", "m", "me", "mi", "mir", "miro", "o", "om", "ome", "p", "pr", "pri", "priv", "priva", "privat", "private", "private)", "r", "rg", "rge", "rgem", "rgemi", "rgemir", "rgemiro", "ri", "riv", "riva", "rivat", "rivate", "rivate)", "ro", "s", "sa", "t", "te", "te)", "v", "va", "vat", "vate", "vate)" ], : 1.0 }
Thu Aug 30 17:52:30 [conn6]  isikota Btree::insert: key too large to index, skipping isikota.tablebusiness.$Long_IndexContents_Prominent 1232 { : BinData, : [ "a", "ac", "aca", "acad", "acade", "academ", "academi", "academia", "ad", "ade", "adem", "ademi", "ademia", "aç", "aço", "c", "ca", "cad", "cade", "cadem", "cademi", "cademia", "ce", "cen", "cent", "cente", "center", "d", "de", "dem", "demi", "demia", "e", "em", "emi", "emia", "en", "ent", "ente", "enter", "er", "es", "esp", "espa", "espaç", "espaço", "ess", "f", "fi", "fit", "fitn", "fitne", "fitnes", "fitness", "g", "gy", "gym", "i", "ia", "it", "itn", "itne", "itnes", "itness", "m", "mi", "mia", "n", "ne", "nes", "ness", "nt", "nte", "nter", "o", "or", "p", "pa", "paç", "paço", "r", "s", "sp", "spa", "spaç", "spaço", "ss", "t", "te", "ter", "tn", "tne", "tnes", "tness", "y", "ym", "ç", "ço" ], : 1.0 }
Thu Aug 30 17:52:30 [conn6]  isikota Btree::insert: key too large to index, skipping isikota.tablebusiness.$Long_IndexContents_Prominent 1657 { : BinData, : [ "a", "an", "ant", "as", "au", "aur", "aura", "auran", "aurant", "az", "azi", "azil", "azili", "azilia", "azilian", "b", "br", "bra", "braz", "brazi", "brazil", "brazili", "brazilia", "brazilian", "c", "co", "coi", "cois", "coisa", "coisas", "d", "da", "e", "es", "est", "esta", "estau", "estaur", "estaura", "estauran", "estaurant", "i", "ia", "ian", "il", "ili", "ilia", "ilian", "is", "isa", "isas", "l", "li", "lia", "lian", "n", "no", "nos", "noss", "nossa", "nt", "o", "oi", "ois", "oisa", "oisas", "os", "oss", "ossa", "oç", "oça", "r", "ra", "ran", "rant", "raz", "razi", "razil", "razili", "razilia", "razilian", "re", "res", "rest", "resta", "restau", "restaur", "restaura", "restauran", "restaurant", "ro", "roç", "roça", "s", "sa", "sas", "ss", "ssa", "st", "sta", "stau", "staur", "staura", "stauran", "staurant", "t", "ta", "tau", "taur", "taura", "tauran", "taurant", "u", "ur", "ura", "uran", "urant", "z", "zi", "zil", "zili", "zilia", "zilian", "ç", "ça" ], : 5.0 }
Thu Aug 30 17:52:30 [conn6]  isikota Btree::insert: key too large to index, skipping isikota.tablebusiness.$Long_IndexContents_Prominent 1426 { : BinData, : [ "a", "ab", "abe", "an", "ant", "ante", "ar", "ari", "aria", "au", "aur", "aura", "auran", "aurant", "aurante", "b", "be", "c", "cê", "e", "es", "est", "esta", "estau", "estaur", "estaura", "estauran", "estaurant", "estaurante", "i", "ia", "iz", "izz", "izza", "izzar", "izzari", "izzaria", "n", "nt", "nte", "p", "pi", "piz", "pizz", "pizza", "pizzar", "pizzari", "pizzaria", "q", "qu", "qui", "r", "ra", "ran", "rant", "rante", "re", "res", "rest", "resta", "restau", "restaur", "restaura", "restauran", "restaurant", "restaurante", "ri", "ria", "s", "sa", "sab", "sabe", "st", "sta", "stau", "staur", "staura", "stauran", "staurant", "staurante", "t", "ta", "tau", "taur", "taura", "tauran", "taurant", "taurante", "te", "u", "ui", "ur", "ura", "uran", "urant", "urante", "z", "za", "zar", "zari", "zaria", "zz", "zza", "zzar", "zzari", "zzaria", "ê" ], : 24.0 }
Thu Aug 30 17:52:30 [conn6] Assertion: 13524:out of memory AlignedBuilder
0xade6e1 0x8036eb 0x77dadc 0x77db09 0x753da5 0x7540b4 0xa0a2e4 0xa0a83a 0xa082a7 0xa0835c 0xb19666 0xb1e8cc 0xae7c3f 0xae15ed 0xae46e7 0x747ed3 0x7490bd 0x74a9f3 0x665950 0x6571f1 
 /usr/bin/mongod(_ZN5mongo15printStackTraceERSo+0x21) [0xade6e1]
 /usr/bin/mongod(_ZN5mongo11msgassertedEiPKc+0x9b) [0x8036eb]
 /usr/bin/mongod() [0x77dadc]
 /usr/bin/mongod(_ZN5mongo14AlignedBuilder8_reallocEjj+0x29) [0x77db09]
 /usr/bin/mongod() [0x753da5]
 /usr/bin/mongod(_ZN5mongo3dur13PREPLOGBUFFERERNS0_11JSectHeaderERNS_14AlignedBuilderE+0x214) [0x7540b4]
 /usr/bin/mongod() [0xa0a2e4]
 /usr/bin/mongod(_ZN5mongo3dur11DurableImpl9commitNowEv+0x1a) [0xa0a83a]
 /usr/bin/mongod(_ZN5mongo3dur11DurableImpl16_aCommitIsNeededEv+0x157) [0xa082a7]
 /usr/bin/mongod(_ZN5mongo3dur11DurableImpl14commitIfNeededEb+0x4c) [0xa0835c]
 /usr/bin/mongod(_ZN5mongo12BtreeBuilderINS_12BtreeData_V1EE24mayCommitProgressDurablyEv+0x16) [0xb19666]
 /usr/bin/mongod(_ZN5mongo12BtreeBuilderINS_12BtreeData_V1EE6addKeyERNS_7BSONObjENS_7DiskLocE+0x30c) [0xb1e8cc]
 /usr/bin/mongod(_ZN5mongo24buildBottomUpPhases2And3INS_12BtreeData_V1EEEvbRNS_12IndexDetailsERNS_21BSONObjExternalSorterEbRSt3setINS_7DiskLocESt4lessIS7_ESaIS7_EEPNS_5CurOpEPNS_12SortPhaseOneERNS_19ProgressMeterHolderERNS_5TimerE+0x11f) [0xae7c3f]
 /usr/bin/mongod(_ZN5mongo14fastBuildIndexEPKcPNS_16NamespaceDetailsERNS_12IndexDetailsEi+0xc9d) [0xae15ed]
 /usr/bin/mongod(_ZN5mongo12buildAnIndexESsPNS_16NamespaceDetailsERNS_12IndexDetailsEib+0x217) [0xae46e7]
 /usr/bin/mongod(_ZN5mongo16insert_makeIndexEPNS_16NamespaceDetailsERKSsRKNS_7DiskLocE+0x1f3) [0x747ed3]
 /usr/bin/mongod(_ZN5mongo11DataFileMgr6insertEPKcPKvibbPb+0x93d) [0x7490bd]
 /usr/bin/mongod(_ZN5mongo11DataFileMgr16insertWithObjModEPKcRNS_7BSONObjEb+0x43) [0x74a9f3]
 /usr/bin/mongod(_ZN5mongo10CmdReIndex3runERKSsRNS_7BSONObjEiRSsRNS_14BSONObjBuilderEb+0xf90) [0x665950]
 /usr/bin/mongod(_ZN5mongo12_execCommandEPNS_7CommandERKSsRNS_7BSONObjEiRNS_14BSONObjBuilderEb+0x51) [0x6571f1]
Thu Aug 30 17:52:30 [conn6] dbexception in groupCommit causing immediate shutdown: 13524 out of memory AlignedBuilder
Thu Aug 30 17:52:30 gc1
Thu Aug 30 17:52:31 Got signal: 6 (Aborted).

Thu Aug 30 17:52:31 Backtrace:
0xade6e1 0x5582d9 0x7f60e02cb4c0 0x7f60e02cb445 0x7f60e02cebab 0xb503f7 0xa0a61a 0xa0a83a 0xa082a7 0xa0835c 0xb19666 0xb1e8cc 0xae7c3f 0xae15ed 0xae46e7 0x747ed3 0x7490bd 0x74a9f3 0x665950 0x6571f1 
 /usr/bin/mongod(_ZN5mongo15printStackTraceERSo+0x21) [0xade6e1]
 /usr/bin/mongod(_ZN5mongo10abruptQuitEi+0x399) [0x5582d9]
 /lib/x86_64-linux-gnu/libc.so.6(+0x364c0) [0x7f60e02cb4c0]
 /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x35) [0x7f60e02cb445]
 /lib/x86_64-linux-gnu/libc.so.6(abort+0x17b) [0x7f60e02cebab]
 /usr/bin/mongod(_ZN5mongo10mongoAbortEPKc+0x47) [0xb503f7]
 /usr/bin/mongod() [0xa0a61a]
 /usr/bin/mongod(_ZN5mongo3dur11DurableImpl9commitNowEv+0x1a) [0xa0a83a]
 /usr/bin/mongod(_ZN5mongo3dur11DurableImpl16_aCommitIsNeededEv+0x157) [0xa082a7]
 /usr/bin/mongod(_ZN5mongo3dur11DurableImpl14commitIfNeededEb+0x4c) [0xa0835c]
 /usr/bin/mongod(_ZN5mongo12BtreeBuilderINS_12BtreeData_V1EE24mayCommitProgressDurablyEv+0x16) [0xb19666]
 /usr/bin/mongod(_ZN5mongo12BtreeBuilderINS_12BtreeData_V1EE6addKeyERNS_7BSONObjENS_7DiskLocE+0x30c) [0xb1e8cc]
 /usr/bin/mongod(_ZN5mongo24buildBottomUpPhases2And3INS_12BtreeData_V1EEEvbRNS_12IndexDetailsERNS_21BSONObjExternalSorterEbRSt3setINS_7DiskLocESt4lessIS7_ESaIS7_EEPNS_5CurOpEPNS_12SortPhaseOneERNS_19ProgressMeterHolderERNS_5TimerE+0x11f) [0xae7c3f]
 /usr/bin/mongod(_ZN5mongo14fastBuildIndexEPKcPNS_16NamespaceDetailsERNS_12IndexDetailsEi+0xc9d) [0xae15ed]
 /usr/bin/mongod(_ZN5mongo12buildAnIndexESsPNS_16NamespaceDetailsERNS_12IndexDetailsEib+0x217) [0xae46e7]
 /usr/bin/mongod(_ZN5mongo16insert_makeIndexEPNS_16NamespaceDetailsERKSsRKNS_7DiskLocE+0x1f3) [0x747ed3]
 /usr/bin/mongod(_ZN5mongo11DataFileMgr6insertEPKcPKvibbPb+0x93d) [0x7490bd]
 /usr/bin/mongod(_ZN5mongo11DataFileMgr16insertWithObjModEPKcRNS_7BSONObjEb+0x43) [0x74a9f3]
 /usr/bin/mongod(_ZN5mongo10CmdReIndex3runERKSsRNS_7BSONObjEiRSsRNS_14BSONObjBuilderEb+0xf90) [0x665950]
 /usr/bin/mongod(_ZN5mongo12_execCommandEPNS_7CommandERKSsRNS_7BSONObjEiRNS_14BSONObjBuilderEb+0x51) [0x6571f1]



***** SERVER RESTARTED *****


Fri Aug 31 02:35:15 [initandlisten] MongoDB starting : pid=18199 port=27017 dbpath=/media/newdrive/data 64-bit host=ip-10-138-30-205
Fri Aug 31 02:35:15 [initandlisten] db version v2.2.0, pdfile version 4.5
Fri Aug 31 02:35:15 [initandlisten] git version: f5e83eae9cfbec7fb7a071321928f00d1b0c5207
Fri Aug 31 02:35:15 [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
Fri Aug 31 02:35:15 [initandlisten] options: { config: "/etc/mongodb.conf", dbpath: "/media/newdrive/data", logappend: "true", logpath: "/var/log/mongodb/mongodb.log" }
Fri Aug 31 02:35:15 [initandlisten] journal dir=/media/newdrive/data/journal
Fri Aug 31 02:35:15 [initandlisten] recover begin
Fri Aug 31 02:35:15 [initandlisten] recover lsn: 2093073
Fri Aug 31 02:35:15 [initandlisten] recover /media/newdrive/data/journal/j._3
Fri Aug 31 02:35:20 [initandlisten] recover cleaning up
Fri Aug 31 02:35:20 [initandlisten] removeJournalFiles
Fri Aug 31 02:35:20 [initandlisten] recover done
Fri Aug 31 02:35:20 [initandlisten] preallocating a journal file /media/newdrive/data/journal/prealloc.0
Fri Aug 31 02:35:23 [initandlisten]             157286400/1073741824    14%
Fri Aug 31 02:35:26 [initandlisten]             262144000/1073741824    24%
Fri Aug 31 02:35:29 [initandlisten]             367001600/1073741824    34%
Fri Aug 31 02:35:32 [initandlisten]             471859200/1073741824    43%
Fri Aug 31 02:35:35 [initandlisten]             576716800/1073741824    53%
Fri Aug 31 02:35:38 [initandlisten]             681574400/1073741824    63%
Fri Aug 31 02:35:41 [initandlisten]             786432000/1073741824    73%
Fri Aug 31 02:35:44 [initandlisten]             901775360/1073741824    83%
Fri Aug 31 02:35:47 [initandlisten]             1017118720/1073741824   94%
Fri Aug 31 02:35:51 [initandlisten] indexBuildInProgress was 1 for isikota.tablebusiness, indicating an abnormal db shutdown
Fri Aug 31 02:35:51 [initandlisten] waiting for connections on port 27017
Fri Aug 31 02:35:51 [websvr] admin web console waiting for connections on port 28017
Fri Aug 31 02:36:21 [initandlisten] connection accepted from 127.0.0.1:35505 #1 (1 connection now open)
Fri Aug 31 02:40:08 [conn1] end connection 127.0.0.1:35505 (0 connections now open)
share|improve this question
2  
Please post the output of the mongod logs rather than the client error - that's what will tell you why it is failing to start. Based on your pasted config that would be: /var/log/mongodb/mongodb.log –  Adam C Aug 30 '12 at 12:15
    
I want to provide the log but I already found out what the problem is. –  Jim Thio Aug 31 '12 at 2:46

2 Answers 2

up vote 3 down vote accepted

While I wait for your logs (see comments), there are two common causes for this:

Bad permissions on the log file, or other bad permissions in the data path. Make sure you chown/chmod everything under the /media/newdrive/data folder. Something similar to this:

sudo chown -R mongodb:mongodb /media/newdrive/data

Then make sure your other mongod instance is not running, which would mean it is currently holding the port open, or similar.

share|improve this answer

I noticed that if I wait for a few seconds then it works :)

Oh well, it's actually the answer but for the question Bryce answer is also valid.

So even after mongodb start/running, process 17140

it's not fully running yet

I must wait for a few second till it's properly initialized.

Also it's the EXACT same error if the problem is different. For example, what Bryce say is also correct. It can indeed be caused by ownership conflict.

In BOTH issue, the error message is EXACTLY the same.

I think I need to file a bug report here. It's kind of tricky to fix issue if the answer is exactly the same.

share|improve this answer
1  
The "error" is going to be the same on the client side because you would get that error if the server wasn't running at all, or if you put in the wrong port etc. - it just means the port is not yet open, that's all the client knows - any actually meaningful error will be in the server logs. You can try to file an issue for it, but the likely response will be that you are looking in the wrong place for the error in the first place –  Adam C Aug 31 '12 at 8:16
    
great comment +1 thanks. –  Jim Thio Aug 31 '12 at 9:04

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.