我开始学NServiceBus了。
我读到的第一件事是--我们展示了NServiceBus如何保证可靠性和可扩展性--,OK :)
从RetailDemo网站https://docs.particular.net/tutorials/quickstart/下载NServiceBus教程解决方案
运行它,它打开3个控制台应用程序ClientUI,销售,计费。它应该从ClinetUI向销售和计费发送信息。
然而,这个销售应用程序在这个细节上失败了(下一次甚至刚开始的时候也不再起作用):
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.我想关键的原因是
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.问题-出什么事了?访问不被拒绝,任何文件都不保存此文件夹或文件。
如果他们的演示解决方案失败了,我能做些什么来继续学习这个框架呢?
发布于 2018-03-16 04:05:59
它看起来很好用。
您在堆栈跟踪中看到的异常来自NServiceBus.DirectoryBasedTransaction.Commit(),并且是由Directory.Move()引起的。这是一个文件系统调用,它明确表示对.pending\c687e34a-4a0e-405a-bce2-25515b419778的访问被拒绝。
其原因可能各不相同。可能是上一次运行失败,文件夹/文件被锁定。您可以使用像Microsoft/SysInternals进程资源管理器这样的工具来查找导致锁定的进程。也可以在另一台机器上试用。
https://stackoverflow.com/questions/49307419
复制相似问题