question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Key Vault] Using Key Vault quickly after create fails

See original GitHub issue

Description

When creating a Key Vault using az keyvault create with a randomly selected DNS entry, then subsequently running az keyvault certificate create it will often fail stating: Max retries exceeded attempting to connect to vault. The vault may not exist or you may need to flush your DNS cache and try again later.

The error only happens for a short time following initial creation. This causes scripts which create Key Vaults to be rather unstable.

I would expect that Key Vault create would only successfully complete after it is able to reach the newly created Key Vault instance.


Environment summary

Install Method: How did you install the CLI? (e.g. pip, interactive script, apt-get, Docker, MSI, nightly)
Answer here: source

CLI Version: What version of the CLI and modules are installed? (Use az --version)
Answer here: azure-cli (2.0.6+dev)

OS Version: What OS and version are you using?
Answer here: OS X

Shell Type: What shell are you using? (e.g. bash, cmd.exe, Bash on Windows)
Answer here: bash

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
schaabscommented, May 30, 2018

There is a fix available for this. Currently it is in our preview command module, available as an Azure CLI Extension. To install the preview run the command:

az extension add -n keyvault-preview

In this preview extension the ‘az keyvault create’ command has been updated to a long running command. It will now block until the DNS entries have propagated. Please try it out and verify that it fixes the problem you’re encountering.

More information on the keyvault-preview extension can be found here https://github.com/azure/azure-keyvault-cli-extension/.

1reaction
mcwienczekcommented, Feb 20, 2018

Thanks @kamoljan, I ended up doing sleep 10 to wait for vault to get up 😉

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting Azure key vault access policy issues
Recommended troubleshooting Steps for following error types​​ Check if you have delete access permission to key vault: See Assign an access ...
Read more >
Azure Key Vault Quickstart fails to provide key vault client
I have created a vault in the portal, assigned an access policy for a user account.
Read more >
Using Azure Key Vault KMS for Boundary - HashiCorp Discuss
Get boundary to generate the recovery , root and worker keys in Azure Key Vault. When I try to start boundary, however, it...
Read more >
Troubleshoot key vault access issues - Databricks
Load the Azure Portal. · Open Key vaults. · Click the key vault. · Click Access policies. · Verify the Get and List...
Read more >
B Troubleshooting Oracle Key Vault
Errors After Upgrading Oracle Key Vault · Error: Failed to Open Wallet ... The Key Vault log files capture all the error messages...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found