TL; dr: você não tem espaço suficiente disponível. Faça pelo menos 500 MB disponíveis na sua partição inicial.
Bem, comecei a pesquisar e descobri que o script falha ao executar service juju-db-braiam-local start
. Quando executado manualmente, ele também falha. Verificando o conteúdo, encontrei isto:
description "juju state database"
author "Juju Team <[email protected]>"
start on runlevel [2345]
stop on runlevel [!2345]
respawn
normal exit 0
limit nofile 65000 65000
limit nproc 20000 20000
exec /usr/bin/mongod --auth --dbpath=/home/braiam/.juju/local/db --sslOnNormalPorts --sslPEMKeyFile '/home/braiam/.juju/local/server.pem' --sslPEMKeyPassword ignored --bind_ip 0.0.0.0 --port 37017 --noprealloc --syslog --smallfiles
Por código de erro, a falha está na instrução exec
, por isso executei-a manualmente. Aparentemente, escreve para o syslog, então eu encontrei o motivo:
Oct 20 02:41:05 vm-2 mongod.37017[5159]: Sun Oct 20 02:41:05 [initandlisten] options: { auth: true, bind_ip: "0.0.0.0", dbpath: "/home/braiam/.juju/local/db", noprealloc: true, port: 37017, smallfiles: true, sslOnNormalPorts: true, sslPEMKeyFile: "/home/braiam/.juju/local/server.pem", sslPEMKeyPassword: "<password>", syslog: true }
Oct 20 02:41:05 vm-2 mongod.37017[5159]: Sun Oct 20 02:41:05 [initandlisten] journal dir=/home/braiam/.juju/local/db/journal
Oct 20 02:41:05 vm-2 mongod.37017[5159]: Sun Oct 20 02:41:05 [initandlisten] recover : no journal files present, no recovery needed
Oct 20 02:41:05 vm-2 mongod.37017[5159]: Sun Oct 20 02:41:05 [initandlisten]
Oct 20 02:41:05 vm-2 mongod.37017[5159]: Sun Oct 20 02:41:05 [initandlisten] ERROR: Insufficient free space for journal files
Oct 20 02:41:05 vm-2 mongod.37017[5159]: Sun Oct 20 02:41:05 [initandlisten] Please make at least 422MB available in /home/braiam/.juju/local/db/journal or use --smallfiles
Oct 20 02:41:05 vm-2 mongod.37017[5159]: Sun Oct 20 02:41:05 [initandlisten]
Oct 20 02:41:05 vm-2 mongod.37017[5159]: Sun Oct 20 02:41:05 [initandlisten] exception in initAndListen: 15926 Insufficient free space for journals, terminating
Parece que o mongodb não lê os - smallfiles que estão no final do script ... estranhos. A liberação de 422MB deve ter resolvido o problema, mas o mongodb deve ser capaz de iniciar de qualquer forma.
Além disso, descobri que o mongodb ignora completamente o --smallfiles
quando usado com outros parameteres. Eu abri um relatório de erros sobre isso, a maneira de corrigi-lo mais fácil é disponibilizar mais espaço.