I have encountered the following exceptions in different instances with the same scenario:
executeRequest() Exception: java.net.SocketException: Socket closed.
executeRequest() Exception: java.io.IOException: Canceled.
executeRequest() Exception: java.io.InterruptedIOException: thread interrupted
Steps:
- Created user in SG
- Open user session in SG via REST API
_session
- Trigger sync replication (push and pull)
The following shows a snippet of my sync replication method:
if (mPull == null) {
mPull = database.createPullReplication(getReplicationUrl());
mPull.setContinuous(true);
mPull.setAuthenticator(getAuthenticator()); // basic authentication with username and password
mPull.addChangeListener(mPullReplicationListener);
mPull.setChannels(syncAuthModel.channels);
}
if (mPush == null) {
mPush = database.createPushReplication(getReplicationUrl());
mPush.setContinuous(true);
mPush.setAuthenticator(getAuthenticator());
mPush.addChangeListener(mPushReplicationListener);
mPush.setChannels(syncAuthModel.channels);
}
mPull.stop();
mPull.start();
mPush.stop();
mPush.start();
I can access the server via sync admin and console so I am sure the URLs are correct. I am also sure that the user used in authentication is valid.
Thanks for your help on this.