OpenBalena device failing to register during provisioning

Hi all,

I’m having trouble getting devices to register with my open balena instance. I’ve searched through the logs and I can see the supervisor is failing with an empty error message:

event]   Event: Device bootstrap {}
[info]    New device detected. Provisioning...
[event]   Event: Device bootstrap failed, retrying {"delay":30000,"error":{"message":"","stack":"Error\n    at /usr/src/app/dist/app.js:22:766911\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)"}}

This is my config.json I used to configure the image before flashing, although it’s not relevant i’m using a Jetson. I have modified /etc/hosts/ for my openBalena hosts to be found (since i’m not on the open internet) and confirmed that it works with curl. Note that I also generated the API key which I set for apiKey using balena api-key generate myKey. I’ve changed some values for security reasons but I have tested them so far and they work. Please let me know if there’s something I’m doing wrong in the config below:

  "network": "wifi",
    "wifiSsid": "XXXXXXX",
    "wifiKey": "XXXXX",
    "appUpdatePollInterval": 10,
    "apiEndpoint": "https://api.openbalena.local",
    "dnsServers": "192.168.1.216 8.8.8.8",
    "balenaRootCA": "XXX...==",
    "developmentMode": "true",
    "apiKey": "06A9o6XXXXXXX.....9dT",
    "sshKeys": [
        "sh-rsa XXX...."
    ],
    "hostname": "device1",
    "deviceType": "jetson-xavier-nx-devkit-emmc",
    "deviceId": 1,
    "applicationName": "XXXX",
    "applicationId": 1
}

Here are my versions:

Here’s my /etc/os-release/ on the device:

ID="balena-os"
NAME="balenaOS"
VERSION="4.0.9+rev2"
VERSION_ID="4.0.9+rev2"
PRETTY_NAME="balenaOS 4.0.9+rev2"
DISTRO_CODENAME="kirkstone"
MACHINE="jetson-xavier-nx-devkit-emmc"
META_BALENA_VERSION="4.0.30"
BALENA_BOARD_REV="e91b715"
META_BALENA_REV="ff47baf2"
SLUG="jetson-xavier-nx-devkit-em

Compose versions (as I’m using docker to run my OpenBalena instance):

export OPENBALENA_API_VERSION_TAG=v0.209.2
export OPENBALENA_DB_VERSION_TAG=v5.1.2
export OPENBALENA_MDNS_PUBLISHER_VERSION_TAG=v1.9.2
export OPENBALENA_REGISTRY_VERSION_TAG=v2.25.3
export OPENBALENA_S3_VERSION_TAG=v2.13.10
export OPENBALENA_VPN_VERSION_TAG=v11.4.6

I resolved this issue by following the comment from this Github Issue:

Blockquote
I have been getting that nondescript error message while using a .local address for open-balena
The .local address itself resolves fine and can be curl’ed from both the host OS and the balena_supervisor.
This is on balena/open-balena-api:v0.209.2
Switching from .local to e.g. .lan and setting up a DNS server fixes the problem.
Are there plans to support .local in the balena_supervisor or is there simply something broken?

Improve logging when device bootstrap fails · Issue #1785 · balena-os/balena-supervisor (github.com)

My issue is my domains were ending in .local instead of .lan (which works according to Github above)