Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Whenever I run any juju activity which connects to mongodb, the connection seems to connect OK but hang. I'm using the stable ppa and running on ubuntu 13.04 desktop.

$ juju status --debug
2013-09-05 18:03:09 INFO juju.environs.local environprovider.go:32 opening environment "local"
2013-09-05 18:03:09 DEBUG juju.environs.local environ.go:218 found "" as address for "lxcbr0"
2013-09-05 18:03:09 DEBUG juju.environs.local environ.go:242 checking to see if machine agent running storage listener
2013-09-05 18:03:09 DEBUG juju.environs.local environ.go:245 nope, start some
2013-09-05 18:03:09 DEBUG juju state.go:138 waiting for DNS name(s) of state server instances [localhost]
2013-09-05 18:03:09 INFO juju open.go:69 state: opening state; mongo addresses: [""]; entity ""

Below is the last few lines of /var/log/mongodb/mongodb.log

Thu Sep  5 19:16:10 [conn2] end connection (0 connections now open)
Thu Sep  5 19:16:17 [initandlisten] connection accepted from #3 (1 connection now open)

Juju just stays in this state refusing to do anything.

Version information:

$ juju version
$ mongo --version
MongoDB shell version: 2.2.4

Edit: Mongo has auth disabled and is only running as a single node, SSL is off.

I'm not deploying mongodb, I'm using a lxc to test charms I'm building. mongodb is used by juju-local to hold lxc container state.

Here is my mongodb.conf: (comments removed)

bind_ip =
port = 37017
share|improve this question
are you using mongodb authentication mode? – dedunumax Sep 5 '13 at 18:21
use mongodb shell and try to connect manually without any password ex: mongo Run show dbs if you get "need to login" message, then auth is on – dedunumax Sep 5 '13 at 18:24
nope if it is turned on it could be. is this a replica set? – dedunumax Sep 5 '13 at 18:26
did you "juju expose mongodb" – dedunumax Sep 5 '13 at 18:32
by default mongodb port is 27017 here it is connecting to 37017 – dedunumax Sep 5 '13 at 18:37
up vote 0 down vote accepted

Fixed with some help from the #juju IRC channel - I shouldn't be using the system mongo instance; juju creates its own when running juju bootstrap

share|improve this answer

Your Answer


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.