File agent.conf missing apiaddresses: entry after network outage or upgrade(?)

Another semi failed Kubernetes environment. Environment itself seems to function, however Juju unit agents reporting lost connectivity from one agent to another. There is no pattern. On some hosts ntp subunit failed, on others nrpe. Some have had main unit agent connectivity failure.

Did we stumble upon some bug?

All of them reporting the same:

agent lost, see 'juju show-status-log AGENT/NUMBER'

When checking agent.conf file I see missing apiaddresses entry, some passwords too:

    controller: controller-2fa9c671-d95b-4ad5-8843-5e314f3f7706
    model: model-89848811-0bdb-4db8-8e31-501824f7bd23
    apipassword: ****
    oldpassword: ****
    loggingconfig: <root>=INFO;unit=DEBUG
    values:
      CONTAINER_TYPE: ""
      NAMESPACE: ""
    mongoversion: "0.0"

On a working unit I see Juju API endpoint as expected:

controller: controller-2fa9c671-d95b-4ad5-8843-5e314f3f7706
model: model-89848811-0bdb-4db8-8e31-501824f7bd23
apiaddresses:
- a.b.c.d:17070
apipassword: ***
oldpassword: ***
loggingconfig: <root>=INFO;unit=DEBUG
values:
  CONTAINER_TYPE: ""
  NAMESPACE: ""
mongoversion: "0.0"

One thing in common. When looking at the agent log file, I see that on April16 there was a connectivity failure and Juju upgrade(?):

2020-04-16 12:43:21 ERROR juju.worker.dependency engine.go:671 "api-caller" manifold worker returned unexpected error: [898488] "unit-calico-8" cannot open api: unable to connect to API: dial tcp a.b.c.d:17070: connect: network is unreachable
2020-04-16 12:45:28 ERROR juju.worker.dependency engine.go:671 "api-caller" manifold worker returned unexpected error: [898488] "unit-calico-8" cannot open api: unable to connect to API: dial tcp a.b.c.d:17070: connect: network is unreachable
2020-04-16 12:47:26 ERROR juju.worker.dependency engine.go:671 "api-caller" manifold worker returned unexpected error: [898488] "unit-calico-8" cannot open api: unable to connect to API: dial tcp a.b.c.d:17070: connect: network is unreachable
2020-04-16 12:49:21 ERROR juju.worker.dependency engine.go:671 "api-caller" manifold worker returned unexpected error: [898488] "unit-calico-8" cannot open api: unable to connect to API: dial tcp a.b.c.d:17070: connect: network is unreachable
2020-04-16 12:51:20 INFO juju.api apiclient.go:624 connection established to "wss://a.b.c.d:17070/model/89848811-0bdb-4db8-8e31-501824f7bd23/api"
2020-04-16 12:51:20 INFO juju.worker.apicaller connect.go:158 [898488] "unit-calico-8" successfully connected to "a.b.c.d:17070"
2020-04-16 12:51:20 INFO juju.worker.migrationminion worker.go:139 migration phase is now: NONE
2020-04-16 12:51:20 INFO juju.worker.logger logger.go:118 logger worker started
2020-04-16 12:51:20 INFO juju.worker.upgrader upgrader.go:155 abort check blocked until version event received
2020-04-16 12:51:20 INFO juju.worker.upgrader upgrader.go:161 unblocking abort check
2020-04-16 12:51:20 INFO juju.worker.upgrader upgrader.go:194 desired agent binary version: 2.7.5
2020-04-16 12:51:20 INFO juju.agent.tools symlinks.go:20 ensure jujuc symlinks in /var/lib/juju/tools/unit-calico-8
2020-04-16 12:51:20 INFO juju.agent.tools symlinks.go:40 was a symlink, now looking at /var/lib/juju/tools/2.7.5-bionic-amd64
2020-04-16 12:51:20 INFO juju.worker.uniter.relation relations.go:553 joining relation "calico:etcd etcd:db"
2020-04-16 12:51:20 INFO juju.worker.leadership tracker.go:194 calico/8 promoted to leadership of calico
2020-04-16 12:51:20 INFO juju.worker.uniter.relation relations.go:589 joined relation "calico:etcd etcd:db"
2020-04-16 12:51:20 INFO juju.worker.uniter.relation relations.go:553 joining relation "calico:cni kubernetes-master:cni"
2020-04-16 12:51:20 INFO juju.worker.logger logger.go:134 logger worker stopped
2020-04-16 12:51:20 ERROR juju.worker.uniter.relation relations.go:568 while stopping unit watcher: connection is shut down
2020-04-16 12:51:20 ERROR juju.worker.dependency engine.go:671 "api-caller" manifold worker returned unexpected error: [898488] "unit-calico-8" cannot open api: validating info for opening an API connection: missing addresses not valid
2020-04-16 12:51:20 ERROR juju.worker.dependency engine.go:671 "api-caller" manifold worker returned unexpected error: [898488] "unit-calico-8" cannot open api: validating info for opening an API connection: missing addresses not valid
2020-04-16 12:51:24 ERROR juju.worker.dependency engine.go:671 "api-caller" manifold worker returned unexpected error: [898488] "unit-calico-8" cannot open api: validating info for opening an API connection: missing addresses not valid

