I getting a really strange error when I trying to deploy to Azure web app.
I am using a standard step
I have configure the account in “Accounts” under “Infrastructure”, also I tested and got success.
There error msg:
09:55:49 Verbose | Authenticating with Service Principal
09:56:03 Verbose | Account : zzzzzzzzzzzzzzzzzz
09:56:03 Verbose | SubscriptionName : rrrrrrrrrrrrrrrrrrrr
09:56:03 Verbose | SubscriptionId : ttttttttttttttttttttttttttttttttt
09:56:03 Verbose | TenantId : yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
09:56:03 Verbose | Environment : AzureCloud
09:56:05 Verbose | Azure CLI: Authenticating with Service Principal
09:56:06 Error | ERROR: Please supply tenant using “–tenant”
09:56:06 Error | The filename, directory name, or volume label syntax is incorrect.
09:56:06 Verbose | Azure CLI: Setting active subscription to ttttttttttttttttttttttttttttttttt
09:56:07 Error | ERROR: The subscription of ‘ttttttttttttttttttttttttttttttttt’ doesn’t exist in cloud ‘AzureCloud’.
Hi Juan,
Thanks for reaching out! Sorry to hear you’re getting this error.
If you’re currently blocked by this error you can disable the Azure CLI by setting a Project VariableOctopusUseBundledAzureCLI with a value of false. This will avoid the Azure CLI login step.
To help track down the cause of this error I need to get a little more information from you. Are you using a non-default Azure Clouds (China, Germany, US Gov)? We have seen this error when the Azure subscription was on a different Azure Cloud and wasn’t found on the default AzureCloud.
On the server or worker where this step is running, is there another installation of Azure CLI or Azure PowerShell? If so try turning it off using the bundled Azure PS or uninstall the additional PowerShell modules.
Also running the deployment with OctopusPrintVariables set to true will allow then to confirm that values for the Azure Account variables look correct.
I manage to deploy to the Azure account, please dont ask me how, but suddenly it works.
The Azure App Service is not in a non-default Cloud, is in Europe.
I tried to add the OctopusUseBundledAzureCLI to false but I still have this problem.
When running a simple PS script, for example:
Remove-AzureRMWebAppSlot -Name $AzureAppService -Slot slot -ResourceGroupName $AzureResourceGroupName -Force
I am getting the error:
13:01:22 Verbose | Authenticating with Service Principal
13:01:23 Verbose | Account : xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
13:01:23 Verbose | SubscriptionName : Company name
13:01:23 Verbose | SubscriptionId :vvvvvvvvvvvvvvvvvvvvvvvvvvvvv
13:01:23 Verbose | TenantId : rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
13:01:23 Verbose | Environment : AzureCloud
13:01:26 Verbose | Azure CLI: Authenticating with Service Principal
13:01:27 Error | ERROR: Please supply tenant using “–tenant”
13:01:27 Error | The filename, directory name, or volume label syntax is incorrect.
13:01:27 Verbose | Azure CLI: Setting active subscription to vvvvvvvvvvvvvvvvvvvvvvvvvvv
13:01:28 Error | ERROR: The subscription of ‘vvvvvvvvvvvvvvvvvv’ doesn’t exist in cloud ‘AzureCloud’.
13:01:28 Verbose | Successfully authenticated with the Azure CLI
13:01:28 Verbose | Invoking target script “F:\Octopus\Work\20190920110120-87778-1107\Script.ps1” with parameters
13:01:44 Verbose | Process C:\Windows\system32\WindowsPowershell\v1.0\PowerShell.exe in F:\Octopus\Work\20190920110120-87778-1107 exited with code 1
Hi Juan,
Thanks for the followup. Sorry to hear that this is still failing.
Can you send over more detail on what’s installed on the VM that the step is failing to run (i.e., another installation of Azure CLI or Azure PowerShell)?
Were you able to run the process with OctopusPrintVariables set to true? If so, can you send over theraw task log for the failed deployment?
I’ve set this discussion to private, so any personal information you send through will be secure.