none
Syncing and getting an System.Data.SqlClient.SqlException: A transport-level error

    Question

  • Question for the gurus out there.  I have a current scenario where I have client sql server 2008 R2 machines syncing with a sql server 2008 server on windows server 2008.

    This scenario has worked in the past, but lately when I have been doing upload syncs from the client R2 machines to the server I have been getting this error thrown from the sync orchestrator:

    System.Data.SqlClient.SqlException: A transport-level error has occurred when sending the request to the server. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.)

    I have seen this other post:

    http://social.microsoft.com/Forums/en-US/b5cb2a3d-a9aa-43c3-9717-533459f8abc5/sync-framework-and-sql-notifications

    and tried some of the other solutions it had stated:  notably going to this post with some suggestions.

    http://blogs.msdn.com/b/spike/archive/2009/04/16/a-transport-level-error-has-occurred-when-sending-the-request-to-the-server-provider-tcp-provider-error-0-an-existing-connection-was-forcibly-closed-by-the-remote-host.aspx

    None of these suggestions fixed the problem.

    The only thing that has worked so far, and this is in a test scenario, is to upgrade the server to sql server 2008 R2.  The error goes away after this.  Does anyone have any suggestions as to why the database versions have to be the same, as this seemed to work in the past.  Do both machines need to be using the same version of the native sqlClient driver?

    Anyone with some insight would be greatly appreciated?  Thanks!

    EDIT:

    Here is the call stack from the error... Thanks

       at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
       at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
       at System.Data.SqlClient.TdsParserStateObject.WriteSni()
       at System.Data.SqlClient.TdsParserStateObject.ExecuteFlush()
       at System.Data.SqlClient.TdsParser.TdsExecuteRPC(_SqlRPC[] rpcArray, Int32 timeout, Boolean inSchema, SqlNotificationRequest notificationRequest, TdsParserStateObject stateObj, Boolean isCommandProc)
       at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
       at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
       at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
       at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
       at System.Data.SqlClient.SqlCommand.ExecuteReader()
       at Microsoft.Synchronization.Data.SqlServer.SqlProviderFactory.ReadConfiguration(String scopeName)
       at Microsoft.Synchronization.Data.SqlServer.SqlProviderFactory.GetConfiguration(String scopeName)
       at Microsoft.Synchronization.Data.SqlServer.SqlSyncProvider.Configure()
       at Microsoft.Synchronization.Data.SqlServer.SqlSyncProvider.BeginSession(SyncProviderPosition position, SyncSessionContext syncSessionContext)
       at Microsoft.Synchronization.KnowledgeProviderProxy.BeginSession(SYNC_PROVIDER_ROLE providerRole, ISyncSessionState pSessionState)
       at Microsoft.Synchronization.CoreInterop.ISyncSession.Start(CONFLICT_RESOLUTION_POLICY resolutionPolicy, _SYNC_SESSION_STATISTICS& pSyncSessionStatistics)
       at Microsoft.Synchronization.KnowledgeSyncOrchestrator.DoOneWaySyncHelper(SyncIdFormatGroup sourceIdFormats, SyncIdFormatGroup destinationIdFormats, KnowledgeSyncProviderConfiguration destinationConfiguration, SyncCallbacks DestinationCallbacks, ISyncProvider sourceProxy, ISyncProvider destinationProxy, ChangeDataAdapter callbackChangeDataAdapter, SyncDataConverter conflictDataConverter, Int32& changesApplied, Int32& changesFailed)
       at Microsoft.Synchronization.KnowledgeSyncOrchestrator.DoOneWayKnowledgeSync(SyncDataConverter sourceConverter, SyncDataConverter destinationConverter, SyncProvider sourceProvider, SyncProvider destinationProvider, Int32& changesApplied, Int32& changesFailed)
       at Microsoft.Synchronization.KnowledgeSyncOrchestrator.Synchronize()
       at Microsoft.Synchronization.SyncOrchestrator.Synchronize()


    • Edited by Ricosol Friday, July 26, 2013 12:25 AM
    Thursday, July 25, 2013 5:22 PM

All replies

  • afaik, versions shouldn't matter.

    does this happen during syncs with many rows or even on small syncs?

    Friday, July 26, 2013 3:29 AM
  • After digging around the code and doing many tests... long story short... there was another process on the local machine that was specifically going out to the sql express local instance and killing all the connections.  So this is what caused the transport error in syncing because it had it's sql client connection pulled out from underneath it.  Thanks June T for the reply!
    • Proposed as answer by prem_data Tuesday, July 30, 2013 5:56 PM
    Tuesday, July 30, 2013 5:56 PM