Instance not found

I have a debian 12 host and container.

When I execute in the container
systemctl reload nginx
everything is fine.

When I execute on the host
incus exec ub – systemctl reload nginx
everything is fine.

But when i put ‘incus exec ub – systemctl reload nginx’ in a bash alias on the host,
or i put ‘systemctl reload nginx’ in a bash script in the container, and execute that script from the host,
the output is ‘Error: Instance not found’.

The output of ‘incus list’ is now also: ‘Error: Instance not found’.

The container is still running, I can open new ssh connections to the comtainer,
and execute commands (even ‘systemctl reload nginx’). But on the host the container is no longer known.

I hope someone can give me a tip, I have no idea why this is happening.
Why this difference between simply executing a commmand in the bash terminal, or executing an alias with the same command.

Config (before executing the alias):
architecture: x86_64
environment.LANG: nl_BE.UTF-8
environment.LANGUAGE: nl_BE:UTF-8
environment.LC_ALL: nl_BE.UTF-8
image.architecture: amd64
image.description: Debian bookworm amd64 (20240105_05:24)
image.os: Debian
image.release: bookworm
image.serial: “20240105_05:24”
image.type: squashfs
image.variant: default
volatile.base_image: 36a25587739f7ca8e6e8a7ce03a24f336f353ef764abd37ab7d0c8a1bf1d0b49 cba101e7-e9a1-42f5-87b6-cf68a2fa8b00
volatile.eth0.host_name: veth28a262d0
volatile.eth0.hwaddr: 00:16:3e:31:f2:ea
volatile.idmap.base: “0”
volatile.idmap.current: ‘[{“Isuid”:true,“Isgid”:false,“Hostid”:1000000,“Nsid”:0,“Maprange”:1000000000},{“Isuid”:false,“Isgid”:true,“Hostid”:1000000,“Nsid”:0,“Maprange”:1000000000}]’ ‘[{“Isuid”:true,“Isgid”:false,“Hostid”:1000000,“Nsid”:0,“Maprange”:1000000000},{“Isuid”:false,“Isgid”:true,“Hostid”:1000000,“Nsid”:0,“Maprange”:1000000000}]’
volatile.last_state.idmap: ‘[{“Isuid”:true,“Isgid”:false,“Hostid”:1000000,“Nsid”:0,“Maprange”:1000000000},{“Isuid”:false,“Isgid”:true,“Hostid”:1000000,“Nsid”:0,“Maprange”:1000000000}]’
volatile.last_state.power: RUNNING
volatile.uuid: 38b72011-2460-4209-a5ad-e7b48977c675
volatile.uuid.generation: 05ebe9f5-7848-4a64-85d3-b53decee71ad
path: /aa/host
readonly: “on”
shift: “true”
source: /aa/host
type: disk
ipv6.address: fd42:aaaa:bbbb:cccc::10
name: eth0
network: incusbr0
type: nic
path: /
pool: default
type: disk
connect: tcp:
listen: tcp:
nat: “true”
type: proxy
ephemeral: false

  • default
  • aaHost
    stateful: false
    description: “”

Please forget my request for help, apparently the problem had to do with invisible characters.

1 Like

How did you figure that out?