3

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 "10.0.3.1" as address for "lxcbr0"
2013-09-05 18:03:09 DEBUG juju.environs.local environ.go:242 checking 10.0.3.1:8040 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: ["10.0.3.1:37017"]; entity ""

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

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

Juju just stays in this state refusing to do anything.

Version information:

$ juju version
1.12.0-raring-amd64
$ 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)

dbpath=/var/lib/mongodb
logpath=/var/log/mongodb/mongodb.log
logappend=true
bind_ip = 0.0.0.0
port = 37017
journal=true
  • 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 10.0.3.1:35873 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
0

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.