Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Windows Azure Powershell Deployment Error - "The remote server returned an unexpected response"

I'm following the latest February 2011 Azure Training Kit example.

I've successfully deployed using

New-Deployment -serviceName xxxxmytodo99 
                   -subscriptionId cxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx 
                   -certificate (get-item cert:\CurrentUser\MY\xxxxxxxxxxxx)
                   -slot staging 
                   -package MyTodo.cspkg
                   -configuration ServiceConfiguration.cscfg 
                   -label "v2.0" 
                   -storageServiceName xxxxmytodo99

Then running the next step -

Get-HostedService -serviceName xxxxmytodo99
                  -subscriptionId cxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx 
                  -certificate (get-item cert:\CurrentUser\MY\xxxxxxxxxxxx) 
    | Get-Deployment staging 
    | Set-Deployment -package MyTodo.cspkg 
                     -configuration ServiceConfiguration.cscfg 
                     -label "v2.1" 
    | Get-OperationStatus -WaitToComplete

Gives this error.

Set-Deployment : The remote server returned an unexpected response: (400) Bad Request.
At line:1 char:232
+ Get-HostedService -serviceName xxxxmytodo99 -subscriptionId cxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx  -certificate (get-item cert:\CurrentUser\MY\xxxxxxxxxxxx) | Get-Deployment staging | Set-Deployment <<<<  -package MyTodo.cspkg -configuration ServiceConfiguration.cscfg -label "v2.2" | Get-OperationStatus -WaitToComplete
    + CategoryInfo          : CloseError: (:) [Set-Deployment], ProtocolException
    + FullyQualifiedErrorId : Microsoft.Samples.AzureManagementTools.PowerShell.HostedServices.SetDeploymentCommand

Can anyone suggest where I'm going wrong?

Found this link detailing same issue that doesn't have a resolution.

like image 255
Paul Rowland Avatar asked Oct 12 '22 12:10

Paul Rowland


1 Answers

The example gives this information

Important: The Set-Deployment cmdlet assumes that the compute service and storage service names are the same. If this is not the case, specify an additional parameter -StorageServicename , replacing the placeholder with the name of the storage service name.

My storage service name does have the same name as the compute service, but adding that param made it work,

ie.

Get-HostedService -serviceName xxxxmytodo99 
                  -subscriptionId cxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx 
                  -certificate (get-item cert:\CurrentUser\MY\xxxxxxxxxxxx) 
        | Get-Deployment staging
        | Set-Deployment -package MyTodo.cspkg 
                         -configuration ServiceConfiguration.cscfg 
                         -storageServiceName xxxxmytodo99 
                         -label "v2.2" 
    | Get-OperationStatus -WaitToComplete  
like image 184
Paul Rowland Avatar answered Oct 20 '22 17:10

Paul Rowland