Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AZD UP - deployment fails with indexer - logging into container registry #161

Closed
dfberry opened this issue Dec 6, 2023 · 11 comments
Closed
Labels
bug Something isn't working infra Issues related to infrastructure

Comments

@dfberry
Copy link
Contributor

dfberry commented Dec 6, 2023

  1. Cloned today and ran in local Mac M1 using dev container.
  2. AZD auth login
  3. AZD up
node ➜ /workspaces/azure-search-openai-javascript (main) $ azd auth login
Logged in to Azure.
node ➜ /workspaces/azure-search-openai-javascript (main) $ azd up
? Enter a new environment name: dfberry-openai-js-fe
  (✓) Done: Downloading Bicep
? Select an Azure Subscription to use:  2. Visual Studio Enterprise Subscription (b57b253a-e19e-4a9c-a0c0-a5062910a749)
  (✓) Done: Retrieving locations...
? Select an Azure location to use: 43. (US) East US 2 (eastus2)
  (✓) Done: Retrieving locations...

Packaging services (azd package)

  (✓) Done: Packaging service indexer
  - Image Hash: sha256:dcf3d50340220618b4c1f2ace0ce3f41b22a00c1b1d9834f7f01b2dd43713ffc
  - Image Tag: azure-search-openai-javascript/indexer-dfberry-openai-js-fe:azd-deploy-1701880192

  (✓) Done: Packaging service search
  - Image Hash: sha256:e1920b71ca1b8d1aad054121ce151fbd7bcea26be0de9d532d74a10d0587c535
  - Image Tag: azure-search-openai-javascript/search-dfberry-openai-js-fe:azd-deploy-1701880234

  (✓) Done: Packaging service webapp
  - Package Output: dist

Provisioning Azure resources (azd provision)
Provisioning Azure resources can take some time.

Subscription: Visual Studio Enterprise Subscription (b57b253a-e19e-4a9c-a0c0-a5062910a749)
Location: East US 2

  You can view detailed progress in the Azure Portal:
  https://portal.azure.com/#view/HubsExtension/DeploymentDetailsBlade/~/overview/id/%2Fsubscriptions%2Fb57b253a-e19e-4a9c-a0c0-a5062910a749%2Fproviders%2FMicrosoft.Resources%2Fdeployments%2Fdfberry-openai-js-fe-1701880251

  (✓) Done: Resource group: rg-dfberry-openai-js-fe
  (✓) Done: Static Web App: webapp
  (✓) Done: Log Analytics workspace: log-oy2btmyot6cz6
  (✓) Done: Azure OpenAI: cog-oy2btmyot6cz6
  (✓) Done: Storage account: stoy2btmyot6cz6
  (✓) Done: Form recognizer: cog-fr-oy2btmyot6cz6
  (✓) Done: Container Registry: croy2btmyot6cz6
  (✓) Done: Container Apps Environment: cae-oy2btmyot6cz6
  (✓) Done: Search service: gptkb-oy2btmyot6cz6
  (✓) Done: Container App: search
  (✓) Done: Container App: indexer


Deploying services (azd deploy)

  (x) Failed: Deploying service indexer

ERROR: failed deploying service 'indexer': failing invoking action 'deploy', failed logging into container registry, token: failed getting ACR token: POST https://croy2btmyot6cz6.azurecr.io/oauth2/exchange
--------------------------------------------------------------------------------
RESPONSE 401: 401 Unauthorized
ERROR CODE UNAVAILABLE
--------------------------------------------------------------------------------
Response contained no body
--------------------------------------------------------------------------------
, admin: cannot find registry with name 'croy2btmyot6cz6' and subscriptionId 'b57b253a-e19e-4a9c-a0c0-a5062910a749'
TraceID: 238f12258908f145eaf425ae58809cb3
node ➜ /workspaces/azure-search-openai-javascript (main) $ 
@dfberry dfberry changed the title AZD UP - deployment failes with indexer - logging into container registry AZD UP - deployment fails with indexer - logging into container registry Dec 6, 2023
@mirojs
Copy link

mirojs commented Dec 8, 2023

Same issue here.

@sinedied
Copy link
Contributor

@dfberry I'm not sure what's causing the issue, but changing the region seems to fix it. We already experienced this and reported it in a different issue, I'll try to dig it up.

@sinedied
Copy link
Contributor

Other possible fix for this issue, see #168

Copy link

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this issue will be closed.

@github-actions github-actions bot added the Stale label Feb 12, 2024
@sinedied
Copy link
Contributor

@dfberry is this still an issue, or can we close this one?

@github-actions github-actions bot removed the Stale label Feb 14, 2024
@rockcs1992
Copy link

rockcs1992 commented Mar 19, 2024

I'm experiencing the same issue today with indexer failing to deploy. Followed the same steps as mentioned in the instruction, Here are the logs:

PS C:\Repos\AzureSearchOpenAiJavascript> azd up

Packaging services (azd package)

  (✓) Done: Packaging service indexer
  - Image Hash: sha256:900de7f61d55e5ed6769c80ef86fdbf34ac5ffbafa66f8acda93f03f30b0ce3a
  - Target Image: azure-search-openai-javascript/indexer-dev:azd-deploy-1710794501


  (✓) Done: Packaging service search
  - Image Hash: sha256:bbd08bd19d41071790ca4b38dcf71ee36de8f5dacb698cab75e627322dcb301c
  - Target Image: azure-search-openai-javascript/search-dev:azd-deploy-1710794503


  (✓) Done: Packaging service webapp
  - Package Output: dist

