Socket read failed OR the connection was terminated and 0x80770004

Posted on July 15, 2011


The restore is being failed on a SQL Server 2008 R2 machine and the backup took from a SQL Server 2005 machine.


Veritas Netbackup Server = 7.1

Veritas Netbackup Client = 7.1

Veritas Netbackup Client Product = SQL Server 2008 R2 (on which the data is being restore)

Veritas Netbackup Client Product = SQL Server 2005 (through which the data is backed up)

Activity Monitor Parent Job

7/10/2011 1:00:58 PM – Info dbclient(pid=10148) DBMS MSG – SQL Message <11><[Microsoft][ODBC SQL Server Driver][Shared Memory]General network error. Check your network documentation.>
7/10/2011 1:00:58 PM – Info dbclient(pid=10148) ERR – Error found executing <restore database “ServerDBDotNet” from VIRTUAL_DEVICE=’VNBU0-10148-10168-1310279348′ with  stats = 10, blocksize = 65536, maxtransfersize = 4194304, buffercount = 1, replace , norecovery, move ‘ServeDnet_Data’ to ‘R:\DBDATA\ServerDBdotNet.mdf’, move ‘XYlive to ‘G:\DBDATA\ServerDBdotnet_XY_Live.NDF’, move ‘XYhs’ to ‘H:\DBDATA\ServerDBdotnet_XY_hs.NDF’, move ‘Lordms’ to ‘B:\DBDATA\ServerDBdotnet_Lordms.NDF’, move ‘ServeDnet_Log’ to ‘T:\DBDATA\ServerDBdotNet_log.ldf’, replace>.
7/10/2011 1:01:00 PM – Info dbclient(pid=10148) ERR – Error in VDS->Close: 0x80770004. 
7/10/2011 1:01:00 PM – Info dbclient(pid=10148)     CONTINUATION: – An abort request is preventing anything except termination actions.
7/10/2011 1:01:00 PM – Info dbclient(pid=10148) INF – OPERATION #1 of batch C:\Program Files\Veritas\NetBackup\DbExt\MsSql\Mig_NEW09072011.bch FAILED with STATUS 1 (0 is normal). Elapsed time = 5516(5516) seconds.
7/10/2011 1:01:03 PM – Info dbclient(pid=10148) INF – Results of executing <C:\Program Files\Veritas\NetBackup\DbExt\MsSql\Mig_NEW09072011.bch>:
7/10/2011 1:01:03 PM – Info dbclient(pid=10148) <0> operations succeeded. <1> operations failed.

Activity Monitor Child Job

7/10/2011 12:44:35 PM – Error bpbrm(pid=732) socket read failed, An existing connection was forcibly closed by the remote host.  (10054)
7/10/2011 12:44:35 PM – Info bpbrm(pid=5280) child done, status 13
7/10/2011 12:44:35 PM – Info bpbrm(pid=5280) sending media manager msg: TERMINATE        
7/10/2011 12:44:35 PM – restored image DB-Cluster_1310220261 – (file read failed(13)); restore time 01:05:49
7/10/2011 12:44:41 PM – end Restore; elapsed time: 01:15:30
invalid error number(2826)


13:01:01.916 [10148.10168] <16> writeToServer: ERR – send() to server on socket failed:

13:01:01.916 [10148.10168] <16> dbc_RemoteWriteFile: ERR – could not write progress status message to the NAME socket

13:01:01.916 [10148.10168] <16> CDBbackrec::FreeDeviceSet(): ERR – Error in VDS->Close: 0x80770004.


1.) As per the logs, it seems the connection was terminated. The socket was being forcibly closed prior to completion of data transfer. Could be a timeout issue.

There is a need to increase the Client Read Timeout value so that when the Server is heavily loaded/busy or when the SQL database backup size grown the increase in the restore timed out value saves from timeout/failure while restore.

2.)  The second thing seems (0x80770004). This issue can occur when restoring any version of Microsoft SQL server to any supported platform. The cause of the failure is believed to be a timing issue in the restore logic that leads to an occasional synchronization problem whereby bptm receives the buffers data in the incorrect sequence, thus producing the restore failure. For more reference see the below link.  To eliminate this change the NUMBUFS value (NUMBER OF BUFFERS PER STRIPE) from 2 to 1 and rerun the restore or verify.