Similar upgrade(?) lines seen on April 02, but there was no errors and no connectivity issues.

Where to poke next? And what possible ways to fix missing apiaddress.

Just adding api address does seem to help, but at least one unit file was missing passwords too and copying passwords from working host, obviously failed. :slight_smile: But still it is not a nice thing to loose API connectivity.

Did you ever figure this out? I think I’ve hit the same issue on an upgrade to 2.8. All my agents are failing, but the machines are up and happy. /var/log/juju/machine-17.log is full of:

2020-07-18 06:04:13 ERROR juju.worker.dependency engine.go:671 "api-caller" manifold worker returned unexpected error: [6bad3a] "machine-17" cannot open api: validating info for opening an API connection: missing addresses not valid

and the /var/lib/juju/agents/machine-17/agent.conf file has no apiaddresses. Unfortunately this file is written back out immediately when I start the agent so I can’t seem to edit it to kick things into working for a while.

Hey @knobby,

Thanks for letting us know about this. I have done some digging and I don’t have a concrete reproduction case for this. Would you mind sharing some more information about your setup and controllers?

What version did you upgrade from. In any event I have started launch pad bug Bug #1888453 “Empty API Addresses In agent.conf” : Bugs : juju and putting a code fix in at the moment that should hopefully let us identify the issue if it happens again.

Cheers
tlm

Hi @tlm,

Thanks for the response. I believe I upgraded from the latest 2.7 point release, but I can’t be sure. I am on 2.8.0 right now and I see 2.8.1 is out, but I’m not sure how to manually upgrade the agents.

My setup is meager, but I have a dedicated MaaS machine and a dedicated juju controller that was deployed via MaaS. I have 6 other physical machines in my cluster running CDK, nagios, and vault. These machines are a deployed kubernetes-worker and then lxd for the other applications on top of that. The controller model is the only thing green in the setup right now.

$ juju status -m controller
Model       Controller     Cloud/Region  Version  SLA          Timestamp  Notes
controller  hp-controller  maas          2.8.0    unsupported  14:54:43Z  upgrade available: 2.8.1

Machine  State    DNS  Inst id  Series  AZ       Message
0        started       nx4dnm   bionic  ratbert  Deployed
$ juju status
Model  Controller     Cloud/Region  Version  SLA          Timestamp
k8s    hp-controller  maas          2.8.0    unsupported  14:54:22Z

