Yes using core CLR. Trying to replicate the issue on my laptop but unable to do so. A different issue but if I am able to replicate the previous I will post it will full details. This is what I am getting right now after enabling verbose logging:
Unhandled Exception: System.AggregateException: One or more errors occurred. (One or more errors occurred. (Connection ‘ES-d26c1c45-e10e-4348-9cfc-73f8fc0891c2’ was closed.)) —> System.AggregateException: One or more errors occurred. (Connection ‘ES-d26c1c45-e10e-4348-9cfc-73f8fc0891c2’ was closed.) —> EventStore.ClientAPI.Exceptions.ConnectionClosedException: Connection ‘ES-d26c1c45-e10e-4348-9cfc-73f8fc0891c2’ was closed.
— End of inner exception stack trace —
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
at EventStore.ClientAPI.EventStorePersistentSubscriptionBase.b__19_0(Task`1 t)
at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
— End of inner exception stack trace —
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Task.Wait()
at EventStore.ClientAPI.Internal.EventStoreNodeConnection.ConnectToPersistentSubscription(String stream, String groupName, Action2 eventAppeared, Action
3 subscriptionDropped, UserCredentials userCredentials, Int32 bufferSize, Boolean autoAck)
at PayPal.Subscription.Endpoint.Program.Main(String[] args)
This is the code:
public static class Program
{
public static void Main(string[] args)
{
using (var conn = EventStoreConnection.Create(
@"ConnectTo=tcp://admin:changeit@localhost:2113; HeartBeatTimeout=500"))
{
try
{
conn.ConnectAsync().Wait();
var set = PersistentSubscriptionSettings.Create().StartFromCurrent();
conn.CreatePersistentSubscriptionAsync("Foo", "agroup", set, new UserCredentials("admin", "changeit")).Wait();
Console.Read();
}
catch (Exception ex)
{
throw;
}
}
}
private static void SubscriptionDropped(EventStorePersistentSubscriptionBase eventStorePersistentSubscriptionBase, SubscriptionDropReason subscriptionDropReason, Exception arg3)
{
}
private static void EventAppeared(EventStorePersistentSubscriptionBase eventStorePersistentSubscriptionBase, ResolvedEvent resolvedEvent)
{
}
``
Project json:
{
“version”: “1.0.0-0”,
“buildOptions”: {
“emitEntryPoint”: true,
“debugType”: “portable”,
“preserveCompilationContext”: true
},
“dependencies”: {
“Microsoft.AspNetCore.Hosting”: “1.0.0”,
“Microsoft.AspNetCore.Server.Kestrel”: “1.0.0”,
“Microsoft.AspNetCore.Server.WebListener”: “0.1.0”,
“EventStore.ClientAPI.NetCore”:“0.0.1-alpha”,
“Microsoft.NETCore.App”: {
“version”: “1.0.0”,
“type”: “platform”
}
},
“frameworks”: {
“netcoreapp1.6”: {
“imports”: [
“dnxcore50”
]
}
}
}
``