Ошибка ниже при подключении сервера CouchDB с использованием репликатора
Status{activityLevel=CONNECTING,
progress=Progress{completed=0, total=0},
error=CouchbaseLiteException{CouchbaseLite,11001,'WebSocket connection closed by peer'}}
Status{activityLevel=STOPPED,
progress=Progress{completed=0, total=0},
error=CouchbaseLiteException{CouchbaseLite,11001,'WebSocket connection closed by peer'}}
Ниже приведен мой код;
Replicator replicator = null;
try {
CouchbaseLite.init(context);
Database.setLogLevel(LogDomain.ALL, LogLevel.ERROR);
DatabaseConfiguration databaseConfiguration = new DatabaseConfiguration();
Database database = new Database("company-3", databaseConfiguration);
URLEndpoint target = new URLEndpoint(new URI("ws://*****/company-3/"));
ReplicatorConfiguration config = new ReplicatorConfiguration(database, target);
config.setAuthenticator(new BasicAuthenticator("username", "password"));
replicator = new Replicator(config);
replicator.start();
} catch (CouchbaseLiteException e) {
e.printStackTrace();
} catch (URISyntaxException e) {
e.printStackTrace();
}
Зависимость:
implementation 'com.couchbase.lite:couchbase-lite-android:2.7.0'