NServiceBus 3.2 Samples Issue

坚强是说给别人听的谎言 提交于 2019-12-12 12:02:48

问题


I am trying to run the NServiceBus sample for AsyncPages. Seems simple enough.

  1. Download the latest from NServiceBus.com
  2. Execute the bat file to install prerequisites
  3. Open the solution
  4. Press F5
  5. Enter a number into the textbox

When I do that, I get a nasty RavenDB bug (NServiceBus uses this as a Data Store).

Exception when starting endpoint, error has been logged. Reason: There is no index named: dynamic/TimeoutData

It seems that RavenDB didn't or can't create an index. Not sure if this is a RavenDB bug or NServiceBus bug, but it keeps me from running the sample.

Thanks in Advance

Update:

When upgrading to version 3.2.1 as Andreas suggested.

Exception when starting endpoint, error has been logged. Reason: An exception was thrown while invoking the constructor 'Void .ctor(Raven.Client.IDocumentStore)' on type 'RavenTimeoutPersistence'.

I am also noticing issues with the samples and TopShelf now. They host in topshelf is referencing 3.2.0 versions of NServiceBus instead of 3.2.1.

Not a fun experience so far, but maybe I should just give up on the samples and jump right into something.


回答1:


I've been struggling with the same problem - it turned out NServiceBus had problem with connection to RavenDB.

RunMeFirst.bat tries to configure things but apparently not always succeeds.

In my case I had RavenDB installed but not on a standard port 8080 where NServiceBus is expecting it to be. Check your Raven.Server.exe.config in your Raven installation folder (by default C:\RavenDB\RavenDB.0.0.0\RavenDB.Server). There should be port number defined. If it's different you can override NServiceBus default connection string to RavenDB by adding in your web.config or app.config:

<connectionStrings>
    <add name="NServiceBus.Persistence" connectionString="Url=http://localhost:8081;" />
</connectionStrings>

Where 8081 is sample different RavenDB connection port.

Other thing that might go wrong is that your RavenDB is in conflict with other service that is using port 8080, to solve this you may change port number in Raven config and add custom connection string.

Hope that helps, Cheers




回答2:


Yes, we've seen that issue and it will be fixed in a coming patch release (very soon). The current workaround is to invoke RunMeFirst.bat again.




回答3:


I got this same symptom "RavenTimeoutPersistence" the reason the RunMeFirst.bat didn't run correctly was down to security restrictions.

  1. Don't forget to right click on the NServiceBus3.2.x.zip file, properties then 'Unblock'
  2. The batch file needs to run with Admin rights. So open a command prompt with 'Run as Administrator' then run it

After that mine worked perfectly.



来源:https://stackoverflow.com/questions/10806242/nservicebus-3-2-samples-issue

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!