The juju master domain name changed from juju.this.domain.example to juju.new.domain.example because of new rules from IT managers. The IP address also changed. And, this change affected all the juju units, that now are with new IPs and domain names.

I'm using manual environment.

Is possible to change the information to restore connectivity from my workstation and all the juju-agents I have deployed in my environment?


That solves the problem:


Restoring connectivity to the state server from your client workstation

You will need to edit the jenv that juju created for the environment during juju bootstrap which will be located: $JUJU_HOME/environments/<environment_name>.jenv

The jenv has a yaml file format, so be familiar with that so you know what to look for:


Each line item below state-servers will need to be updated with the new state servers address. You may have one or more listed here depending on if you did juju ensure-availability - which will turn a single node state server into a High Availability state server.

Restoring connectivity to the state server from juju-agents

There will be 2 or more configuration files to edit per agent.

  • 1 for the machine
  • 1 for each unit-agent of service you deploy to the machine

Given the scenario:

juju deploy elasticsearch

You will have 2 files to edit - the Machine conf, and the elasticsearch conf. If you have co-located any services on the machine you will have an additional config per service added to the machine. (Dont forget about KVM and LXC containers, as this also increases the number of conf files to edit, and will reside in that services container)

You will find the Machine configuration in /var/lib/juju/agents/machine-1/agent.conf You will find the service configuration in /var/lib/juju/agents/unit-elasticsearch-0/unit.conf

then kill jujud and let upstart restart it

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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