Incus CLI making requests to wrong IP

tl;dr

incus CLI is still trying to use an IP my laptop doesn’t use anymore (used to be static, could have been setup locally at some point, then I moved to setting it up on my DHCP server and don’t remember if I left anything local that could cause all of this).

A simple command like:

incus conig get core.https_address

returns:

Error: Get "https://192.168.1.224:8443/1.0": EOF

That used to be my static local network IP, but now my local IPs are in 192.168.2.0/24, so there’s something from the old config messing things up.

Context

I tried incus with the interactive init some time ago. Created a few images and image pools, looked good for what I needed and I set it aside for a while.

Came back to it after moving home and changing subnet from 192.168.1.0/24 to 192.168.2.0/24 (and might change it again soon).

As I was trying the Cluster API infra provider for incus, I blindly followed the Getting started instructions, which include an incus admin init part.

Did a few rounds of apt uninstall, apt purge, manual zpool removals, manual brctl removals (I think I only needed this once), but to no avail.

incus version
Client version: 6.21
Server versions: unreachable

I haven’t found any reference to my old IP in an incus admin init –dump and I’m too new to incus to have any clue about where to look for text files containing the configuration (but have tried /opt/incus and /var/lib/incus too, although errors about large files might have gotten in the way of that).

Any pointers about where to look for the root cause would be very appreciated.

More logs/config dumps

systemctl status incus.service log lines:

Feb 12 18:02:38 myhostname dnsmasq-dhcp[132781]: IPv6 router advertisement enabled
Feb 12 18:02:38 myhostname dnsmasq-dhcp[132781]: DHCP, sockets bound exclusively to interface incusbr0
Feb 12 18:02:38 myhostname dnsmasq[132781]: using only locally-known addresses for incus
Feb 12 18:02:38 myhostname dnsmasq[132781]: reading /etc/resolv.conf
Feb 12 18:02:38 myhostname dnsmasq[132781]: using nameserver 127.0.0.53#53
Feb 12 18:02:38 myhostname dnsmasq[132781]: using only locally-known addresses for incus
Feb 12 18:02:38 myhostname dnsmasq[132781]: bad address at /etc/hosts line 3
Feb 12 18:02:38 myhostname dnsmasq[132781]: bad address at /etc/hosts line 4
Feb 12 18:02:38 myhostname dnsmasq[132781]: bad address at /etc/hosts line 6
Feb 12 18:02:38 myhostname dnsmasq[132781]: read /etc/hosts - 10 names

Those logs don’t match my machine’s /etc/hosts, not 10 names there, just the defaults and a couple alias lines for 127.0.0.1 to resolve hostnames of some docker tests I did.

Are the log lines referring to incus’s own /etc/hosts and resolf.conf? Where are hose in my filesystem?

incus admin init –dump

config: {}
networks:
- config:
    ipv4.address: 10.109.81.1/24
    ipv4.nat: "true"
    ipv6.address: fd42:ccb0:147:5f4e::1/64
    ipv6.nat: "true"
  description: ""
  name: incusbr0
  type: bridge
  project: default
storage_pools:
- config:
    size: 30GiB
    source: /var/lib/incus/disks/default.img
    zfs.pool_name: default
  description: ""
  name: default
  driver: zfs
storage_volumes: []
profiles:
- config: {}
  description: Default Incus profile
  devices:
    eth0:
      name: eth0
      network: incusbr0
      type: nic
    root:
      path: /
      pool: default
      type: disk
  name: default
  project: ""
projects:
- config:
    features.images: "true"
    features.networks: "true"
    features.networks.zones: "true"
    features.profiles: "true"
    features.storage.buckets: "true"
    features.storage.volumes: "true"
  description: Default Incus project
  name: default
certificates: []
cluster_groups: []

See Incus Startup fails "listen tcp 192.168.20.241:8443: bind: cannot assign requested address"

Adding the IP to the device only didn’t solve it. I haven’t tried restarting the service or the interface because the other workaround did solve my issue:

An incus remote list showed local-https as default and pointing to the damned old IP. I used incus remote switch local to change the default and now my incus commands work.