首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Rebus和RavenDB

Rebus和RavenDB
EN

Stack Overflow用户
提问于 2015-12-23 00:13:41
回答 1查看 165关注 0票数 2

正如我在上一个问题(Rebus and Remote queues)中提到的,我现在处理的是远程队列,而不是以前的本地队列,我使用的是Rebus 0.83。在本例中,我的RavenDB与我的Rebus windows服务位于一台单独的机器上。我一直收到一个错误:"System.Net.Sockets.SocketException:无法连接,因为目标机器主动拒绝了它127.0.0.1:8080“,我在代码中没有使用localhost,我已经检查了我的配置,它指向了RavenDB的正确的url。我的配置是

代码语言:javascript
复制
Configure.With(new WindsorContainerAdapter(container))
    .Logging(l => l.Serilog())
    .Transport(t => t.UseMsmqAndGetInputQueueNameFromAppConfig())
    .MessageOwnership(d => d.FromRebusConfigurationSection())
    .Subscriptions(s => s.Use(new RavenDbSubscriptionStorage(store, "Subscriptions")))
    .Sagas(s => s.Use(new RavenDbSagaPersister(store)))
    .CreateBus().Start();

我知道我可以用Rebus从机器上找到RavenDB,因为我尝试过一个简单的控制台应用程序。任何帮助都是非常感谢的。

整个错误堆栈跟踪都在这里。

代码语言:javascript
复制
15:17  [Warning] 10   User exception in Rebus 1 worker 1: Rebus.MessageHandleException: Could not handle message with ID 06729fcb-8a8f-4148-876a-8ed88c741cf7\2428 ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:8080
at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.GetResponse()
at Raven.Client.Connection.HttpJsonRequest.ReadJsonInternal(Func`1 getResponse) in c:\Builds\RavenDB-Stable\Raven.Client.Lightweight\Connection\HttpJsonRequest.cs:line 340
at Raven.Client.Connection.HttpJsonRequest.ReadResponseJson() in c:\Builds\RavenDB-Stable\Raven.Client.Lightweight\Connection\HttpJsonRequest.cs:line 237
at Raven.Client.Connection.ServerClient.DirectGet(String[] ids, String operationUrl, String[] includes, Boolean metadataOnly) in c:\Builds\RavenDB-Stable\Raven.Client.Lightweight\Connection\ServerClient.cs:line 1034
at Raven.Client.Connection.ServerClient.<>c__DisplayClass5e.<Get>b__5d(String u) in c:\Builds\RavenDB-Stable\Raven.Client.Lightweight\Connection\ServerClient.cs:line 991
at Raven.Client.Connection.ReplicationInformer.TryOperation[T](Func`2 operation, String operationUrl, Boolean avoidThrowing, T& result) in c:\Builds\RavenDB-Stable\Raven.Client.Lightweight\Connection\ReplicationInformer.cs:line 558
at Raven.Client.Connection.ReplicationInformer.ExecuteWithReplication[T](String method, String primaryUrl, Int32 currentRequest, Int32 currentReadStripingBase, Func`2 operation) in c:\Builds\RavenDB-Stable\Raven.Client.Lightweight\Connection\ReplicationInformer.cs:line 524
at Raven.Client.Connection.ServerClient.ExecuteWithReplication[T](String method, Func`2 operation) in c:\Builds\RavenDB-Stable\Raven.Client.Lightweight\Connection\ServerClient.cs:line 174
at Raven.Client.Connection.ServerClient.Get(String[] ids, String[] includes, Boolean metadataOnly) in c:\Builds\RavenDB-Stable\Raven.Client.Lightweight\Connection\ServerClient.cs:line 991
at Raven.Client.Document.DocumentSession.LoadInternal[T](String[] ids, String[] includes) in c:\Builds\RavenDB-Stable\Raven.Client.Lightweight\Document\DocumentSession.cs:line 313
at Raven.Client.Document.MultiLoaderWithInclude`1.Load(String id) in c:\Builds\RavenDB-Stable\Raven.Client.Lightweight\Document\MultiLoaderWithInclude.cs:line 90
at Rebus.RavenDb.RavenDbSagaPersister.Find[T](String sagaDataPropertyPath, Object fieldFromMessage)   at Rebus.Bus.Dispatcher.<Dispatch>d__c`1.MoveNext()
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-12-23 01:43:27

结果发现,这是由于用户权限。默认的本地系统无法在机器之间发送消息,显然也不能在机器上到达乌鸦

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/34426634

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档