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
  • 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

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

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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