SUCCESS: Your application was packaged for Azure in 20 seconds.

Provisioning Azure resources (azd provision)
Provisioning Azure resources can take some time.

Subscription: PLAYGROUND - UXA Team (2d36ffe9-143f-4845-a80c-ecd7423d884c)
Location: East US

  You can view detailed progress in the Azure Portal:
  https://portal.azure.com/#view/HubsExtension/DeploymentDetailsBlade/~/overview/id/%2Fsubscriptions%2F2d36ffe9-143f-4845-a80c-ecd7423d884c%2Fproviders%2FMicrosoft.Resources%2Fdeployments%2Fdev-1710794526

  (✓) Done: Resource group: shiche-uxa
  (✓) Done: Static Web App: webapp
  (✓) Done: Log Analytics workspace: log-kygt6iabisslk
  (✓) Done: Azure OpenAI: cog-kygt6iabisslk
  (✓) Done: Storage account: stkygt6iabisslk
  (✓) Done: Application Insights: appi-kygt6iabisslk
  (✓) Done: Portal dashboard: dash-kygt6iabisslk
  (✓) Done: Container Registry: crkygt6iabisslk
  (✓) Done: Container Apps Environment: cae-kygt6iabisslk
  (✓) Done: Search service: gptkb-kygt6iabisslk
  (✓) Done: Container App: indexer
  (✓) Done: Container App: search

SUCCESS: Your application was provisioned in Azure in 10 minutes 13 seconds.
You can view the resources created under the resource group shiche-uxa in Azure Portal:
https://portal.azure.com/#@/resource/subscriptions/2d36ffe9-143f-4845-a80c-ecd7423d884c/resourceGroups/shiche-uxa/overview

Deploying services (azd deploy)

  (x) Failed: Deploying service indexer

ERROR: failed deploying service 'indexer': failing invoking action 'deploy', updating container app service: updating container app revision: begin updating ingress traffic: PATCH https://management.azure.com/subscriptions/2d36ffe9-143f-4845-a80c-ecd7423d884c/resourceGroups/shiche-uxa/providers/Microsoft.App/containerApps/indexer
--------------------------------------------------------------------------------
RESPONSE 400: 400 Bad Request
ERROR CODE: InvalidParameterValueInContainerTemplate
--------------------------------------------------------------------------------
{
  "error": {
    "code": "InvalidParameterValueInContainerTemplate",
    "message": "The following field(s) are either invalid or missing. Field 'template.containers.main.image' is invalid with details: 'Invalid value: \"crkygt6iabisslk.azurecr.io/azure-search-openai-javascript/indexer-dev:azd-deploy-1710794501\": GET https:?scope=repository%3Aazure-search-openai-javascript%2Findexer-dev%3Apull&service=crkygt6iabisslk.azurecr.io: UNAUTHORIZED: authentication required, visit https://aka.ms/acr/authorization for more information.';."
  }
}
--------------------------------------------------------------------------------

TraceID: a1ac1b21523c014ce35bf6d23dafeabd

ERROR: error executing step command 'deploy --all': failed deploying service 'indexer': failing invoking action 'deploy', updating container app service: updating container app revision: begin updating ingress traffic: PATCH https://management.azure.com/subscriptions/2d36ffe9-143f-4845-a80c-ecd7423d884c/resourceGroups/shiche-uxa/providers/Microsoft.App/containerApps/indexer
--------------------------------------------------------------------------------
RESPONSE 400: 400 Bad Request
ERROR CODE: InvalidParameterValueInContainerTemplate
--------------------------------------------------------------------------------
{
  "error": {
    "code": "InvalidParameterValueInContainerTemplate",
    "message": "The following field(s) are either invalid or missing. Field 'template.containers.main.image' is invalid with details: 'Invalid value: \"crkygt6iabisslk.azurecr.io/azure-search-openai-javascript/indexer-dev:azd-deploy-1710794501\": GET https:?scope=repository%3Aazure-search-openai-javascript%2Findexer-dev%3Apull&service=crkygt6iabisslk.azurecr.io: UNAUTHORIZED: authentication required, visit https://aka.ms/acr/authorization for more information.';."
  }
}
--------------------------------------------------------------------------------

TraceID: a1ac1b21523c014ce35bf6d23dafeabd

@rockcs1992
Copy link

rockcs1992 commented Mar 19, 2024

FYI @sinedied I just tried again with EAST US 2 region and a new resource group. Got the same error. TraceID this time:
9b5afe89538566b10f61ddafb67ade71, if it helps debugging

@zaccariafra
Copy link

I am facing the same issue as @rockcs1992. I opened the issue #194 because i thought it was slightly different but I guess it's the same

@sinedied
Copy link
Contributor

It seems that the latest infra update has caused an issue with the registry authentication. I'll have a look, thanks for the reporting.

@sinedied sinedied added bug Something isn't working infra Issues related to infrastructure labels Mar 21, 2024
sinedied added a commit that referenced this issue Mar 21, 2024
@sinedied
Copy link
Contributor

Fix is under review: #195

Should be merged quickly, thanks for your patience.

@zaccariafra
Copy link

Thanks @sinedied!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working infra Issues related to infrastructure
Projects
None yet
Development

No branches or pull requests

5 participants