Replication Fails with I/O Error: Read Timed Out
search cancel

Replication Fails with I/O Error: Read Timed Out

book

Article ID: 164875

calendar_today

Updated On:

Products

Endpoint Protection

Issue/Introduction

During a scheduled replication job, errors occur in the replication logs, indicating that there was an I/O Error: Read Timed Out

In the SEPM Replication log console, the following error appears some time after replication:
 I/O Error: Read Timed Out. 

After enabled FINEST Tomcat logging per this article, ReplicationLocal-x.log reveals:
 

2017-02-28 13:47:59.323 THREAD 54 WARNING: SemLaunchService> parseServiceReturnText>> launch service return code: 0
2017-02-28 14:17:59.361 THREAD 54 WARNING: ReplicationTask>> replicateTableData: Closing db connection...
2017-02-28 14:17:59.423 THREAD 54 WARNING: ReplicationTask>> replicate: Exception...
2017-02-28 14:17:59.423 THREAD 54 WARNING: java.sql.SQLException: I/O Error: Read timed out
    at net.sourceforge.jtds.jdbc.TdsCore.executeSQL(TdsCore.java:1093)
    at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStatement.java:563)
    at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeUpdate(JtdsPreparedStatement.java:730)
    at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
    at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
    at com.sygate.scm.server.replication.table.TableMergerReplicator.processMergerProc(TableMergerReplicator.java:274)
    at com.sygate.scm.server.replication.table.TableMergerReplicator.tableMerger(TableMergerReplicator.java:221)
    at com.sygate.scm.server.replication.table.TableMergerReplicator.replicateTable(TableMergerReplicator.java:128)
    at com.sygate.scm.server.replication.ReplicationTask.replicateTableData(ReplicationTask.java:2161)
    at com.sygate.scm.server.replication.ReplicationTask.replicateTableData(ReplicationTask.java:2129)
    at com.sygate.scm.server.replication.ReplicationTask.processReplicationData(ReplicationTask.java:3139)
    at com.sygate.scm.server.replication.ReplicationTask.replicate(ReplicationTask.java:1163)
    at com.sygate.scm.server.replication.ReplicationTask.execute(ReplicationTask.java:452)
    at com.sygate.scm.server.task.MonitoredTimerTask.run(MonitoredTimerTask.java:41)
    at java.util.TimerThread.mainLoop(Timer.java:555)
    at java.util.TimerThread.run(Timer.java:505)
Caused by: java.net.SocketTimeoutException: Read timed out
    at java.net.SocketInputStream.socketRead0(Native Method)
    at java.net.SocketInputStream.read(SocketInputStream.java:152)
    at java.net.SocketInputStream.read(SocketInputStream.java:122)
    at java.io.DataInputStream.readFully(DataInputStream.java:195)
    at java.io.DataInputStream.readFully(DataInputStream.java:169)
    at net.sourceforge.jtds.jdbc.SharedSocket.readPacket(SharedSocket.java:850)
    at net.sourceforge.jtds.jdbc.SharedSocket.getNetPacket(SharedSocket.java:731)
    at net.sourceforge.jtds.jdbc.ResponseStream.getPacket(ResponseStream.java:477)
    at net.sourceforge.jtds.jdbc.ResponseStream.read(ResponseStream.java:114)
    at net.sourceforge.jtds.jdbc.ResponseStream.peek(ResponseStream.java:99)
    at net.sourceforge.jtds.jdbc.TdsCore.wait(TdsCore.java:4127)
    at net.sourceforge.jtds.jdbc.TdsCore.executeSQL(TdsCore.java:1086)
    ... 15 more
2017-02-28 14:17:59.423 THREAD 54 WARNING: ReplicationTask>> replicate: Unable to fetch changed data from remote site [Site OWNHAMP0131]: I/O Error: Read timed out
2017-02-28 14:17:59.641 THREAD 54 WARNING: ReplicationTask>> replicate: Refreshing replication task schedule...

Environment

Two or more SEPM servers which replicate data.

Cause

A thirty (30) minute default timeout value stops replication task if the SEPM connection to it's database via JDBC drops during the replication process.  This prevents a network connection issue from indefinitely hanging future replication attempts.

Resolution

Replication timeout value can be configured to meet the needs of the replication schedule.  

BEST PRACTICE: When setting the timeout value, it is recommended that this value does not exceed the time between replication schedules  For instance, if replication happens every hour, the timeout should be less then 60 minutes.

To configure the timeout value, perform the following steps:

  1. Determine the replication schedule to determine your maximum possible timeout value as noted above in "BEST PRACTICE".
  2. Stop the SEPM services on the server being modified per this document
  3. Navigate and open the following path with a text editor: "SEPM_INSTALL\tomcat\conf\Catalina\localhost\ROOT.xml"
  4. Locate the following string in ROOT.xml: 
    1. "jdbc:jtds:sqlserver://2008R2:1433/sem5;socketkeepalive=true;socketTimeout=1800"
  5. Modify socketTimeout to match the value you determined appropriate in step #1, where "socketTimeout" is the value in seconds, and default value 1800 equals 30 minutes.
  6. Start the SEPM Management Service