App                  Version  Status       Scale  Charm                Store       Rev  OS      Notes
canonical-livepatch           active         0/6  canonical-livepatch  jujucharms   38  ubuntu
docker                        error          0/9  docker               jujucharms   74  ubuntu
etcd                 3.2.10   active         0/3  etcd                 jujucharms  521  ubuntu
flannel              0.11.0   active         0/9  flannel              jujucharms  492  ubuntu
kubernetes-master    1.18.5   active         0/3  kubernetes-master    jujucharms  850  ubuntu
kubernetes-worker    1.18.2   maintenance    0/6  kubernetes-worker    jujucharms  682  ubuntu  exposed
nagios                        active         0/1  nagios               jujucharms   37  ubuntu  exposed
nrpe                          active         0/6  nrpe                 jujucharms   64  ubuntu
nrpe-lxd                      active         0/6  nrpe                 jujucharms   64  ubuntu
percona-cluster      5.7.20   active         0/1  percona-cluster      jujucharms  290  ubuntu
vault                1.1.1    active         0/1  vault                jujucharms  100  ubuntu

Unit                       Workload  Agent  Machine   Public address  Ports           Message
etcd/3                     unknown   lost   18/lxd/0  10.0.4.54       2379/tcp        agent lost, see 'juju show-status-log etcd/3'
  nrpe-lxd/2               unknown   lost             10.0.4.54       icmp,5666/tcp   agent lost, see 'juju show-status-log nrpe-lxd/2'
etcd/6                     unknown   lost   22/lxd/1  10.0.4.64       2379/tcp        agent lost, see 'juju show-status-log etcd/6'
  nrpe-lxd/1               unknown   lost             10.0.4.64       icmp,5666/tcp   agent lost, see 'juju show-status-log nrpe-lxd/1'
etcd/9                     unknown   lost   17/lxd/1  10.0.4.62       2379/tcp        agent lost, see 'juju show-status-log etcd/9'
  nrpe-lxd/0               unknown   lost             10.0.4.62       icmp,5666/tcp   agent lost, see 'juju show-status-log nrpe-lxd/0'
kubernetes-master/4        unknown   lost   17/lxd/0  10.0.4.59       6443/tcp        agent lost, see 'juju show-status-log kubernetes-master/4'
  docker/20                error     lost             10.0.4.59                       hook failed: "upgrade-charm"
  flannel/13               unknown   lost             10.0.4.59                       agent lost, see 'juju show-status-log flannel/13'
  nrpe-lxd/3               unknown   lost             10.0.4.59       icmp,5666/tcp   agent lost, see 'juju show-status-log nrpe-lxd/3'
kubernetes-master/7        unknown   lost   23/lxd/0  10.0.4.52       6443/tcp        agent lost, see 'juju show-status-log kubernetes-master/7'
  docker/72                unknown   lost             10.0.4.52                       agent lost, see 'juju show-status-log docker/72'
  flannel/40               unknown   lost             10.0.4.52                       agent lost, see 'juju show-status-log flannel/40'
  nrpe-lxd/5               unknown   lost             10.0.4.52       icmp,5666/tcp   agent lost, see 'juju show-status-log nrpe-lxd/5'
kubernetes-master/9        unknown   lost   22/lxd/5  10.0.4.63       6443/tcp        agent lost, see 'juju show-status-log kubernetes-master/9'
  docker/114               error     lost             10.0.4.63                       hook failed: "upgrade-charm"
  flannel/84               unknown   lost             10.0.4.63                       agent lost, see 'juju show-status-log flannel/84'
  nrpe-lxd/4               unknown   lost             10.0.4.63       icmp,5666/tcp   agent lost, see 'juju show-status-log nrpe-lxd/4'
kubernetes-worker/8        unknown   lost   17        10.0.4.61       80/tcp,443/tcp  agent lost, see 'juju show-status-log kubernetes-worker/8'
  canonical-livepatch/31   unknown   lost             10.0.4.61                       agent lost, see 'juju show-status-log canonical-livepatch/31'
  docker/19                error     lost             10.0.4.61                       hook failed: "docker-relation-changed"
  flannel/12               unknown   lost             10.0.4.61                       agent lost, see 'juju show-status-log flannel/12'
  nrpe/13                  unknown   lost             10.0.4.61       icmp,5666/tcp   agent lost, see 'juju show-status-log nrpe/13'
