Closed hveiras closed 9 years ago
After merging into master, I am seeing this error:
Adding the [Microsoft.ServiceBus.dll] assembly to the script...
The [Microsoft.ServiceBus.dll] assembly has been successfully added to the script.
Method invocation failed because [Microsoft.ServiceBus.NamespaceManager] does not contain a method named 'GetEventHub'.
At C:\dev\iot-journey\setup\Setup.Arm\Scripts\LongTermStorage\StreamAnalytics\Deploy.ps1:57 char:2
+ $EventHubDescription = $NamespaceManager.GetEventHub($EventHubNam ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : MethodNotFound
You cannot call a method on a null-valued expression.
At C:\dev\iot-journey\setup\Setup.Arm\Scripts\LongTermStorage\StreamAnalytics\Deploy.ps1:65 char:2
+ $EventHubDescription.Authorization.Add($AccessRule)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
Method invocation failed because [Microsoft.ServiceBus.NamespaceManager] does not contain a method named 'UpdateEventHub'.
At C:\dev\iot-journey\setup\Setup.Arm\Scripts\LongTermStorage\StreamAnalytics\Deploy.ps1:67 char:2
+ $NamespaceManager.UpdateEventHub($EventHubDescription)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : MethodNotFound
Is this related to #310? or perhaps because of the upgraded NuGet package?
It is related to #310
When I run it, it is not adding the authorization rule as expected.
It seems like the root problem is L62
$EventHubDescription = $NamespaceManager.GetEventHub($EventHubName)
Or is that NamespaceManager
isn't really the instance that we think it is? :worried:
I prefer not to merge this until we resolve #310. What are your thoughts?
@bennage yes, I agree let's figure it out what is happening first.
@bennage #310 is fixed
I'm getting a new error:
Exception calling "GetEventHub" with "1" argument(s): "The remote server returned an error: (401) Unauthorized. Manage claim is required for this operation.
TrackingId:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx_xx,TimeStamp:9/10/2015 5:24:49 PM"
At C:\dev\iot-journey\setup\Setup.Arm\Scripts\LongTermStorage\AzureStreamAnalytics\Deploy.ps1:60 char:5
+ $EventHubDescription = $NamespaceManager.GetEventHub($EventHubNam ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : UnauthorizedAccessException
You cannot call a method on a null-valued expression.
At C:\dev\iot-journey\setup\Setup.Arm\Scripts\LongTermStorage\AzureStreamAnalytics\Deploy.ps1:68 char:5
+ $EventHubDescription.Authorization.Add($AccessRule)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
Exception calling "UpdateEventHub" with "1" argument(s): "Value cannot be null.
Parameter name: description"
At C:\dev\iot-journey\setup\Setup.Arm\Scripts\LongTermStorage\AzureStreamAnalytics\Deploy.ps1:70 char:5
+ $NamespaceManager.UpdateEventHub($EventHubDescription)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : ArgumentNullException
New-AzureResourceGroupDeployment : 10:25:10 AM - Resource Microsoft.Storage/storageAccounts 'IoT987' failed with message 'IoT987 is not a valid storage account name.
Storage account name must be between 3 and 24 characters in length and use numbers and lower-case letters only.'
At C:\dev\iot-journey\setup\Setup.Arm\Scripts\LongTermStorage\AzureStreamAnalytics\Deploy.ps1:75 char:9
+ New-AzureResourceGroupDeployment -ResourceGroupName $Resource ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [New-AzureResourceGroupDeployment], Exception
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.Resources.NewAzureResourceGroupDeploymentCommand
I see two different problems here, one with the authorization rule and the other with the storage account. For the storage account, can we just lowercase the app name?
Okay. So, no error if I run the command as admin.
Looks good!
connects to #312 connects to #310