我可能遗漏了一些明显的问题,但我似乎无法将端点部署为azure worker角色在生产环境中工作;它在本地azure仿真器下运行得很好。
以下是使用nservicebus示例附带的示例项目之一复制此问题的步骤:
没有例外,工作者角色按预期部署和启动;它只是似乎没有处理消息。
我希望我错过了一些简单的事情,之前有人遇到过这个问题。
更新: 我看到下面的日志条目位于角色的事件日志中。问题只是默认的日志记录配置文件试图访问127.0.0.1:10000?
以下是示例配置使用的配置文件:
NServiceBus.Production NServiceBus.OnAzureTableStorage NServiceBus.WithAzureStorageQueues
这是完整的事件日志条目:
An unhandled exception occurred. Type: System.Exception Process ID: 2512
Process Name: WaWorkerHost
Thread ID: 6
AppDomain Unhandled Exception for role OrderService_IN_0
Exception: Exception when starting endpoint, error has been logged. Reason: Unable to connect to the remote server
at NServiceBus.Hosting.GenericHost.Start()
at NServiceBus.Hosting.Azure.RoleEntryPoint.Run()
at Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.StartRoleInternal()
at Microsoft.WindowsAzure.ServiceRuntime.Implementation.Loader.RoleRuntimeBridge.<StartRole>b__1()
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
Inner Exception: Unable to connect to the remote server
at Microsoft.WindowsAzure.Diagnostics.Management.RoleInstanceDiagnosticManager.<.ctor>b__2(Object sender, ErrorEventArgs args)
at Microsoft.WindowsAzure.Diagnostics.ControlChannel.GetControlContainer()
at Microsoft.WindowsAzure.Diagnostics.ControlChannel.set_StartupInfo(DiagnosticMonitorStartupInfo value)
at Microsoft.WindowsAzure.Diagnostics.Management.RoleInstanceDiagnosticManager..ctor(CloudStorageAccount storageAccount, String deploymentId, String roleName, String roleInstanceId)
at NServiceBus.Integration.Azure.AzureAppender.ConfigureAzureDiagnostics()
at NServiceBus.SetLoggingLibrary.Log4Net(Configure config, Object appenderSkeleton)
at NServiceBus.SetLoggingLibrary.Log4Net[TAppender](Configure config, Action`1 initializeAppender)
at System.Collections.Generic.List`1.ForEach(Action`1 action)
at NServiceBus.Hosting.Profiles.ProfileManager.ActivateProfileHandlers()
at System.Collections.Generic.List`1.ForEach(Action`1 action)
at NServiceBus.Configure.Initialize()
at NServiceBus.Hosting.GenericHost.Start()
Inner Exception: No connection could be made because the target machine actively refused it 127.0.0.1:10000
at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)
at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception)
更新 - 解决方案: 问题是我用作基线的示例项目使用了较旧的连接字符串标识符名称“Diagnostics.ConnectionString”,NServiceBus Azure Logging Appender正在寻找指定诊断存储位置的较新的azure标识符“Microsoft.WindowsAzure.Plugins .Diagnostics.ConnectionString“。重命名标识符解决了问题。
答案 0 :(得分:0)
我是nservicebus中azure支持的作者。让我帮你解决这个问题,必须出问题,有几种方法可以找出答案。