kubernetes-worker/9        unknown   lost   18        10.0.4.58       80/tcp,443/tcp  agent lost, see 'juju show-status-log kubernetes-worker/9'
  canonical-livepatch/67   unknown   lost             10.0.4.58                       agent lost, see 'juju show-status-log canonical-livepatch/67'
  docker/36                error     lost             10.0.4.58                       hook failed: "start"
  flannel/24               unknown   lost             10.0.4.58                       agent lost, see 'juju show-status-log flannel/24'
  nrpe/44                  unknown   lost             10.0.4.58       icmp,5666/tcp   agent lost, see 'juju show-status-log nrpe/44'
kubernetes-worker/14       unknown   lost   23        10.0.4.51       80/tcp,443/tcp  agent lost, see 'juju show-status-log kubernetes-worker/14'
  canonical-livepatch/131  unknown   lost             10.0.4.51                       agent lost, see 'juju show-status-log canonical-livepatch/131'
  docker/71                unknown   lost             10.0.4.51                       agent lost, see 'juju show-status-log docker/71'
  flannel/39               unknown   lost             10.0.4.51                       agent lost, see 'juju show-status-log flannel/39'
  nrpe/96                  unknown   lost             10.0.4.51       icmp,5666/tcp   agent lost, see 'juju show-status-log nrpe/96'
kubernetes-worker/15       unknown   lost   22        10.0.4.57       80/tcp,443/tcp  agent lost, see 'juju show-status-log kubernetes-worker/15'
  canonical-livepatch/247  unknown   lost             10.0.4.57                       agent lost, see 'juju show-status-log canonical-livepatch/247'
  docker/97                error     lost             10.0.4.57                       hook failed: "upgrade-charm"
  flannel/74               unknown   lost             10.0.4.57                       agent lost, see 'juju show-status-log flannel/74'
  nrpe/165                 unknown   lost             10.0.4.57       icmp,5666/tcp   agent lost, see 'juju show-status-log nrpe/165'
kubernetes-worker/19       unknown   lost   31        10.0.4.53       80/tcp,443/tcp  agent lost, see 'juju show-status-log kubernetes-worker/19'
  canonical-livepatch/248  unknown   lost             10.0.4.53                       agent lost, see 'juju show-status-log canonical-livepatch/248'
  docker/115               unknown   lost             10.0.4.53                       agent lost, see 'juju show-status-log docker/115'
  flannel/85               unknown   lost             10.0.4.53                       agent lost, see 'juju show-status-log flannel/85'
  nrpe/197                 unknown   lost             10.0.4.53       icmp,5666/tcp   agent lost, see 'juju show-status-log nrpe/197'
kubernetes-worker/21       unknown   lost   33        10.0.4.56       80/tcp,443/tcp  agent lost, see 'juju show-status-log kubernetes-worker/21'
  canonical-livepatch/250  unknown   lost             10.0.4.56                       agent lost, see 'juju show-status-log canonical-livepatch/250'
  docker/117               unknown   lost             10.0.4.56                       agent lost, see 'juju show-status-log docker/117'
  flannel/87               unknown   lost             10.0.4.56                       agent lost, see 'juju show-status-log flannel/87'
  nrpe/199                 unknown   lost             10.0.4.56       icmp,5666/tcp   agent lost, see 'juju show-status-log nrpe/199'
nagios/1                   unknown   lost   22/lxd/0  10.0.4.60       80/tcp          agent lost, see 'juju show-status-log nagios/1'
percona-cluster/0          unknown   lost   22/lxd/2  10.0.4.65       3306/tcp        agent lost, see 'juju show-status-log percona-cluster/0'
vault/0                    unknown   lost   22/lxd/3  10.0.4.66       8200/tcp        agent lost, see 'juju show-status-log vault/0'

