Closed marcoparenzan closed 5 years ago
Did you provide registry credentials for the images? See an example here: https://github.com/Azure-Samples/service-fabric-mesh/blob/fd86665d5cf9fbf783e034e166e61ef8dfec5999/templates/helloworld/mesh_rp.private_registry.linux.json#L70
Yes, added. Comparing with your template, in the imageName ("image": "marcoparenzandemos.azurecr.io/webotronicwebapp:20180914143730") there is no registry name. And then I have a more detailed message:
Reason Code package 'WebOTronicWebApp' has invalid image name: image 'webotronicwebapp:20180914143730' is not on server 'marcoparenzandemos.azurecr.io'
If you want I can send you credentials and template in private email.
If you run a docker pull marcoparenzandemos.azurecr.io/webotronicwebapp:20180914143730
command from any workstation - what's the output?
20180914143730: Pulling from webotronicwebapp Digest: sha256:bd9038602f0df9bc5e33742c99f88dae9302cd2affe5ec24e358a999b4b2fe4b Status: Image is up to date for marcoparenzandemos.azurecr.io/webotronicwebapp:20180914143730
Ok - and can you confirm the image is in the registry? E.g. https://docs.microsoft.com/en-us/cli/azure/acr/repository?view=azure-cli-latest#az-acr-repository-list
C:\Users\marco>az acr repository list -n marcoparenzandemos [ "webotronicwebapp" ]
C:\Users\marco>az acr repository show --repository webotronicwebapp --name marcoparenzandemos { "changeableAttributes": { "deleteEnabled": true, "listEnabled": true, "readEnabled": true, "writeEnabled": true }, "createdTime": "2018-09-14T12:43:14.0984269Z", "imageName": "webotronicwebapp", "lastUpdateTime": "2018-09-14T12:43:14.1904075Z", "manifestCount": 1, "registry": "marcoparenzandemos.azurecr.io", "tagCount": 1 }
"codePackages": [ { "name": "WebOTronicWebApp", "image": "webotronicwebapp:20180914143730", "endpoints": [ { "name": "WebOTronicWebAppListener", "port": 5001 } ], "environmentVariables": [ { "name": "ASPNETCORE_URLS", "value": "https://+:5001" } ], "resources": { "requests": { "cpu": 1, "memoryInGB": 1 } }, "imageRegistryCredential": { "server": "marcoparenzandemos.azurecr.io", "username": "marcoparenzandemos", "password": "password" } } ],
I see no obvious reason why the docker daemon in Mesh cannot find the image in your registry. Can you provide the resourceID of the app and the region you deployed to? @mattrowmsft to help look at service side traces.
The mesh resource is not created. I can send you privately tto your email the script and the credentials to publish from my image registry
east us
Ok - please do that: mikhegn@microsoft.com
We have the same issue, did you figured out what the problem is?
I also tried the docs I get the same error following these steps: https://docs.microsoft.com/en-us/azure/service-fabric-mesh/service-fabric-mesh-howto-deploy-app-private-registry
Not sure what is happening here but if I prefix the "image" property with registry server it starts working again. The docs seems to have been updated with a new sample as well that includes the registry server in the image name.
If you are using a register server besides dockerhub, then you have to specify it as part of the image name. It sounds like our docs were missing this and causing the confusion. It sounds like this can be closed now.
I'm not sure this can be closed yet @mattrowmsft @MikkelHegn
I’ve got a sample app which used to deploy perfectly (early September), but now fails with the following message: “Request is invalid. Reason Code package ‘FrontEnd’ has invalid image name: image ‘teamassembler-frontend:v1’ is not on server ‘amolenk.azurecr.io’..”
The image is definitely in the registry (no error when I pull it manually) and I also pass the name and credentials in the template:
"name": "FrontEnd",
"image": "teamassembler-frontend:v1",
"imageRegistryCredential": {
"server": "[parameters('registry-server')]",
"username": "[parameters('registry-username')]",
"password": "[parameters('registry-password')]"
}
I’m trying to deploy to West Europe. Full error message:
Deploying . . .
Deployment failed
deployment correlation ID: 3adc3df5-92b4-443a-b118-7b99193afae4
There was an error when getting application resource TeamAssemblerApp.
To recieve additional information run the following to get the status of the application deployment.
az mesh app show --resource-group TeamAssembler --name TeamAssemblerApp
Deployment Errors:
{
"code": "BadRequestWithReason",
"details": [
{
"code": "BadRequestWithReason",
"message": "Request is invalid. Reason Code package 'FrontEnd' has invalid image name: image 'teamassembler-frontend:v1' is not on server 'amolenk.azurecr.io'.."
},
{
"code": "BadRequestWithReason",
"message": "Request is invalid. Reason Code package 'SuperheroService' has invalid image name: image 'teamassembler-superheroservice:v1' is not on server 'amolenk.azurecr.io'.."
},
{
"code": "BadRequestWithReason",
"message": "Request is invalid. Reason Code package 'TeamService' has invalid image name: image 'teamassembler-teamservice:v1' is not on server 'amolenk.azurecr.io'.."
}
],
"message": "Request is invalid. Reason One or more code packages reference an erroneous container image."
}
Marco and I did some troubleshooting offline. In his case it was the image reference.
For you sample @amolenk, the image element has to be:
"image": "amolenk.azurecr.io/teamassembler-frontend:v1"
Looking at the doc referenced above, this portion describes the use of the container registry name:
frontEndImage | The container image for the front end service. For example, ".azurecr.io/seabreeze/azure-mesh-todo-webfrontend:1.0-nanoserver-1709". |
---|
@amolenk: let me know if using the registry service url as part of the image reference does not solve your issue.
Doh! Yeah, that's it.
I'm wondering though why this is now necessary. Isn't it redundant to have the registry server both as part of the image name and in the imageRegistryCredential/server
element?
You could argue that, but it follows how the docker api's work today. If you have no registry defined as part of the repository, the docker daemon will default to the default registry setting in the docker daemon.
I'm trying to deploy a mesh application. After looking into other issues here, trying multiple ways to deploy, this is the current error message I cannot solve, trying to launch deployment from command line.
Command: az mesh deployment create --resource-group webotronic --template-file template.json --parameters "{'location': {'value': 'eastus'}, 'registryPassword': {'value': 'password'}}"
error: Request is invalid. Reason Code package 'WebOTronicWebApp' has invalid image name: image 'webotronicwebapp:20180914143730' is not on server 'marcoparenzandemos.azurecr.io'.
Obviously the image is in my registry. This is the snippet of the template where image name is writter, after removing registry name from "image" value
If I leave the registry name,
"codePackages": [ { "name": "WebOTronicWebApp", "image": "marcoparenzandemos.azurecr.io/webotronicwebapp:20180914143730",
I receive the message I have already seen in other issues:
The resource operation completed with terminal provisioning state 'Failed'. {'code': 'NotFound', 'message': 'Resource {0} not found.', 'details': []}
I'm not manipulating registry: I'm launcing publishing from VS2017, so all these informations comes from VS17 extension.
What can I check now?
Thanks in advance.
Marco Parenzan