Reputation: 6640
I'm starting to learn NServiceBus.
First thing I read is We show how NServiceBus guarantees reliability and extensibility, OK :)
Downloaded RetailDemo tutorial solution from NServiceBus website https://docs.particular.net/tutorials/quickstart/
Ran it, it opens 3 console apps ClientUI, Sales, Billing. It is supposed to send a message from ClinetUI to Sales and Billing.
However the Sales app is failing with this details (and next time doesnt work anymore even when just started):
2018-03-15 14:31:47.771 INFO DefaultFactory Logging to 'C:\Users\username\Projects\Tutorials\RetailDemo\Sales\bin\Debug\net461\' with level Info
2018-03-15 14:31:48.014 INFO NServiceBus.LicenseManager No valid license could be found, falling back to trial license with start date '3/12/2018'
2018-03-15 14:31:48.114 INFO NServiceBus.PerformanceCounterHelper NServiceBus performance counter for '# of msgs pulled from the input queue /sec' is not set up correctly. To rectify this problem, consult the NServiceBus performance counters documentation.
2018-03-15 14:31:48.121 INFO NServiceBus.PerformanceCounterHelper NServiceBus performance counter for '# of msgs successfully processed / sec' is not set up correctly. To rectify this problem, consult the NServiceBus performance counters documentation.
2018-03-15 14:31:48.128 INFO NServiceBus.PerformanceCounterHelper NServiceBus performance counter for '# of msgs failures / sec' is not set up correctly. To rectify this problem, consult the NServiceBus performance counters documentation.
Press Enter to exit.
2018-03-15 14:31:48.365 INFO Sales.PlaceOrderHandler Received PlaceOrder, OrderId = d299afed-5b85-4d74-97e8-0d48d9bcd653
2018-03-15 14:31:48.371 INFO Sales.PlaceOrderHandler Publishing OrderPlaced, OrderId = d299afed-5b85-4d74-97e8-0d48d9bcd653
2018-03-15 14:31:48.495 FATAL NServiceBus Failure while trying to process C:\Users\username\Projects\Tutorials\RetailDemo\.learningtransport\Sales\f37361c2-e95e-4a8a-be81-29a72574c646.metadata.txt
System.IO.IOException: Access to the path 'C:\Users\username\Projects\Tutorials\RetailDemo\.learningtransport\Sales\.pending\c687e34a-4a0e-405a-bce2-25515b419778' is denied.
at System.IO.Directory.InternalMove(String sourceDirName, String destDirName, Boolean checkHost)
at NServiceBus.DirectoryBasedTransaction.Commit()
at NServiceBus.LearningTransportMessagePump.<ProcessFile>d__9.MoveNext()
2018-03-15 14:31:48.503 INFO NServiceBus.Unicast.UnicastBus Initiating shutdown.
2018-03-15 14:31:48.517 INFO NServiceBus.Unicast.UnicastBus Shutdown complete.
I guess the key reason is
2018-03-15 14:31:48.495 FATAL NServiceBus Failure while trying to process C:\Users\username\Projects\Tutorials\RetailDemo\.learningtransport\Sales\f37361c2-e95e-4a8a-be81-29a72574c646.metadata.txt
System.IO.IOException: Access to the path 'C:\Users\username\Projects\Tutorials\RetailDemo\.learningtransport\Sales\.pending\c687e34a-4a0e-405a-bce2-25515b419778' is denied.
Question - whats wrong? access is not denied, nothing holds this folder or file.
What can I do to continue learning this framework, if their demo solution fails?
Upvotes: 0
Views: 190
Reputation: 25994
It appears to work fine.
Exception you see in the stacktrace is coming from NServiceBus.DirectoryBasedTransaction.Commit()
and is caused by Directory.Move()
. That's a file system call, which clearly indicates that the access to .pending\c687e34a-4a0e-405a-bce2-25515b419778
was denied.
The reason for that could vary. It could be that a previous run was unsuccessful and the folder/file is locked up. You could use a tool like Microsoft/SysInternals Process Explorer to find out what process is causing the lock. Could also try it on another machine.
Upvotes: 1