2012-06-05 28 views
2

使用NuGet我將項目中的所有NServiceBus引用從3.0.3升級到3.2.2 對於此解決方案中的4個服務,我還給出了他們的NuGetNServiceBus端點在升級3.0.3之後尋找RavenDB超時 - > 3.2.2

到NServiceBus.Host引用我部署的二進制文件的測試環境,以及服務啓動,現在卻對一些時間與下面的錯誤後失效。 3.2中是否需要額外的配置?

未處理的異常:Magnum.StateMachine.StateMachineException:異常occurr ED在Topshelf.Internal.ServiceController`1 [[NServiceBus.Hosting.Windows.Windows 主機,NServiceBus.Host,版本= 3.2.0.0,文化=中性公鑰= 9fc3864 79f8a226c]]初始狀態同時處理的OnStart ---> System.Exception的期間:起始端點當E xception,錯誤已被記錄。原因:一個例外是 在調用上鍵入「RavenTimeoutPersistence」構造「太虛.ctor(Raven.Client.IDocumentStore)」 拋出。 ---> Autofac.Core.DependencyResolutionExcept 離子:在調用對類型 'RavenTimeoutPersistence' 構造 '空隙.ctor(Raven.Cl ient.IDocumentStore)' 引發異常。 ---> System.Net.WebExce ption:無法連接到遠程服務器---> System.Net.Sockets.SocketExce ption:無連接可以作出,因爲目標機器積極地拒絕我 牛逼

回答

4

在3.2中,默認情況下TimeoutManager處於打開狀態,因此您需要將其關閉以避免使用Raven。 Configure.DisableTimeoutManager()

+0

非常感謝Andreas :) – plenderj

+0

你在哪裏添加這條線? – alice7

+0

@ alice7我正在使用NServiceBus 4.0版,並且實現了'IWantToRunBeforeConfigurationIsFinalized'接口。在那裏,你可以訪問配置(例如,我需要改變的代碼Configure.Instance.DisableTimeoutManager()): '公共無效的run(){ Configure.Instance.DisableTimeoutManager(); }' –

0

我的實例被創建的錯誤信息,我相信同樣的問題下跌倒,但它會創建下列消息 -

消息=無連接可以作出,因爲目標機器 積極拒絕它127.0.0.1:8080

我不知道爲什麼它試圖連接到本地計算機的端口8080。另外,即使8080端口沒有運行,爲什麼它失敗?

我必須有端口8080上運行這個工作RavenDB的實例?下面是我得到實際的異常...

System.Net.WebException是未處理由用戶代碼
的HResult = -2146233079消息=無法連接到遠程服務器
源=系統堆棧跟蹤: 在System.Net.HttpWebRequest.GetResponse() 在Raven.Client.Connection.HttpJsonRequest.ReadStringInternal(Func鍵1 getResponse) in c:\Builds\raven\Raven.Client.Lightweight\Connection\HttpJsonRequest.cs:line 301 at Raven.Client.Connection.HttpJsonRequest.ReadResponseString() in c:\Builds\raven\Raven.Client.Lightweight\Connection\HttpJsonRequest.cs:line 206 at Raven.Client.Connection.HttpJsonRequest.ExecuteRequest() in c:\Builds\raven\Raven.Client.Lightweight\Connection\HttpJsonRequest.cs:line 154 at Raven.Client.Connection.ServerClient.DirectPutIndex(String name, String operationUrl, Boolean overwrite, IndexDefinition definition) in c:\Builds\raven\Raven.Client.Lightweight\Connection\ServerClient.cs:line 629 at Raven.Client.Connection.ServerClient.<>c__DisplayClass34.<PutIndex>b__33(String operationUrl) in c:\Builds\raven\Raven.Client.Lightweight\Connection\ServerClient.cs:line 608 at Raven.Client.Connection.ServerClient.TryOperation[T](Func 2操作,字符串operationUrl,布爾avoidThrowing,T &結果)在 C:\構建\烏鴉\ Raven.Client .Lightweight \連接\ ServerClient.cs:線在Raven.Client.Connec tion.ServerClient.ExecuteWithReplication [T](字符串 方法,函數功能2 operation) in c:\Builds\raven\Raven.Client.Lightweight\Connection\ServerClient.cs:line 168 at Raven.Client.Connection.ServerClient.PutIndex(String name, IndexDefinition definition, Boolean overwrite) in c:\Builds\raven\Raven.Client.Lightweight\Connection\ServerClient.cs:line 608 at Raven.Client.Connection.ServerClient.PutIndex[TDocument,TReduceResult](String name, IndexDefinitionBuilder 2 indexDef,布爾覆蓋)在 C:\構建\烏鴉\ Raven.Client.Lightweight \連接\ ServerClient.cs:線在NServiceBus.Timeout .Hosting.Windows.Persistence.RavenTimeoutPersistence..ctor(IDocumentStore store)in c:\ TeamCity \ buildAgent \ work \ nsb.master_8 \ src \ timeout \ NServiceBus.Timeout.Hosting。WINDOWS \持久\ RavenTimeoutPersistence.cs:行 22的InnerException:System.Net.Sockets.SocketException 的HResult = -2147467259 消息=無連接可以作出,因爲目標機器積極地拒絕它127.0.0.1:8080 源=系統 錯誤碼= 10061 NativeErrorCode = 10061 堆棧跟蹤: 在System.Net.Sockets.Socket.DoConnect(端點endPointSnapshot,爲SocketAddress的SocketAddress) 在System.Net.Sockets.Socket.InternalConnect(端點remoteEP) 在System.Net.ServicePoint .ConnectSocketInternal(布爾connectFailure,套接字s4,套接字s6,套接字&套接字,IPAddress & 個地址,ConnectSocketState狀態,IAsyncResult的asyncResult, 異常&除外) 的InnerException:

UPDATE:

所以通過所有的挫折會後,似乎NServiceBus試圖使用連接到RavenDB端口8080.因爲我已經爲其他項目安裝了RavenDB,似乎「RuMeFirst.bat」認爲它不會使用NServiceBus提供的數據庫(也許?),而是想使用我以前的安裝。問題是,我原來RavenDB的安裝是在端口8079上運行(我認爲這是對RavenDB默認值)。因此,當我只用一個簡單的EndpointConfig類作爲服務器運行NServiceBus時,它不會在端口8080上找到任何內容並且不想運行。

故事的道德:在安裝之前NServiceBus刪除RavenDB或端口8080上運行RavenDB,然後安裝NServiceBus,以消除任何這些錯誤,我得到了最初的。