When trying to do the first deploy to our openbalena instance, I get the following error:
$ balena deploy myapp --registry-secrets ../registry-secrets.yml
[Info] Everything is up to date (use --build to force a rebuild)
[Info] Creating release...
[Info] Pushing images to registry...
Retrying "registry.balena.${domain}/v2/a0bd40c79a2756d16cd89b7b80959903:latest" after 2.00s (1 of 3) due to: Error: unauthorized: authentication required
We require the registry secrets due to private CRs being used to pull pre-built packages.
I have an authed session:
$ balena apps
ID APP NAME SLUG DEVICE TYPE ONLINE DEVICES DEVICE COUNT
1 provisioning provisioning jetson-nano 1 1
2 myapp myapp jetson-nano 0 0
$ balena devices
ID UUID DEVICE NAME DEVICE TYPE APPLICATION NAME STATUS IS ONLINE SUPERVISOR VERSION OS VERSION
1 2027e82 still-bird jetson-nano provisioning Idle true 11.14.0 balenaOS 2.56.0+rev1
On this same topic, is it possible to not utilise the CR within balena and use external ones?
Annoyingly, I now get the error on the remote device:
Nov 18 04:27:54 9e9e126 balenad[2986]: time="2020-11-18T04:27:54.278028119Z" level=error msg="Handler for POST /images/create returned error: Get https://registry.balena.${domain}/v2/: x509: certificate signed by unknown authority"
Nov 18 04:27:54 9e9e126 balenad[2986]: time="2020-11-18T04:27:54.280341504Z" level=warning msg="Error getting v2 registry: Get https://registry.balena.${domain}/v2/: x509: certificate signed by unknown authority"
Nov 18 04:27:54 9e9e126 balenad[2986]: time="2020-11-18T04:27:54.280435098Z" level=info msg="Attempting next endpoint for pull after error: Get https://registry.balena.${domain}/v2/: x509: certificate signed by unknown authority"
Nov 18 04:27:54 9e9e126 balenad[2986]: time="2020-11-18T04:27:54.280582025Z" level=error msg="Handler for POST /images/create returned error: Get https://registry.balena.${domain}/v2/: x509: certificate signed by unknown authority"
I rebuilt the image via balena os configure balena-cloud-jetson-nano-2.56.0+rev1-dev-v11.14.0.img
Does this not set up the required SSL certs on the device image?
Hey, the balena os configure balena-cloud-jetson-nano-2.56.0+rev1-dev-v11.14.0.img should indeed set up the certs but it does need the NODE_EXTRA_CA_CERTS environment variable set at the time, either via persisting it in your environment or adding it just for the command at the time of running, eg NODE_EXTRA_CA_CERTS=... balena os configure balena-cloud-jetson-nano-2.56.0+rev1-dev-v11.14.0.img
Thanks for the reply - I did ssh into the device and started poking around… I did see the ca cert listed in config.json - base64 encoded. I ran it via base64 -d - and it did indeed match the cert present on my laptop which allows me to use balena login etc - so that cert does seem to be ok…
This leaves the question as to why with the same cert present, the actual device fails to recognise this cert.
Ah, sorry I didn’t spot you were using v2.56.0, could you try v2.58.0 or higher please - that version ensures the extra root CA is respected system wide and should solve your issue
I’m just trying to find version 2.60.1-rev1 or higher for this unit - I originally downloaded it, but now it seems that only v2.56.0-rev1 is available via the download links.
Have I just forgotten how I downloaded this 2.60.1 image? or has something been rolled back?
So if I understand this right, it is fine to flash a new device with OS version 2.60.1. Feel free to use it. We saw the problem happening only on host OS updates.