Couchbase sync gateway pulling issue

i am working in pure java and using sync gateway to pull and push data to server.
using this code to perform this :
URL url = new URL(“http://127.0.0.1:4984/omnibazaar”);
// URL url = new URL(“http://110.93.219.89:8091/omnibazaar”);
Replication push = db.createPushReplication(url);
Replication pull = db.createPullReplication(url);
pull.setContinuous(true);
push.setContinuous(true);
com.couchbase.lite.auth.Authenticator auth = AuthenticatorFactory.createBasicAuthenticator(“OB”, “test”);
push.setAuthenticator(auth);
pull.setAuthenticator(auth);
push.start();
pull.start();

my java code shows the following output:
Sep 08, 2015 8:19:12 PM com.couchbase.lite.util.SystemLogger e
SEVERE:
Sync: com.couchbase.lite.replicator.ReplicationInternal$4@4d506e73
checkSessionAtPath() response: {authentication_handlers=[default,
cookie], ok=true, userCtx={channels={!=1, *=1}, name=OB}}
Sep 08, 2015 8:19:12 PM com.couchbase.lite.util.SystemLogger e
SEVERE:
Sync: com.couchbase.lite.replicator.ReplicationInternal$4@4ee15284
checkSessionAtPath() response: {authentication_handlers=[default,
cookie], ok=true, userCtx={channels={!=1, *=1}, name=OB}}
Sep 08, 2015 8:19:12 PM com.couchbase.lite.util.SystemLogger w
WARNING: Sync: com.couchbase.lite.replicator.PullerInternal@22bb1eab: starting ChangeTracker with since=8 mode=OneShot
Sep 08, 2015 8:19:12 PM com.couchbase.lite.util.SystemLogger w
WARNING:
Sync: com.couchbase.lite.replicator.PullerInternal@22bb1eab: started
ChangeTracker com.couchbase.lite.replicator.ChangeTracker@2b891cf8
Sep 08, 2015 8:19:12 PM com.couchbase.lite.util.SystemLogger e
SEVERE: Sync: PullerInternal stopGraceful.run() finished

but pulling is not working.
kindly help

Hi, the pull replication will get data from Couchbase Server to your local couchbase lite instance. Can you tell us how you test this and what’s the result?

i check all the documents. after running the pull code i print all documents and check.
but the listings on server are not coming to couchbase lite db.

@zeeshan_niazi Have you solved it? I am having the same issue…

Is this issue already resolved. We are doing a feasibility study on adapting couchbase for our application. It pushes data to server with authenticated user. But it does not pull data from the server with authentication. Is it a bug in the couchbase server.

@czajkowski can you provide a link if this issue is already fixed. We need to finalize the feasibilty of couchbase to our application

Here is my config file

{
“log”:[“CRUD+”, “REST+”, “Changes+”, “Attach+”],
“databases”: {
“batch-test”: {
“server”:“http://localhost:8091/”,
“bucket”:“batch-test”,
“sync”:function (doc) { channel (doc.channels); },
“users”: {
“GUEST”: {
“disabled”: false,
“admin_channels”: [""],
“channels”:["
"]
},
“couchbase_user”: {
“disabled”: false,
“admin_channels”: [""],
“channels”:["
"] ,
“password”: “mobile”
}
}
}
},
“CORS”: {
“Origin”: [""],
“LoginOrigin”: ["
"],
“Headers”: [“Content-Type”],
“MaxAge”: 17280000
}
}

Thank you

@manura

I don’t think there was an issue ticket associated with this forum thread.

I have taken your configuration and started Sync Gateway 1.2 using it, other than a missing ‘`’ back quote around the sync function (I suspect a paste error in the forum) I have not made any modifications. I created a ‘batch-test’ Couchbase Server bucket.

I used the following curl commands to validate that basic pull replication is functioning as expected, the first starts a continuous _changes feed.

curl -X GET http://couchbase_user:mobile@localhost:4984/batch-test/_changes?feed=continuous

This will block waiting for revision changes.

The second writes a document to the batch-test database via the Public REST API

curl -X PUT http://couchbase_user:mobile@localhost:4984/batch-test/doc1 -H "Content-Type: application/json" -d ' {"foo":"bar", "channels":["channel1"]}'

The continuous _changes feed sends the new revision in it’s response:

{"seq":3,"id":"doc1","changes":[{"rev":"1-47a34151ab9957a6772684233297aaea"}]}

In your configuration if you want to force user authentication set the GUEST user property “disabled”:“true”.

You can remove the “channels”:["*"], property from both users as this is a read only field, setting it in the configuration file has no effect.

If you are using Sync Gateway 1.2 can you set your logging property to “log”:["*"] to give maximum debugging info.

If you are still experiencing issues with pull replication, can you start a new thread and provide additional information such as the Sync Gateway logs for a period where you are starting pull replications and are pushing new document revisions to the database.

That should give us more information to help you resolve this issue.

@andy

I have created a new topic for this. Need your kind attention. Thanks.