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 getting the following error, when I try to deploy a service on a manually provisioned machine using juju:

juju deploy juju-gui --show-log
2014-05-20 13:42:31 INFO juju.cmd supercommand.go:302 running juju-1.18.3-unknown-amd64 [gc]
2014-05-20 13:42:31 INFO juju api.go:242 connecting to API addresses []
2014-05-20 13:42:31 INFO juju apiclient.go:114 state/api: dialing "wss://"
2014-05-20 13:42:31 INFO juju apiclient.go:124 state/api: connection established
Added charm "cs:trusty/juju-gui-2" to the environment.
2014-05-20 13:42:46 ERROR juju.cmd supercommand.go:305 cannot assign unit "juju-gui/0" to machine: cannot assign unit "juju-gui/0" to new machine or container: cannot assign unit "juju-gui/0" to new machine: use "juju add-machine ssh:[user@]<host>" to provision machines

juju status outputs the following:

environment: manual
    agent-state: started
    agent-version: 1.18.3
    instance-id: 'manual:'
    series: precise
    hardware: arch=amd64 cpu-cores=1 mem=1996M
    agent-state: started
    agent-version: 1.18.3
    series: precise
    hardware: arch=amd64 cpu-cores=1 mem=1996M
    charm: cs:trusty/juju-gui-2
    exposed: true
        agent-state: pending

Did I miss something?

share|improve this question

Judging by the juju status output, you've bootstrapped a manual environment (using juju bootstrap, which is different from manual provisioning, done using juju add-machine ssh:[user@]host).

Manual environments are special - they consist only of a single machine and it cannot start or stop additional machines automatically, including on juju deploy. To add another machine, use juju add-machine ssh:[user@]host first, then juju deploy juju-gui --to #, where # is the juju machine id of the machine you've just added (run juju status to see it). You can also use juju deploy juju-gui --to 0 to deploy Juju GUI on the bootstrap machine.

juju add-machine ssh:[user@]host can be used in any bootstrapped environment to manually provision an external machine and add it to the environment. But with a manually bootstrapped environment, that's the only way to add machines, and you have to specify placement for services and units when deploying, with --to <machine-id> explicitly.

I hope that clears up any confusion. We definitely need better documentation on that I suppose.

share|improve this answer
Thank you very much for your detailed answer. Unfortunately now I run into another problem: juju deploy juju-gui --to 0 Added charm "cs:trusty/juju-gui-2" to the environment. ERROR cannot assign unit "juju-gui/0" to machine 0: series does not match – chmanie May 20 '14 at 16:46
@chmanie Can you ask the series question as a new one? It's unrelated to this issue, that way we can have one solution per post, thanks! – Jorge Castro May 20 '14 at 20:33
If you're satisfied with the answer for your original question, please mark it as accepted. – dimitern May 22 '14 at 7:30
If you use juju-gui, it does not add the --to # on charm deploy and so all charms fail? – Matthew James Davis Aug 23 '14 at 16:30

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.