【问题标题】:NServiceBus with RavenDB - Failed to fetch timeouts from the timeout storage带有 RavenDB 的 NServiceBus - 无法从超时存储中获取超时
【发布时间】:2015-03-20 10:47:20
【问题描述】:

我们遇到了与此处列出的问题类似的问题:timeout index not present on ravendb

关于该问题的信息以外的信息:

一切(服务和乌鸦)都在同一台机器上运行 NServiceBus 4.6.6 RavenDB 2.0.3.2375

启动日志是:

2015-03-19 15:21:37,644 [1] INFO  NServiceBus.Configure [(null)] - Invocation of NServiceBus.IWantToRunBeforeConfiguration completed in 0.14 s
2015-03-19 15:21:37,801 [1] INFO  NServiceBus.Configure [(null)] - Invocation of NServiceBus.Config.INeedInitialization completed in 0.00 s
2015-03-19 15:21:37,832 [1] INFO  NServiceBus.Licensing.LicenseManager [(null)] - Expires on 12/31/9999 00:00:00
2015-03-19 15:21:37,863 [1] INFO  NServiceBus.Configure [(null)] - Invocation of NServiceBus.INeedInitialization completed in 0.06 s
2015-03-19 15:21:38,004 [1] INFO  NServiceBus.Configure [(null)] - Invocation of NServiceBus.IWantToRunBeforeConfigurationIsFinalized completed in 0.13 s
2015-03-19 15:21:38,082 [1] INFO  NServiceBus.Features.FeatureInitializer [(null)] - Features: 
Audit [4.6.6] - Enabled
AutoSubscribe [4.6.6] - Enabled
BinarySerialization [4.6.6] - Controlled by category Serializers
BsonSerialization [4.6.6] - Controlled by category Serializers
JsonSerialization [4.6.6] - Controlled by category Serializers
XmlSerialization [4.6.6] - Controlled by category Serializers
MsmqTransport [4.6.6] - Enabled
Gateway [4.6.6] - Disabled
TimeoutManager [4.6.6] - Enabled
Sagas [4.6.6] - Disabled
SecondLevelRetries [4.6.6] - Enabled
StorageDrivenPublisher [4.6.6] - Disabled
MessageDrivenSubscriptions [4.6.6] - Enabled

2015-03-19 15:21:38,098 [1] INFO  NServiceBus.Features.FeatureInitializer [(null)] - Feature categories: 
- Serializers
* BinarySerialization - Disabled
* BsonSerialization - Disabled
* JsonSerialization - Disabled
* XmlSerialization - Enabled