Machine   State  DNS        Inst id               Series  AZ       Message
17        down   10.0.4.61  dogbert               bionic  dogbert  Deployed
17/lxd/0  down   10.0.4.59  juju-ebd0e3-17-lxd-0  bionic  dogbert  Container started
17/lxd/1  down   10.0.4.62  juju-ebd0e3-17-lxd-1  bionic  dogbert  Container started
18        down   10.0.4.58  catbert               bionic  catbert  Deployed
18/lxd/0  down   10.0.4.54  juju-ebd0e3-18-lxd-0  bionic  catbert  Container started
22        down   10.0.4.57  alice                 bionic  alice    Deployed
22/lxd/0  down   10.0.4.60  juju-ebd0e3-22-lxd-0  bionic  alice    Container started
22/lxd/1  down   10.0.4.64  juju-ebd0e3-22-lxd-1  bionic  alice    Container started
22/lxd/2  down   10.0.4.65  juju-ebd0e3-22-lxd-2  bionic  alice    Container started
22/lxd/3  down   10.0.4.66  juju-ebd0e3-22-lxd-3  bionic  alice    Container started
22/lxd/5  down   10.0.4.63  juju-ebd0e3-22-lxd-5  bionic  alice    Container started
23        down   10.0.4.51  work-pc               bionic  work-pc  Deployed
23/lxd/0  down   10.0.4.52  juju-ebd0e3-23-lxd-0  bionic  work-pc  Container started
31        down   10.0.4.53  xbone0                bionic  default  Deployed
33        down   10.0.4.56  xbone1                bionic  default  Deployed

Offer   Application  Charm   Rev  Connected  Endpoint  Interface  Role
nagios  nagios       nagios  37   0/0        monitors  monitors   requirer

The biggest thing I want to do is tell the agents how to find the controller. It keeps smashing the config file when I try and add it.

Hey Knobby,

Thanks for the information. The PR for some more information landed yesterday. Would you be able to try and recreate the problem with this edge release for 2.8.2?

I’ll try and spin up some testing soon on AWS with lxd to see if I can replicate the issue from my side.

What happens if you stop the agent change the config file and restart the agent? Can you share the log files from that restart?

Cheers
tlm

So if I do this on the controller, it seems to be happy with the configuration, but unhappy overall. It changes from

2020-08-02 04:09:39 INFO juju.cmd supercommand.go:91 running jujud [2.8.0 0 d816abe62fbf6787974e5c4e140818ca08586e44 gc go1.14.4]
2020-08-02 04:09:39 DEBUG juju.cmd supercommand.go:92   args: []string{"/var/lib/juju/tools/machine-0/jujud", "machine", "--data-dir", "/var/lib/juju", "--machine-id", "0", "--debug"}
2020-08-02 04:09:39 DEBUG juju.utils gomaxprocs.go:24 setting GOMAXPROCS to 2
2020-08-02 04:09:39 DEBUG juju.agent agent.go:575 read agent config, format "2.0"
2020-08-02 04:09:39 INFO juju.cmd.jujud agent.go:138 setting logging config to "<root>=WARNING;unit=DEBUG"
2020-08-02 04:09:39 ERROR juju.worker.apiconfigwatcher manifold.go:132 retrieving API addresses: No apidetails in config
2020-08-02 04:09:39 ERROR juju.worker.apiconfigwatcher manifold.go:132 retrieving API addresses: No apidetails in config
2020-08-02 04:09:39 ERROR juju.worker.apiconfigwatcher manifold.go:132 retrieving API addresses: No apidetails in config
2020-08-02 04:09:39 ERROR juju.worker.dependency engine.go:671 "api-caller" manifold worker returned unexpected error: [21a522] "machine-0" cannot open api: API info not available
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0xc4c3d8]

goroutine 178 [running]:
github.com/juju/juju/agent.(*configInternal).MongoInfo(0xc00003ea80, 0xc00065fa68, 0x287f7a1)
        /workspace/_build/src/github.com/juju/juju/agent/agent.go:892 +0x1f8
