HI @borrrden @pasin,
I still confused of why the lite and sg often disconnect. and often lite can’t reconnect to sg.
I direct connect to server node, the lite still disconnect with sg. the android logcat haven’t any error. but the sg throw error:
2019-06-06T07:04:34.425Z [INF] WS: c:[592946d5] Error: receiveLoop exiting with WebSocket error: read tcp 172.18.0.3:4984->222.173.43.58:51929: read: connection reset by peer
2019-06-06T07:04:34.425Z [INF] WS: c:[592946d5] BLIP/Websocket Handler exited: read tcp 172.18.0.3:4984->222.173.43.58:51929: read: connection reset by peer
2019-06-06T07:04:34.425Z [INF] HTTP: c:[592946d5] #244533: → BLIP+WebSocket connection error: read tcp 172.18.0.3:4984->222.173.43.58:51929: read: connection reset by peer
2019-06-06T07:04:34.425Z [INF] HTTP: c:[592946d5] #244533: → BLIP+WebSocket connection closed
2019-06-06T07:04:34.425Z [INF] Changes: c:[592946d5] MultiChangesFeed done (to user1)
this is wireshare catch package when lite deathed then a save new document:
I find this code statement from github:
public class CouchbaseLiteHttpClientFactory implements HttpClientFactory {
private OkHttpClient client;
private ClearableCookieJar cookieJar;
private SSLSocketFactory sslSocketFactory;
private HostnameVerifier hostnameVerifier;
private boolean followRedirects = true;
// deprecated
public static int DEFAULT_SO_TIMEOUT_SECONDS = 40; // 40 sec (previously it was 5 min)
// heartbeat value 30sec + 10 sec
// OkHttp Default Timeout is 10 sec for all timeout settings
public static int DEFAULT_CONNECTION_TIMEOUT_SECONDS = 10;
public static int DEFAULT_READ_TIMEOUT = DEFAULT_SO_TIMEOUT_SECONDS;
public static int DEFAULT_WRITE_TIMEOUT = 10;
this means per 40s lite will send the heartbeat to sg ?
I use wireshark catch network package can get the handshake lite with sg via http .
but after connected, I can’t get any package from lite to sg.
Is this normal?
I use offical github todo demo. the replicator code as follows:
Endpoint endpoint = new URLEndpoint(uri);
ReplicatorConfiguration config = new ReplicatorConfiguration(database, endpoint)
.setReplicatorType(ReplicatorConfiguration.ReplicatorType.PUSH_AND_PULL)
.setContinuous(true);
sg config statement as follow:
{
“log”: [“*”],
“interface”: “:4984”,
“adminInterface”: “4985”,
“maxFileDescriptors”: 250000,
“databases”: {
“todo”: {
“server”: “couchbase://cbsEE-6.0.1”,
“bucket”: “todo”,
“username”: “todo”,
“password”: “123456”,
“enable_shared_bucket_access”: true,
“import_docs”: true,
“num_index_replicas”: 0,
“users”: {
“user1”: {“password”: “pass”, “admin_channels”: [“user1”]},
“user2”: {“password”: “pass”, “admin_channels”: [“user2”]},
“user3”: {“password”: “pass”, “admin_channels”: [“user3”]},
“mod”: {“password”: “pass”, “admin_roles”: [“moderator”]},
“admin”: {“password”: “pass”, “admin_roles”: [“admin”]}
},
“roles”: {
“moderator”: {},
“admin”: {}
},
“sync”: `
function(doc, oldDoc){
is any error?
other question is: lite version 2.5 send heartbeat to sg or sg send heartbeat to lite?
Thank you for pointing!
angular