NServiceBus.Azure - AzurePubSub sample Host loops on Start -
about year ago able nsb standing , working great on azure in workerrole. implemented few services. took work, there several issues revolving around dependencies , versions after tweaking, got things , running.
so fast forward today, new product, trying stand simple example, proof of concept in exploration phase nsb v4.0 system building. wanted stand azurepubsub example located here; https://github.com/particular/nservicebus.azure/tree/develop/integrationtests/azurepubsub
having heck of time getting sample run. have documented out steps have taken;
using vs 2k12, nsb 4.0 (latest stable)
- open azurepubsub project
- prompted convert project target windows azure tools - v2.1 (converted)
- drop nsb ref mymessages, replaced nuget nservicebus.interfaces pkg
- clean build on mymessages
- orderservice, dropped nservicebus, nservicebus.core, nservicebus.azure, nservicebus.hosting.azure, common.logging
orderservice, replaced above nuget package (nservicebus.hosting.azure).
orderwebsite dropped nservicebus, nservicebus.azure, nservicebus.core , common.logging
orderwebsite, replaced above nuget package (nservicebus.azure).
achieved clean solution build!
debug
could not load file or assembly 'microsoft.windowsazure.diagnostics, version=2.1.0.0, culture=neutral, publickeytoken=31bf3856ad364e35' or 1 of dependencies. located assembly's manifest definition not match assembly reference. (exception hresult: 0x80131040)
added binding redirects orderwebsite manually (optionally ref nuget diagnostics)
- debug
could not load file or assembly 'microsoft.windowsazure.diagnostics, version=2.1.0.0, culture=neutral, publickeytoken=31bf3856ad364e35' or 1 of dependencies. located assembly's manifest definition not match assembly reference. (exception hresult: 0x80131040)
added binding redirects orderservice manually (optionally ref nuget diagnostics)
debug
could not load file or assembly 'microsoft.windowsazure.diagnostics, version=2.1.0.0, culture=neutral, publickeytoken=31bf3856ad364e35' or 1 of dependencies. located assembly's manifest definition not match assembly reference. (exception hresult: 0x80131040)
- dropped microsoft.windowsazure.diagnostics reference 2.0.0.0
added microsoft.windowsazure.diagnostics reference 2.1.0.0 (file version 2.1.6493.0) both orderservice , orderwebsite (left binding redirects in)
debug orderwebsite loads nicely. orderservice caught in loop starting , stopping seen via azure compute emulator. endpointconfiguration ctor never gets called, nor definerouting class iprovideconfiguration implementation.
azure compute emulator ouput:
[fabric] role instance: deployment21(119).azureservice.orderservice.0 [fabric] role state unhealthy [diagnostics]: updatestate(microsoft.windowsazure.diagnostics.diagnosticmonitorstartupinfo, microsoft.windowsazure.diagnostics.diagnosticmonitorconfiguration, ) [diagnostics]: acquired mutex [diagnostics] information: c:\users\ryan\appdata\local\dftmp\resources\a903dc1b-98a5-4a78-b04d-c533e881564d\directory\diagnosticstore\monitor [diagnostics] information: d:\github\nservicebus.azure\integrationtests\azurepubsub\csx\debug\roles\orderservice\diagnostics\x64\monitor\monagenthost.exe -localpath "c:\users\ryan\appdata\local\dftmp\resources\a903dc1b-98a5-4a78-b04d-c533e881564d\directory\diagnosticstore\monitor" -staticconfigfile "c:\users\ryan\appdata\local\dftmp\resources\a903dc1b-98a5-4a78-b04d-c533e881564d\directory\diagnosticstore\monitor\configuration\mastaticconfig.xml" -configfile "c:\users\ryan\appdata\local\dftmp\resources\a903dc1b-98a5-4a78-b04d-c533e881564d\directory\diagnosticstore\monitor\configuration\maconfig.xml" -shutdownevent waddm-shutdown-81011d9e243b47bc8941b805e7146ce3 -initializedevent wadm-startup-81011d9e243b47bc8941b805e7146ce3 -parent 5704 -events [fabric] role state stopping [diagnostics]: creating config channel server [monagenthost] output: agent exit when waddm-shutdown-81011d9e243b47bc8941b805e7146ce3 signaled. [monagenthost] output: signal wadm-startup-81011d9e243b47bc8941b805e7146ce3 after agent initialized. [monagenthost] output: registered event consumer. [monagenthost] output: agent exit when parent process 5704 exits. [monagenthost] output: monitoring agent started [diagnostics]: starting configuration channel polling [runtime] role entrypoint . calling onstart() [runtime] role entrypoint . completed onstart() [runtime] role entrypoint . calling run() [runtime] role entrypoint . completed run() ==> role recycling initiated [runtime] role instance recycling starting [runtime] role entrypoint . calling onstop() [runtime] role entrypoint . completed onstop() [fabric] role state busy
and loops on , on again. error happening on initializing things worker role orderservice, can't seem located going wrong.
anyone have ideas on how can pinpoint cause?
many thanks, ryan
indeed has incompatibility between visual studio tooling version (2.1) , references nservicebus 4.0 has serviceruntime , diagnostics assemblies (2.0). @ runtime need match or see weird behavior when deploying mention.
you can solve problem in 2 ways, use vs tooling 2.0 (there should switch somewhere on project properties), or reference latest build of nservicebus.azure 4.1. if goes should able release new version soon.
i painfully aware compatibility issue going haunt future versions well, i'm looking decouple nservicebus specific windows azure sdk version in future. here github issue if want follow progress on one. https://github.com/particular/nservicebus.azure/issues/26
Comments
Post a Comment