Event Store Client v 3.0.1 hangs on read/write attempt


I’m trying to switch to version 3.0.1 (from 2.0.1) and run into issues with async Client.

it just hangs on an attempt to read or write. Seems like similar issue: https://groups.google.com/forum/#!topic/event-store/mdxbAZdOCxA but with older version.

Was working fine with previous version (was using non async api)

public async Task Test()
    var con = EventStoreConnection.Create(ConnectionSettings.Create()
        .SetDefaultUserCredentials(new UserCredentials("admin", "changeit")),
        new IPEndPoint(IPAddress.Loopback, 1113));

    await con.ConnectAsync();

    //hangs on this line:
    var slice = await con.ReadStreamEventsForwardAsync("devicetest4-123", 0, 100, false);



Also have tried:

var slice = con.ReadStreamEventsForwardAsync(“devicetest4-123”, 0, 100, false).Result;


await Task.Run(
async () =>
slice = await con.ReadStreamEventsForwardAsync(“devicetest4-123”, 0, 100, false);


Same happens on writing attempt.

Is this a known issue, or it is me missing something silly, like default port has changed?

After removing .KeepReconnecting().KeepRetrying() I now got it crashing with
ConnectionClosedException : Connection ‘ES-ddf397af-95ea-4111-aa63-750f31b98ceb’ was closed.


Problem was with IP config. For unknown reason EventStore got installed to instead of default, so IPAddress.Loopback didn’t work. Web UI however is running on, so I’m at loss of why it has defaulted to random IP for External IP.

This just happened to me too. I spent >4 hours going round and round trying to figure out why the code was blocking when calling .Result (obviously it was deadlocking, right?) just to finally find this thread and realize I was hardcoding to when the GES was bound to a different IP.

I may be the only thinking it but I’ll say it. I hate async/await. Even when it’s not the actual problem, it’s still a f***cking debug nightmare. I’m a bit sad that ES provides only an async interface.


Try using a logger, everything that happens in client api is logged. You would see this almost immediately eg useconsolelogger().enableverboselogging()

Or try not automatically reconnecting and retrying (you will get your error on the wait then)