Recebi um erro "o processo filho falhou, saí com o erro número 45" depois de digitar "service mongod restart" e verifiquei /var/log/mongo/mongo.log conforme abaixo:
SERVER RESTARTED
Sat Dec 21 12:28:59.115 [initandlisten] MongoDB starting : pid=1446 port=27017 dbpath=
/var /lib/mongo 32-bit host=server.xfloyd.com.ar
Sat Dec 21 12:28:59.115 [initandlisten]
Sat Dec 21 12:28:59.115 [initandlisten] ** NOTE: This is a 32 bit MongoDB binary.
Sat Dec 21 12:28:59.115 [initandlisten] ** 32 bit builds are limited to
less than 2GB of data (or less with --journal).
Sat Dec 21 12:28:59.115 [initandlisten] ** Note that journaling defaults to off for
32 bit and is currently off.
Sat Dec 21 12:28:59.115 [initandlisten] ** See http://dochub.mongodb.org/core/32bit
Sat Dec 21 12:28:59.115 [initandlisten]
Sat Dec 21 12:28:59.115 [initandlisten] db version v2.4.6
Sat Dec 21 12:28:59.115 [initandlisten] git version: b9925db5eac369d77a3a5f5d98a145eaaacd9673
Sat Dec 21 12:28:59.115 [initandlisten] build info: Linux bs-linux32.10gen.cc 2.6.21.7-2.
fc8xen #1 SMP Fri Feb 15 12:39:36 EST 2008 i686 BOOST_LIB_VERSION=1_49
Sat Dec 21 12:28:59.115 [initandlisten] allocator: system
Sat Dec 21 12:28:59.115 [initandlisten] options: { config: "/etc/mongod.conf", dbpath:
"/var/lib/mongo", fork: "true", logappend: "true", logpath: "/var/log/mongo/mongod.log"
, pidfilepath: "/var/run/mongodb/mongod.pid" }
Sat Dec 21 12:28:59.146 [initandlisten] couldn't open /var/lib/mongo/local.ns errno:
13 Permission denied
Sat Dec 21 12:28:59.146 [initandlisten] error couldn't open file /var/lib/mongo/
local.ns terminating
Sat Dec 21 12:28:59.146 dbexit:
Sat Dec 21 12:28:59.146 [initandlisten] shutdown: going to close listening sockets...
Sat Dec 21 12:28:59.146 [initandlisten] shutdown: going to flush diaglog...
Sat Dec 21 12:28:59.146 [initandlisten] shutdown: going to close sockets...
Sat Dec 21 12:28:59.146 [initandlisten] shutdown: waiting for fs preallocator...
Sat Dec 21 12:28:59.146 [initandlisten] shutdown: closing all files...
Sat Dec 21 12:28:59.146 [initandlisten] closeAllFiles() finished
Sat Dec 21 12:28:59.146 [initandlisten] shutdown: removing fs lock...
Sat Dec 21 12:28:59.146 dbexit: really exiting now
Responder1
Sat Dec 21 12:28:59.146 [initandlisten] error couldn't open file /var/lib/mongo/local.ns
terminating
Essa linha é a mais diagnóstica. Verifique se os direitos /var/lib/mongo
são suficientes para o usuário com o qual o serviço Mongo está sendo executado (ou, se estiver sendo invocado diretamente, o usuário que está invocando o mongodb). O local.ns
arquivo é um arquivo de banco de dados Mongo, que por padrão é mantido em formato /var/lib/mongo
.