Closed dinoo closed 8 years ago
We have not tested with Azure Storage library 6.1.0 and not using this version (we are using 4.2 https://github.com/dotnet/orleans/blob/master/src/OrleansAzureUtils/packages.config#L9). There might be some version mismatch.
Do you know if 4.2 Storage library is compatible with the v4.2 Storage Emulator from 2.7.1 Azure SDK?
I do not. But others (@sergeybykov , @jthelin , @jason-bragg) might know.
Resolved
Based on your comment @gabikliot, I decided to try and downgrade my WorkerRole project to use Microsoft.WindowsAzure.Storage 4.2.0.0 and Microsoft.WindowsAzure.Configuration 2.0.0.0 instead of the latest versions I used before. However, I have library that I include in the project that uses the latest versions of both libraries.
I tried adding the following to my app.config
<dependentAssembly>
<assemblyIdentity name="Microsoft.WindowsAzure.ConfigurationManager" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.WindowsAzure.Storage" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.2.0.0" newVersion="4.2.0.0" />
</dependentAssembly>
but Assembly Binding Log Viewer tells me
The operation failed.
Bind result: hr = 0x80131040. No description available.
Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
Running under executable <path>\Services\csx\Debug\roles\WorkerRoleA\base\x64\WaWorkerHost.exe
--- A detailed error log follows.
=== Pre-bind state information ===
LOG: DisplayName = Microsoft.WindowsAzure.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
(Fully-specified)
LOG: Appbase = file:///<path>/Services/csx/Debug/roles/WorkerRoleA/approot
LOG: Initial PrivatePath = <path>\Services\csx\Debug\roles\WorkerRoleA\approot
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = RoleManager
Calling assembly : WorkerRoleA, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: <path>\Services\csx\Debug\roles\WorkerRoleA\approot\WorkerRoleA.dll.config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Post-policy reference: Microsoft.WindowsAzure.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
LOG: GAC Lookup was unsuccessful.
LOG: Attempting download of new URL file:///<path>/Services/csx/Debug/roles/WorkerRoleA/approot/Microsoft.WindowsAzure.Configuration.DLL.
LOG: Assembly download was successful. Attempting setup of file: <path>\Services\csx\Debug\roles\WorkerRoleA\approot\Microsoft.WindowsAzure.Configuration.dll
LOG: Entering run-from-source setup phase.
LOG: Assembly Name is: Microsoft.WindowsAzure.Configuration, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
WRN: Comparing the assembly name resulted in the mismatch: Major Version
ERR: The assembly reference did not match the assembly definition found.
ERR: Run-from-source setup phase failed with hr = 0x80131040.
ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.
Can I somehow use the old ones for my WorkerRole while my included library uses the newer ones?
Update
I added the older versions of Azure libraries used by the AzureUtils package to my project and set both to "Copy always" and I configured my app.config as follows:
<dependentAssembly>
<assemblyIdentity name="Microsoft.WindowsAzure.ConfigurationManager" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="3.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.WindowsAzure.Storage" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="6.1.0.0-6.1.0.0" newVersion="6.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.WindowsAzure.ConfigurationManager" publicKeyToken="31bf3856ad364e35" />
<codeBase version="2.0.0.0" href="azure4.2\Microsoft.WindowsAzure.Configuration.dll" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.WindowsAzure.Storage" publicKeyToken="31bf3856ad364e35" />
<codeBase version="4.2.0.0" href="azure4.2\Microsoft.WindowsAzure.Storage.dll" />
</dependentAssembly>
@dinoo You don't have to go all the way down to 4.2. We are running in production with 5.0.
If there is indeed an issue with 6.1, we need to understand what it is and look at fixing it.
Thanks for the help, guys.
Let me know if you think 6.1.0 should work normally with the a future version of Project Orleans.
I faced same exception here as well... I've started having issues on my current system due to this change. We are using ARM (Azure Resource Manager) to make some operations at storage and the ARM models are not available on v5.0.2 on Microsoft.WindowsAzure.Storage so, we must have a way to get things upgraded.
Since 6.0, Azure SDK with the introduction of ARM does not do any fancy operations anymore on the client (previously it has a different implementation to each service and it rely on old Service Management APIs which was based on Powershell). Now they created a fully http API with swagger on it which makes things less breakable IMHO. I believe once we move to 6+, this kind of condition is not easily match anymore. Even Azure Powershell CLI is now based on this same SDK. The idea behind this is avoid this kind of situation.
Will do a test with it and check what are the problems...
This is being addressed by https://github.com/dotnet/orleans/pull/1024.
Hey guys,
Today, I decided to pick up were I left off a few month ago. I thought, before I get started I should upgrade to 1.0.10, which seemed a good idea. However, when I start my worker role, it now gives me the exception you can see below. The project is using the latest version of Azure Storage library (6.1.0) and I have included below the OrleansConfiguration for my AzureSilo.
I checked my local storage (emulator) and It have a deployment registered in the OrleansSiloInstances table.
OrleansConfiguration
Exception