Exception EventStore.ClientAPI.Exceptions.CannotEstablishConnectionException

Hi, guys

We are integrating the ES in a test solution, and we are unable to start our main application, because the ES is not running. Do you have any Ideas how to handle this, so the rest of the server runs?

bei EventStore.ClientAPI.EventStoreConnection.MainLoop()

bei System.Threading.ThreadHelper.ThreadStart_Context(Object state)

bei System.Threading.ExecutionContext.runTryCode(Object userData)

bei System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)

bei System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)

bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)

bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)

bei System.Threading.ThreadHelper.ThreadStart()

Hi,

Can you describe your problem in more details?

EventStoreConnection tries to connect to the server when created, so server must be up and running at this point.

We try [maxReconnections = 10] times with some delay between each, then throw if no success.

There is a problem with that exception - we throw it from background worker thread, so you have no chance to catch it…

A callback parameter will be added to constructor soon.

You should not create EventStoreConnection if you know server is down.

Понеділок, 22 жовтня 2012 р. 15:54:04 UTC+3 користувач Ivo написав:

We might also want to look at having a connect() method that blocks on
the async connect