github.com/juju/juju/cmd/jujud/agent.openStatePool(0x4c879c0, 0xc00003ea80, 0x6fc23ac00, 0xdf8475800, 0x0, 0x452dcb0, 0xc0006d2660, 0x0, 0xc0006d2670, 0x0, ...)
        /workspace/_build/src/github.com/juju/juju/cmd/jujud/agent/machine.go:1210 +0x63
github.com/juju/juju/cmd/jujud/agent.(*MachineAgent).initState(0xc000291440, 0x4c879c0, 0xc00003ea80, 0xc000291440, 0x4c879c0, 0xc00003ea80)
        /workspace/_build/src/github.com/juju/juju/cmd/jujud/agent/machine.go:1038 +0x189
github.com/juju/juju/worker/state.Manifold.func1(0x4bac8a0, 0xc000426060, 0x1b, 0xc0004b3440, 0x1, 0x1)
        /workspace/_build/src/github.com/juju/juju/worker/state/manifold.go:88 +0x1e1
github.com/juju/worker/v2/dependency.(*Engine).runWorker.func1(0x0, 0x0, 0x0, 0x0)
        /workspace/_build/src/github.com/juju/juju/vendor/github.com/juju/worker/v2/dependency/engine.go:504 +0x356
github.com/juju/worker/v2/dependency.(*Engine).runWorker.func2(0x0, 0x0)
        /workspace/_build/src/github.com/juju/juju/vendor/github.com/juju/worker/v2/dependency/engine.go:508 +0x62
github.com/juju/worker/v2/dependency.(*Engine).runWorker(0xc0001bc000, 0x438658c, 0x5, 0x989680, 0xc0003de500, 0xc000426060)
        /workspace/_build/src/github.com/juju/juju/vendor/github.com/juju/worker/v2/dependency/engine.go:539 +0xe9
created by github.com/juju/worker/v2/dependency.(*Engine).requestStart
        /workspace/_build/src/github.com/juju/juju/vendor/github.com/juju/worker/v2/dependency/engine.go:414 +0x50b

to

