Rp and Azure Docker registry


(Fernando Hackbart) #1

After publishing successfully a container image to tha Azure Docker registry I am trying to generate Kubernetes artifacts without sucess, the same operation works with a non-authenticated Docker registry image in fact I use registry chart.

The error I get is:

rp generate-kubernetes-resources --generate-services "${REGISTRY_ORIGEM}${CONTAINER_NAME}:${CONTAINER_VERSION}"
[error, com.lightbend.rp.reactivecli.Main$] Failed to obtain Docker config for containerresgistry.azurecr.io/main/main-frontend:0.0.4-SNAPSHOT, -1: no response from https://containerresgistry.azurecr.io/v2/main/main-frontend/tags/list?n=1
fernando.hackbart@fehackbart:~/.lightbend> cat ~/.lightbend/docker.credentials 
registry = containerresgistry.azurecr.io
username = ***********************
password = **********************

Also trying with explicit username and password fails

fernando.hackbart@fehackbart:~/.lightbend> rp generate-kubernetes-resources --stacktrace --registry-username ${REGISTRY_USERNAME} --registry-password ${REGISTRY_PASSWORD} --generate-services "${REGISTRY_ORIGEM}${CONTAINER_NAME}:${CONTAINER_VERSION}"
com.lightbend.rp.reactivecli.http.NativeHttp$InternalNativeFailure: -1: no response from https://containerresgistry.azurecr.io/v2/main/main-frontend/tags/list?n=1
        at java.lang.Throwable.fillInStackTrace(Unknown Source)
        at java.lang.Throwable.init(Unknown Source)
        at java.lang.Exception.init(Unknown Source)
        at java.lang.RuntimeException.init(Unknown Source)
        at java.lang.RuntimeException.init(Unknown Source)
        at com.lightbend.rp.reactivecli.http.NativeHttp$InternalNativeFailure.init(Unknown Source)
        at com.lightbend.rp.reactivecli.http.NativeHttp$$anonfun$doHttp$1.apply(Unknown Source)
        at com.lightbend.rp.reactivecli.http.NativeHttp$$anonfun$doHttp$1.apply(Unknown Source)
        at scala.scalanative.native.Zone$.apply(Unknown Source)
        at com.lightbend.rp.reactivecli.http.NativeHttp$.doHttp(Unknown Source)
        at com.lightbend.rp.reactivecli.http.NativeHttp$.apply(Unknown Source)
        at com.lightbend.rp.reactivecli.Platform$.httpRequest(Unknown Source)
        at com.lightbend.rp.reactivecli.http.Http$.com$lightbend$rp$reactivecli$http$Http$$doRequest(Unknown Source)
        at com.lightbend.rp.reactivecli.http.Http$.apply(Unknown Source)
        at com.lightbend.rp.reactivecli.http.Http$$anonfun$http$1.apply(Unknown Source)
        at com.lightbend.rp.reactivecli.http.Http$$anonfun$http$1.apply(Unknown Source)
        at com.lightbend.rp.reactivecli.docker.DockerRegistry$.com$lightbend$rp$reactivecli$docker$DockerRegistry$$getWithToken(Unknown Source)
        at com.lightbend.rp.reactivecli.docker.DockerRegistry$.com$lightbend$rp$reactivecli$docker$DockerRegistry$$checkRepositoryValid(Unknown Source)
        at com.lightbend.rp.reactivecli.docker.DockerRegistry$$anonfun$getConfig$2.apply(Unknown Source)
        at com.lightbend.rp.reactivecli.docker.DockerRegistry$$anonfun$getConfig$2.apply(Unknown Source)
        at scala.concurrent.Future$$anonfun$flatMap$1.apply(Unknown Source)
        at scala.concurrent.Future$$anonfun$flatMap$1.apply(Unknown Source)
        at scala.concurrent.impl.CallbackRunnable.run(Unknown Source)
        at com.lightbend.rp.reactivecli.Platform$$anon$1.execute(Unknown Source)
        at scala.concurrent.impl.CallbackRunnable.executeWithValue(Unknown Source)
        at scala.concurrent.impl.Promise$DefaultPromise.scala$concurrent$impl$Promise$DefaultPromise$$dispatchOrAddCallback(Unknown Source)
        at scala.concurrent.impl.Promise$DefaultPromise.onComplete(Unknown Source)
        at scala.concurrent.Future$class$.flatMap(Unknown Source)
        at scala.concurrent.impl.Promise$DefaultPromise.flatMap(Unknown Source)
        at com.lightbend.rp.reactivecli.docker.DockerRegistry$.getConfig(Unknown Source)
        at com.lightbend.rp.reactivecli.Main$$anonfun$run$1$$anonfun$apply$1$$anonfun$com$lightbend$rp$reactivecli$Main$$anonfun$$anonfun$$getDockerRegistryConfig$1$1.apply(Unknown Source)
        at com.lightbend.rp.reactivecli.Main$$anonfun$run$1$$anonfun$apply$1$$anonfun$com$lightbend$rp$reactivecli$Main$$anonfun$$anonfun$$getDockerRegistryConfig$1$1.apply(Unknown Source)
        at scala.concurrent.Future$$anonfun$flatMap$1.apply(Unknown Source)
        at scala.concurrent.Future$$anonfun$flatMap$1.apply(Unknown Source)
        at scala.concurrent.impl.CallbackRunnable.run(Unknown Source)
        at com.lightbend.rp.reactivecli.Platform$$anon$1.execute(Unknown Source)
        at scala.concurrent.impl.CallbackRunnable.executeWithValue(Unknown Source)
        at scala.concurrent.impl.Promise$DefaultPromise.scala$concurrent$impl$Promise$DefaultPromise$$dispatchOrAddCallback(Unknown Source)
        at scala.concurrent.impl.Promise$DefaultPromise.onComplete(Unknown Source)
        at scala.concurrent.Future$class$.flatMap(Unknown Source)
        at scala.concurrent.impl.Promise$DefaultPromise.flatMap(Unknown Source)
        at com.lightbend.rp.reactivecli.Main$$anonfun$run$1$$anonfun$apply$1.com$lightbend$rp$reactivecli$Main$$anonfun$$anonfun$$getDockerRegistryConfig$1(Unknown Source)
        at com.lightbend.rp.reactivecli.Main$$anonfun$run$1$$anonfun$apply$1$$anonfun$com$lightbend$rp$reactivecli$Main$$anonfun$$anonfun$$getDockerConfig$1$1$$anonfun$apply$9$$anonfun$apply$10$$anonfun$apply$12.apply(Unknown Source)
        at com.lightbend.rp.reactivecli.Main$$anonfun$run$1$$anonfun$apply$1$$anonfun$com$lightbend$rp$reactivecli$Main$$anonfun$$anonfun$$getDockerConfig$1$1$$anonfun$apply$9$$anonfun$apply$10$$anonfun$apply$12.apply(Unknown Source)
        at scala.Option.getOrElse(Unknown Source)
        at com.lightbend.rp.reactivecli.Main$$anonfun$run$1$$anonfun$apply$1$$anonfun$com$lightbend$rp$reactivecli$Main$$anonfun$$anonfun$$getDockerConfig$1$1$$anonfun$apply$9$$anonfun$apply$10.apply(Unknown Source)
        at com.lightbend.rp.reactivecli.Main$$anonfun$run$1$$anonfun$apply$1$$anonfun$com$lightbend$rp$reactivecli$Main$$anonfun$$anonfun$$getDockerConfig$1$1$$anonfun$apply$9$$anonfun$apply$10.apply(Unknown Source)
        at scala.concurrent.Future$$anonfun$flatMap$1.apply(Unknown Source)
        at scala.concurrent.Future$$anonfun$flatMap$1.apply(Unknown Source)
        at scala.concurrent.impl.CallbackRunnable.run(Unknown Source)
        at com.lightbend.rp.reactivecli.Platform$$anon$1.execute(Unknown Source)
        at scala.concurrent.impl.CallbackRunnable.executeWithValue(Unknown Source)
        at scala.concurrent.impl.Promise$DefaultPromise.scala$concurrent$impl$Promise$DefaultPromise$$dispatchOrAddCallback(Unknown Source)
        at scala.concurrent.impl.Promise$DefaultPromise.onComplete(Unknown Source)
        at scala.concurrent.Future$class$.flatMap(Unknown Source)
        at scala.concurrent.impl.Promise$DefaultPromise.flatMap(Unknown Source)
        at com.lightbend.rp.reactivecli.Main$$anonfun$run$1$$anonfun$apply$1$$anonfun$com$lightbend$rp$reactivecli$Main$$anonfun$$anonfun$$getDockerConfig$1$1$$anonfun$apply$9.apply(Unknown Source)
        at com.lightbend.rp.reactivecli.Main$$anonfun$run$1$$anonfun$apply$1$$anonfun$com$lightbend$rp$reactivecli$Main$$anonfun$$anonfun$$getDockerConfig$1$1$$anonfun$apply$9.apply(Unknown Source)
        at scala.Option.getOrElse(Unknown Source)
        at com.lightbend.rp.reactivecli.Main$$anonfun$run$1$$anonfun$apply$1$$anonfun$com$lightbend$rp$reactivecli$Main$$anonfun$$anonfun$$getDockerConfig$1$1.apply(Unknown Source)
        at com.lightbend.rp.reactivecli.Main$$anonfun$run$1$$anonfun$apply$1$$anonfun$com$lightbend$rp$reactivecli$Main$$anonfun$$anonfun$$getDockerConfig$1$1.apply(Unknown Source)
        at scala.concurrent.Future$$anonfun$flatMap$1.apply(Unknown Source)
        at scala.concurrent.Future$$anonfun$flatMap$1.apply(Unknown Source)
        at scala.concurrent.impl.CallbackRunnable.run(Unknown Source)
        at com.lightbend.rp.reactivecli.Platform$$anon$1.execute(Unknown Source)
        at scala.concurrent.impl.CallbackRunnable.executeWithValue(Unknown Source)
        at scala.concurrent.impl.Promise$KeptPromise.onComplete(Unknown Source)
        at scala.concurrent.Future$class$.flatMap(Unknown Source)
        at scala.concurrent.impl.Promise$KeptPromise.flatMap(Unknown Source)
        at com.lightbend.rp.reactivecli.Main$$anonfun$run$1$$anonfun$apply$1.com$lightbend$rp$reactivecli$Main$$anonfun$$anonfun$$getDockerConfig$1(Unknown Source)
        at com.lightbend.rp.reactivecli.Main$$anonfun$run$1$$anonfun$apply$1$$anonfun$applyOrElse$2.apply(Unknown Source)
        at com.lightbend.rp.reactivecli.Main$$anonfun$run$1$$anonfun$apply$1$$anonfun$applyOrElse$2.apply(Unknown Source)
        at scala.collection.TraversableLike$$anonfun$map$1.apply(Unknown Source)
        at scala.collection.TraversableLike$$anonfun$map$1.apply(Unknown Source)
        at scala.collection.immutable.List.foreach(Unknown Source)
        at scala.collection.TraversableLike$class$.map(Unknown Source)
        at scala.collection.immutable.List.map(Unknown Source)
        at com.lightbend.rp.reactivecli.Main$$anonfun$run$1$$anonfun$apply$1.applyOrElse(Unknown Source)
        at com.lightbend.rp.reactivecli.Main$$anonfun$run$1$$anonfun$apply$1.applyOrElse(Unknown Source)
        at scala.PartialFunction$Lifted.apply(Unknown Source)
        at scala.PartialFunction$Lifted.apply(Unknown Source)
        at scala.Option.collect(Unknown Source)
        at com.lightbend.rp.reactivecli.Main$$anonfun$run$1.apply(Unknown Source)
        at com.lightbend.rp.reactivecli.Main$$anonfun$run$1.apply(Unknown Source)
        at scala.Option.foreach(Unknown Source)
        at com.lightbend.rp.reactivecli.Main$.run(Unknown Source)
        at com.lightbend.rp.reactivecli.Main$.main(Unknown Source)
        at <none>.main(Unknown Source)
        at <none>.__libc_start_main(Unknown Source)
[error, com.lightbend.rp.reactivecli.Main$] Failed to obtain Docker config for containerresgistry.azurecr.io/main/main-frontend:0.0.4-SNAPSHOT, -1: no response from https://containerresgistry.azurecr.io/v2/main/main-frontend/tags/list?n=1

Might be the authentication scheme for Azure that is not supported by rp?

I can successfully push the images using docker push after I execute sbt docker:publishLocal

Maybe someone already saw that issue?

Thanks.

Fernando Hackbart