Hi All,
I am using:
NSB 6.4.2
app hosted as windows service
We used some scheduler that initializes a couple of endpoints and sends messages to the queue by some schedule.
Endpoints configured as Send-only!
When several threads try to initialize endpoint in the same time I retrieve an error:
FATAL NServiceBus.Features.LicenseReminder Failed to initialize the license
2018-09-25 02:00:03.786 FATAL NServiceBus.Features.LicenseReminder Failed to initialize the license
System.IndexOutOfRangeException: Probable I/O race condition detected while copying memory. The I/O package is not thread safe by default. In multithreaded applications, a stream must be accessed in a thread-safe way, such as a thread-safe wrapper returned by TextReader’s or TextWriter’s Synchronized methods. This also applies to classes like StreamWriter and StreamReader.
at System.Buffer.InternalBlockCopy(Array src, Int32 srcOffsetBytes, Array dst, Int32 dstOffsetBytes, Int32 byteCount)
at System.IO.StreamWriter.Write(Char buffer, Int32 index, Int32 count)
at System.IO.TextWriter.SyncTextWriter.Write(Char buffer, Int32 index, Int32 count)
at System.Diagnostics.TextWriterTraceListener.WriteLine(String message)
at System.Diagnostics.TraceInternal.WriteLine(String message)
at NServiceBus.DefaultLoggerFactory.Write(String name, LogLevel messageLevel, String message) in C:\BuildAgent\work\a93f853f0c1b9532\src\NServiceBus.Core\Logging\DefaultLoggerFactory.cs:line 50
at NServiceBus.LicenseManager.LogFindResults(ActiveLicenseFindResult result) in C:\BuildAgent\work\a93f853f0c1b9532\src\NServiceBus.Core\Licensing\LicenseManager.cs:line 64
at NServiceBus.LicenseManager.InitializeLicense(String licenseText, String licenseFilePath) in C:\BuildAgent\work\a93f853f0c1b9532\src\NServiceBus.Core\Licensing\LicenseManager.cs:line 24
at NServiceBus.Features.LicenseReminder.Setup(FeatureConfigurationContext context) in C:\BuildAgent\work\a93f853f0c1b9532\src\NServiceBus.Core\Licensing\LicenseReminder.cs:line 21
As result after this exception, I could not initialize any new endpoint until restart service.
Any ideas?