Changing openBalena Domain

I stopped the container, deleted it, and removed its corresponding image as follows:

root@89a1389:~# balena container list
CONTAINER ID   IMAGE                                                            COMMAND                  CREATED      STATUS                    PORTS     NAMES
6d8fd99dd758   registry2.balena-cloud.com/v2/66f0a291f1d4171bb94352cc9557f8bc   "/usr/src/app/entry.…"   3 days ago   Up 31 minutes (healthy)             balena_supervisor
7e053f4f51e8   7f4c19191fa1                                                     "/usr/bin/entry.sh b…"   3 days ago   Up 31 minutes                       node-red_2_2_29dc355312db4c630dcc9e64e66946db

root@89a1389:~# balena container rm 7e053f4f51e8
Error response from daemon: You cannot remove a running container 7e053f4f51e80e2cc06826e160b6a2339c132c167277c586f14ca57485fd9d49. Stop the container before attempting removal or force remove

root@89a1389:~# balena container stop 7e053f4f51e8
root@89a1389:~# balena container rm 7e053f4f51e8
root@89a1389:~# balena container list
CONTAINER ID   IMAGE                                                            COMMAND                  CREATED      STATUS                    PORTS     NAMES
6d8fd99dd758   registry2.balena-cloud.com/v2/66f0a291f1d4171bb94352cc9557f8bc   "/usr/src/app/entry.…"   3 days ago   Up 33 minutes (healthy)             balena_supervisor
root@89a1389:~# balena image list
REPOSITORY                                                           TAG        IMAGE ID       CREATED        SIZE
registry2.old-domain.local/v2/5905ba86aa8f7c5c69e45e1e93c8a46f   latest     7f4c19191fa1   6 days ago     844MB
balena_supervisor                                                    v16.10.1   97aee429b5df   6 months ago   112MB
registry2.balena-cloud.com/v2/66f0a291f1d4171bb94352cc9557f8bc       latest     97aee429b5df   6 months ago   112MB
root@89a1389:~# balena container rm 7e053f4f51e8
7e053f4f51e8
root@89a1389:~# balena image rm 7f4c19191fa1
[some layer deleted]

Now the error I’d seen in the past has returned, which is:

Jun 10 10:41:10 89a1389 balena-supervisor[3973]: [api]     GET /v1/healthy 200 - 6.162 ms
Jun 10 10:43:09 89a1389 balena-supervisor[3973]: [info]    Reported current state to the cloud
Jun 10 10:43:21 89a1389 balena-supervisor[3973]: [info]    Applying target state
Jun 10 10:43:21 89a1389 balena-supervisor[3973]: [event]   Event: Docker image download {"image":{"name":"registry2.new-domain.local/v2/5cd9eb7b19e96f6658726f26fe30f14c@sha256:6878587e36cfd28bc337c2fe9a19eff1ef9d9ee823cf81d351910a8b70695738","appId":1,"appUuid":"1f5dce674dbb47f49f987a60365a885e","serviceId":1,"serviceName":"main","imageId":11,"releaseId":11,"commit":"c09a84612c324396c2cb981f7beaf57d"}}
Jun 10 10:43:22 89a1389 balena-supervisor[3973]: [error]   Device state report failure! Status code: 401 - message:
Jun 10 10:43:22 89a1389 balena-supervisor[3973]: [info]    Retrying current state report in 15 seconds
Jun 10 10:43:37 89a1389 balena-supervisor[3973]: [error]   Device state report failure! Status code: 401 - message:
Jun 10 10:43:37 89a1389 balena-supervisor[3973]: [info]    Retrying current state report in 30 seconds
Jun 10 10:44:08 89a1389 balena-supervisor[3973]: [error]   Device state report failure! Status code: 401 - message:
Jun 10 10:44:08 89a1389 balena-supervisor[3973]: [info]    Retrying current state report in 60 seconds
Jun 10 10:44:23 89a1389 balena-supervisor[3973]: [event]   Event: Image downloaded {"image":{"name":"registry2.new-domain.local/v2/5cd9eb7b19e96f6658726f26fe30f14c@sha256:6878587e36cfd28bc337c2fe9a19eff1ef9d9ee823cf81d351910a8b70695738","appId":1,"appUuid":"1f5dce674dbb47f49f987a60365a885e","serviceId":1,"serviceName":"main","imageId":11,"releaseId":11,"commit":"c09a84612c324396c2cb981f7beaf57d"}}
Jun 10 10:44:23 89a1389 balena-supervisor[3973]: [event]   Event: Take update locks {"appId":"1","force":false,"services":["main"]}
Jun 10 10:44:24 89a1389 balena-supervisor[3973]: [event]   Event: Service install {"service":{"appId":1,"serviceId":1,"serviceName":"main","commit":"c09a84612c324396c2cb981f7beaf57d","releaseId":11}}
Jun 10 10:44:24 89a1389 balena-supervisor[3973]: [error]   Scheduling another update attempt in 600000ms due to failure:  Error: Failed to apply state transition steps. (HTTP code 400) bad parameter - No command specified  Steps:["start"]
Jun 10 10:44:24 89a1389 balena-supervisor[3973]: [error]         at /usr/src/app/dist/app.js:10:12191
Jun 10 10:44:24 89a1389 balena-supervisor[3973]: [error]       at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Jun 10 10:44:24 89a1389 balena-supervisor[3973]: [error]   Device state apply error Error: Failed to apply state transition steps. (HTTP code 400) bad parameter - No command specified  Steps:["start"]
Jun 10 10:44:24 89a1389 balena-supervisor[3973]: [error]         at /usr/src/app/dist/app.js:10:12191
Jun 10 10:44:24 89a1389 balena-supervisor[3973]: [error]       at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

So I’m stuck again, not understanding how to get out of this. Did I do something wrong in the procedure?

The commit is correct c09a84612c324396c2cb981f7beaf57d (and matches the one in the registry), but the “main” service is wrong. On the working device, “node-red” appears, which is the correct service name. Why is it trying to start the wrong service?

ID COMMIT                           CREATED AT               STATUS  SEMVER IS FINAL
11 c09a84612c324396c2cb981f7beaf57d 2025-06-06T15:20:40.142Z success 0.0.0  true

Thanks