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

I am trying out Juju and while playing I created a service, Django, and then Mongodb. I associated them and then destroyed mongodb. Now my Django service is in an error status: agent-state-info: 'hook failed: "relation-broken"'. I have tried to destroy the relation with juju destroy-relation python-django mongodb to no avail. Mongodb still appears in juju status but in 'dying' state, it's been a few hours since I have destroyed it. I have not done any actual work on this service so I can destroy it and start again from scratch but while learning I would like to know if there is a cleaner way to solve that situation.

share|improve this question
up vote 2 down vote accepted

First, the annoyingly "in hindsight" bit. It is always a good idea to remove relations before destroying services:

Once a machine is in an error state, Juju will not process any hooks for that service - even ones to destroy it. That is to protect against potential data loss. However there is a mechanism to return the machine to a responsive state:

juju resolved <machine identifier>


juju resolved mongodb/0

This will re-enable the execution of hooks for that machine/service. Then it will be possible to:

juju destroy-relation mongodb django
juju destroy-service mongodb
juju destroy-service django
share|improve this answer
great, only by doing juju resolved python-django/0 the status is now perfectly ok for this service and the mongodb service has disappeared! I would not do it on a prod environment but I wanted to try to see what would happen since the doc does not mention the situation :) – Bastian Oct 3 '13 at 17:31
usually one would use juju ssh <identifier> to connect to machines that were in an error state and fix whatever the problem is. it seems odd that the mongodb disappeared to be honest – Nick Veitch Oct 3 '13 at 23:40

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.