Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Each time I try to bootstrap juju using a local enviroment it fails starting the juju-db-braiam-local script as follows:

$ sudo juju --debug --verbose bootstrap
2013-10-20 02:28:53 INFO juju.provider.local environprovider.go:32 opening environment "local"
2013-10-20 02:28:53 DEBUG juju.provider.local environ.go:210 found "10.0.3.1" as address for "lxcbr0"
2013-10-20 02:28:53 DEBUG juju.provider.local environ.go:234 checking 10.0.3.1:8040 to see if machine agent running storage listener
2013-10-20 02:28:53 DEBUG juju.provider.local environ.go:237 nope, start some
2013-10-20 02:28:53 DEBUG juju.environs.tools storage.go:87 Uploading tools for [raring precise]
2013-10-20 02:28:53 DEBUG juju.environs.tools build.go:109 looking for: juju
2013-10-20 02:28:53 DEBUG juju.environs.tools build.go:150 checking: /usr/bin/jujud
2013-10-20 02:28:53 INFO juju.environs.tools build.go:156 found existing jujud
2013-10-20 02:28:53 INFO juju.environs.tools build.go:166 target: /tmp/juju-tools243949228/jujud
2013-10-20 02:28:53 DEBUG juju.environs.tools build.go:217 forcing version to 1.14.1.1
2013-10-20 02:28:53 DEBUG juju.environs.tools build.go:37 adding entry: &tar.Header{Name:"FORCE-VERSION", Mode:420, Uid:0, Gid:0, Size:8, ModTime:time.Time{sec:63517832933, nsec:278894120, loc:(*time.Location)(0x108fda0)}, Typeflag:0x30, Linkname:"", Uname:"ubuntu", Gname:"ubuntu", Devmajor:0, Devminor:0, AccessTime:time.Time{sec:63517832933, nsec:278894120, loc:(*time.Location)(0x108fda0)}, ChangeTime:time.Time{sec:63517832933, nsec:278894120, loc:(*time.Location)(0x108fda0)}}
2013-10-20 02:28:53 DEBUG juju.environs.tools build.go:37 adding entry: &tar.Header{Name:"jujud", Mode:493, Uid:0, Gid:0, Size:19179512, ModTime:time.Time{sec:63517832933, nsec:274894120, loc:(*time.Location)(0x108fda0)}, Typeflag:0x30, Linkname:"", Uname:"ubuntu", Gname:"ubuntu", Devmajor:0, Devminor:0, AccessTime:time.Time{sec:63517832933, nsec:274894120, loc:(*time.Location)(0x108fda0)}, ChangeTime:time.Time{sec:63517832933, nsec:274894120, loc:(*time.Location)(0x108fda0)}}
2013-10-20 02:28:55 INFO juju.environs.tools storage.go:106 built 1.14.1.1-raring-amd64 (4196kB)
2013-10-20 02:28:55 INFO juju.environs.tools storage.go:112 uploading 1.14.1.1-precise-amd64
2013-10-20 02:28:55 INFO juju.environs.tools storage.go:112 uploading 1.14.1.1-raring-amd64
2013-10-20 02:28:55 INFO juju.environs.tools tools.go:29 reading tools with major version 1
2013-10-20 02:28:55 INFO juju.environs.tools tools.go:34 filtering tools by version: 1.14.1.1
2013-10-20 02:28:55 INFO juju.environs.tools tools.go:37 filtering tools by series: precise
2013-10-20 02:28:55 DEBUG juju.environs.tools storage.go:41 reading v1.* tools
2013-10-20 02:28:55 DEBUG juju.environs.tools storage.go:61 found 1.14.1.1-precise-amd64
2013-10-20 02:28:55 DEBUG juju.environs.tools storage.go:61 found 1.14.1.1-raring-amd64
2013-10-20 02:28:55 INFO juju.environs.boostrap bootstrap.go:57 bootstrapping environment "local"
2013-10-20 02:28:55 INFO juju.environs.tools tools.go:29 reading tools with major version 1
2013-10-20 02:28:55 INFO juju.environs.tools tools.go:34 filtering tools by version: 1.14.1.1
2013-10-20 02:28:55 INFO juju.environs.tools tools.go:37 filtering tools by series: precise
2013-10-20 02:28:55 DEBUG juju.environs.tools storage.go:41 reading v1.* tools
2013-10-20 02:28:55 DEBUG juju.environs.tools storage.go:61 found 1.14.1.1-precise-amd64
2013-10-20 02:28:55 DEBUG juju.environs.tools storage.go:61 found 1.14.1.1-raring-amd64
2013-10-20 02:28:55 DEBUG juju.provider.local environ.go:395 create mongo journal dir: /home/braiam/.juju/local/db/journal
2013-10-20 02:28:55 DEBUG juju.provider.local environ.go:401 generate server cert
2013-10-20 02:28:55 INFO juju.provider.local environ.go:421 installing service juju-db-braiam-local to /etc/init
2013-10-20 02:28:56 ERROR juju.provider.local environ.go:423 could not install mongo service: exec ["start" "juju-db-braiam-local"]: exit status 1 (start: Job failed to start)
2013-10-20 02:28:56 ERROR juju supercommand.go:282 command failed: exec ["start" "juju-db-braiam-local"]: exit status 1 (start: Job failed to start)
error: exec ["start" "juju-db-braiam-local"]: exit status 1 (start: Job failed to start)

What is the reason for this error and how to solve it?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

TL;dr: you don't have enought space availble. Make at least 500MB availble in your home partition.


Well, I started to poke around and found that the script fails executing service juju-db-braiam-local start. When ran manually it fails too. Checking the contents I found this:

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

Per error code, the fails is withing the exec instruction, so I ran it manually. It apparently writes to the syslog so I found the reason:

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

There it's, apparently mongodb doesn't read the --smallfiles that is at the end of the script... weird. Freeing up 422MB should have fixed the issue, but mongodb should be able to start either way.

Invesigating futher, I discovered that mongodb ignores the --smallfiles completely while used with other paramethers. I've opened a bug report about this, the way to fix it easier is make more space available.

share|improve this answer

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.