OpenBalena push to registry fails

I just did a fresh deployment with the latest docker builds and start getting a docker error while trying to push to the registry.

Pushing images to registry...
Retrying "registry.balena.domain.com/v2/c09053d4afa5eaf42f2ad58ac015d292:latest" after 2.00s (1 of 3) due to: Error: unauthorized: authentication required
Retrying "registry.balena.domain.com/v2/c09053d4afa5eaf42f2ad58ac015d292:latest" after 2.80s (2 of 3) due to: Error: unauthorized: authentication required
Retrying "registry.balena.domain.com/v2/c09053d4afa5eaf42f2ad58ac015d292:latest" after 3.92s (3 of 3) due to: Error: unauthorized: authentication required

Since everything seem to work with the v0.48.0 release of balena registry, i try to get my head around why this Error starts turning up.

I encountered it on MacOS X, Ubuntu and Debian with balena-cli versions 11.23 and 11.24.

This seems to be a bug with the current open-balean-registry version.
I downgraded to the following setup and it works like a charm.

I set the following versions in the config/activate file.

export OPENBALENA_API_VERSION_TAG=0.49.9
export OPENBALENA_REGISTRY_VERSION_TAG=2.13.1
export OPENBALENA_VPN_VERSION_TAG=9.10.0
export OPENBALENA_DB_VERSION_TAG=3.0.1
export OPENBALENA_S3_VERSION_TAG=2.9.0

Hi @Langhalsdino

We just want to confirm which version of open-balena-registry you’re using when encountering this error, is it v2.13.2? When you mention using v0.48.0 of the registry, are you referring to OPENBALENA_API_VERSION_TAG, which was set to 0.49.9 in the configuration that did work?

Kind regards
Alida

Sorry it was a little bit late when writing the post. I got confused with balena registry and balena api version.

I used the default installation with :latest tag at 1st Feb. 2020 and pushing to the registry failed.

I checked our currently running productive instance for its versions and it api version was v0.48.0 and registry version v2.12.0

Since upgrading to newer versions is mostly a good idea, i tried a couple of random configuration that are >v0.48.0 >2.12.0 and got the above mentioned configuration to work.

It is mostly up to date, therefore i feel confident upgrading our current productive instance to the above mentioned container versions.

I still could not figure out why the latest build produced the above mentioned error.

I am not sure either; I haven’t seen that error before in this use-case.

If you get it again, or find a way to reproduce it reliably then please open an issue here: https://github.com/balena-io/open-balena/issues

I have currently a thight schedule, but try to test it this week with a new url and a new server and open an issue accordingly.

I just wanted to put it here, in case some one else is encountering the same problem. Since it took me a while to figure out, that it was about the balena deployment and not anything else.

I just wanted to share that I had the same issue as this thread indicated with Error: unauthorized: authentication required reported during image push phase of command
balena deploy myApp --logs --source . --emulated

having just followed https://www.balena.io/open/docs/getting-started/ as of March 20 it seems the wrong version of registry is included. I saw that balena-registry version was 2.11.1 in default installation per the settings found in compose/versions of open-balena.

The fix for me was to wipe everything out, update the below file as such, and rebuild everything.

~/open-balena$ git diff compose/versions
diff --git a/compose/versions b/compose/versions
index fe971ac…8a6b2b7 100644
— a/compose/versions
+++ b/compose/versions
@@ -1,6 +1,12 @@
export OPENBALENA_API_VERSION_TAG=v0.19.5
export OPENBALENA_DB_VERSION_TAG=v2.0.3
export OPENBALENA_MDNS_PUBLISHER_VERSION_TAG=v1.6.2
-export OPENBALENA_REGISTRY_VERSION_TAG=v2.11.1
+export OPENBALENA_REGISTRY_VERSION_TAG=v2.13.5
export OPENBALENA_S3_VERSION_TAG=v2.8.5
export OPENBALENA_VPN_VERSION_TAG=v8.10.0

https://github.com/balena-io/open-balena/blob/master/compose/versions#L4 is the line i had to update.