2015-03-19 15:21:38,129 [1] INFO  NServiceBus.Unicast.Config.FinalizeUnicastBusConfiguration [(null)] - Number of messages found: 2
2015-03-19 15:21:38,129 [1] INFO  NServiceBus.Configure [(null)] - Invocation of NServiceBus.Config.IFinalizeConfiguration completed in 0.13 s
2015-03-19 15:21:39,223 [1] INFO  NServiceBus.ConfigureRavenPersistence [(null)] - Connection to RavenDB at http://localhost:8080 verified. Detected version: Product version: 2.0.3 / 5a4b7ea, Build version: 2375
2015-03-19 15:21:39,238 [1] INFO  NServiceBus.Unicast.Transport.Monitoring.ReceivePerformanceDiagnostics [(null)] - NServiceBus performance counter for # of msgs successfully processed / sec is not set up correctly, no statistics will be emitted for the FooBar.Api queue. Execute the Install-NServiceBusPerformanceCounters cmdlet to create the counter.
2015-03-19 15:21:39,285 [18] INFO  NServiceBus.Unicast.Transport.Monitoring.ReceivePerformanceDiagnostics [(null)] - NServiceBus performance counter for # of msgs successfully processed / sec is not set up correctly, no statistics will be emitted for the FooBar.Api.Retries queue. Execute the Install-NServiceBusPerformanceCounters cmdlet to create the counter.
2015-03-19 15:21:39,285 [16] INFO  NServiceBus.Unicast.Transport.Monitoring.ReceivePerformanceDiagnostics [(null)] - NServiceBus performance counter for # of msgs successfully processed / sec is not set up correctly, no statistics will be emitted for the FooBar.Api.TimeoutsDispatcher queue. Execute the Install-NServiceBusPerformanceCounters cmdlet to create the counter.
2015-03-19 15:21:39,285 [1] INFO  NServiceBus.Unicast.Transport.Monitoring.ReceivePerformanceDiagnostics [(null)] - NServiceBus performance counter for # of msgs successfully processed / sec is not set up correctly, no statistics will be emitted for the FooBar.Api.Timeouts queue. Execute the Install-NServiceBusPerformanceCounters cmdlet to create the counter.
2015-03-19 15:21:39,285 [18] INFO  NServiceBus.Satellites.SatelliteLauncher [(null)] - Started 3/3 NServiceBus.SecondLevelRetries.SecondLevelRetriesProcessor, NServiceBus.Core, Version=4.6.0.0, Culture=neutral, PublicKeyToken=9fc386479f8a226c satellite
2015-03-19 15:21:39,285 [1] INFO  NServiceBus.Satellites.SatelliteLauncher [(null)] - Started 1/3 NServiceBus.Timeout.Hosting.Windows.TimeoutMessageProcessor, NServiceBus.Core, Version=4.6.0.0, Culture=neutral, PublicKeyToken=9fc386479f8a226c satellite
2015-03-19 15:21:39,285 [16] INFO  NServiceBus.Satellites.SatelliteLauncher [(null)] - Started 2/3 NServiceBus.Timeout.Hosting.Windows.TimeoutDispatcherProcessor, NServiceBus.Core, Version=4.6.0.0, Culture=neutral, PublicKeyToken=9fc386479f8a226c satellite
2015-03-19 15:21:39,535 [21] WARN  NServiceBus.Timeout.Hosting.Windows.TimeoutPersisterReceiver [(null)] - Failed to fetch timeouts from the timeout storage
2015-03-19 15:21:39,535 [21] INFO  NServiceBus.CircuitBreakers.RepeatedFailuresOverTimeCircuitBreaker [(null)] - The circuit breaker for TimeoutStorageConnectivity is now in the armed state
2015-03-19 15:21:40,551 [16] WARN  NServiceBus.Timeout.Hosting.Windows.TimeoutPersisterReceiver [(null)] - Failed to fetch timeouts from the timeout storage

任何关于改变什么的想法将不胜感激

【问题讨论】:

    标签: ravendb nservicebus


    【解决方案1】:

    原来 API 已经通过 nuget 安装了 NServiceBus.Host。对于仅发送端点,这不是必需的。删除 nuget 包并重新配置稍微解决了这个问题。

    现在我们只安装了 NServiceBus 和 NServiceBus.Core nuget 包。

    现在的配置是:

    protected void Application_Start(object sender, EventArgs e)
    {
      log4net.Config.XmlConfigurator.Configure();
      Configure.Serialization.Xml();
      Configure.Transactions.Disable();
    
      Bus = Configure.With()
        .Log4Net()
        .DefaultBuilder()
        .UseTransport<Msmq>()
        .PurgeOnStartup(false)
        .UnicastBus()
        .ImpersonateSender(false)
        .SendOnly();
    }
    

    日志消息现已停止,因为 API 不再尝试创建总线来接收消息。

    【讨论】:

    • NServiceBus.Host 与“仅发送端点”无关。此包是托管您的程序集的主机进程(应用程序)。当您使用主机时,您的应用程序中不需要可启动总线,主机会为您完成。如果您愿意,也可以将 Host 作为服务安装。对于自托管/IIS 应用程序,不需要 Host,因为您自己实例化了总线。
    • 是的,这正是我们得出的结论,从而回答了我们自己的问题。问题源于这个 API 的起源,它是一个遗留代码库,它不仅有一个 API 发送命令,而且还有事件发布和托管服务都在同一个解决方案中。将事物拆开以帮助我们进行持续集成/部署工作首先导致了这个问题。感谢您澄清我们的问题。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-11-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-08-22
    相关资源
    最近更新 更多