2020-08-02 04:09:43 ERROR juju.worker.dependency engine.go:671 "api-caller" manifold worker returned unexpected error: [21a522] "machine-0" cannot open api: API info not available
2020-08-02 04:10:48 INFO juju.cmd supercommand.go:91 running jujud [2.8.0 0 d816abe62fbf6787974e5c4e140818ca08586e44 gc go1.14.4]
2020-08-02 04:10:48 DEBUG juju.cmd supercommand.go:92   args: []string{"/var/lib/juju/tools/machine-0/jujud", "machine", "--data-dir", "/var/lib/juju", "--machine-id", "0", "--debug"}
2020-08-02 04:10:48 DEBUG juju.utils gomaxprocs.go:24 setting GOMAXPROCS to 2
2020-08-02 04:10:48 DEBUG juju.agent agent.go:575 read agent config, format "2.0"
2020-08-02 04:10:48 INFO juju.cmd.jujud agent.go:138 setting logging config to "<root>=WARNING;unit=DEBUG"
2020-08-02 04:10:49 ERROR juju.worker.dependency engine.go:671 "api-caller" manifold worker returned unexpected error: [21a522] "machine-0" cannot open api: unable to connect to API: dial tcp 127.0.0.1:17070: connect: connection refused
2020-08-02 04:10:53 ERROR juju.worker.dependency engine.go:671 "api-caller" manifold worker returned unexpected error: [21a522] "machine-0" cannot open api: unable to connect to API: dial tcp 127.0.0.1:17070: connect: connection refused
2020-08-02 04:10:53 ERROR juju.worker.modelcache worker.go:366 watcher error: error loading entities for model 6bad3a62-8bdc-4f6d-83fc-48aff1ebd0e3: failed to initialise backing for machines:17: retrieving space for ID "1": space id "1" not found, getting new watcher
2020-08-02 04:10:53 ERROR juju.worker.modelcache worker.go:366 watcher error: error loading entities for model 6bad3a62-8bdc-4f6d-83fc-48aff1ebd0e3: failed to initialise backing for machines:17: retrieving space for ID "1": space id "1" not found, getting new watcher
2020-08-02 04:10:54 ERROR juju.worker.modelcache worker.go:366 watcher error: error loading entities for model 6bad3a62-8bdc-4f6d-83fc-48aff1ebd0e3: failed to initialise backing for machines:17: retrieving space for ID "1": space id "1" not found, getting new watcher
2020-08-02 04:10:54 ERROR juju.worker.modelcache worker.go:366 watcher error: error loading entities for model 6bad3a62-8bdc-4f6d-83fc-48aff1ebd0e3: failed to initialise backing for machines:17: retrieving space for ID "1": space id "1" not found, getting new watcher
2020-08-02 04:10:54 ERROR juju.worker.modelcache worker.go:366 watcher error: error loading entities for model 6bad3a62-8bdc-4f6d-83fc-48aff1ebd0e3: failed to initialise backing for machines:17: retrieving space for ID "1": space id "1" not found, getting new watcher
2020-08-02 04:10:54 ERROR juju.worker.modelcache worker.go:366 watcher error: error loading entities for model 6bad3a62-8bdc-4f6d-83fc-48aff1ebd0e3: failed to initialise backing for machines:17: retrieving space for ID "1": space id "1" not found, getting new watcher
2020-08-02 04:10:55 ERROR juju.worker.modelcache worker.go:366 watcher error: error loading entities for model 6bad3a62-8bdc-4f6d-83fc-48aff1ebd0e3: failed to initialise backing for machines:17: retrieving space for ID "1": space id "1" not found, getting new watcher
2020-08-02 04:10:56 ERROR juju.worker.modelcache worker.go:366 watcher error: error loading entities for model 6bad3a62-8bdc-4f6d-83fc-48aff1ebd0e3: failed to initialise backing for machines:17: retrieving space for ID "1": space id "1" not found, getting new watcher
2020-08-02 04:10:57 ERROR juju.worker.modelcache worker.go:366 watcher error: error loading entities for model 6bad3a62-8bdc-4f6d-83fc-48aff1ebd0e3: failed to initialise backing for machines:17: retrieving space for ID "1": space id "1" not found, getting new watcher
2020-08-02 04:10:58 ERROR juju.worker.dependency engine.go:671 "api-caller" manifold worker returned unexpected error: [21a522] "machine-0" cannot open api: unable to connect to API: dial tcp 127.0.0.1:17070: connect: connection refused

The units are naturally complaining about the API server. They seem to be happy with me adding the apiserver to the config, but before they would stomp that config. Not sure what changed there.

After a reboot of the controller I now see

2020-08-02 04:47:31 INFO juju.cmd supercommand.go:91 running jujud [2.8.0 0 d816abe62fbf6787974e5c4e140818ca08586e44 gc go1.14.4]
2020-08-02 04:47:31 DEBUG juju.cmd supercommand.go:92   args: []string{"/var/lib/juju/tools/machine-0/jujud", "machine", "--data-dir", "/var/lib/juju", "--machine-id", "0", "--debug"}
2020-08-02 04:47:31 DEBUG juju.utils gomaxprocs.go:24 setting GOMAXPROCS to 2
2020-08-02 04:47:31 DEBUG juju.agent agent.go:575 read agent config, format "2.0"
2020-08-02 04:47:31 INFO juju.cmd.jujud agent.go:138 setting logging config to "<root>=WARNING;unit=DEBUG"
2020-08-02 04:47:32 ERROR juju.worker.dependency engine.go:671 "api-caller" manifold worker returned unexpected error: [21a522] "machine-0" cannot open api: unable to connect to API: dial tcp 127.0.0.1:17070: connect: connection refused
2020-08-02 04:47:35 ERROR juju.worker.apicaller connect.go:204 Failed to connect to controller: invalid entity name or password (unauthorized access)

This doesn’t appear to be installed via snap on the controller. I used maas to provision the machine, so I’m unsure how to switch it over to edge or update it outside of using the juju cli. I would be happy to do that and provide more information/logs if you can tell me how to update.