I then get an Authentication required
'A username and password are being requested by http://sync.couchbasecloud.com. The site says: "Couchbase Sync Gateway"'
I have tried to use my login to the couchbasecloud
(i.e. couchbasecloud.com website) with NO success.
What should I be entering in the dialog box and/or how do I setup a login for use while testing the use of sync-gateway and the couchbasecloud.
I can see the dashboard for the database when I login to the couchbasecloud website
Thanks
private static final String SYNC_URL = "http://sync.couchbasecloud.com/mydb/";
private static final String SYNC_ACCOUNT = "milt";
private static final String SYNC_PASSWORD = "milt";
URL url = new URL(SYNC_URL);
Replication push = database.createPushReplication(url);
Replication pull = database.createPullReplication(url);
Authenticator auth = new BasicAuthenticator(SYNC_ACCOUNT, SYNC_PASSWORD);
push.setAuthenticator(auth);
pull.setAuthenticator(auth);
push.start();
pull.start();
{
"interface":":4984",
"adminInterface":":4985",
"log":["REST"],
"databases":{
"mydb":{
"server":"http://localhost:8091",
"users": {"GUEST":{"disabled" :false},
"milt":{"password" : "milt"}
},
"bucket":"sync_gateway",
"sync":`function(doc) {channel(doc.channels);}`
}
}
07-15 14:00:22.328 E/RemoteRequest﹕ Got error status: 401 for org.apache.http.client.methods.HttpGet@41700d78. Reason: Unauthorized
07-15 14:00:22.335 E/RemoteRequest﹕ Got error status: 401 for org.apache.http.client.methods.HttpGet@41601420. Reason: Unauthorized
07-15 14:00:22.406 E/Sync﹕ com.couchbase.lite.replicator.Replication$4@417008d0: Session check failed
org.apache.http.client.HttpResponseException: Unauthorized
at com.couchbase.lite.support.RemoteRequest.executeRequest(RemoteRequest.java:229)
at com.couchbase.lite.support.RemoteRequest.run(RemoteRequest.java:106)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:442)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
at java.util.concurrent.FutureTask.run(FutureTask.java:137)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
at java.lang.Thread.run(Thread.java:856)
07-15 14:00:22.414 E/Sync﹕ Puller@416da910[http://sync.couchbasecloud.com/mydb/]: Progress: set error = org.apache.http.client.HttpResponseException: Unauthorized
07-15 14:00:22.476 E/Sync﹕ com.couchbase.lite.replicator.Replication$4@41615930: Session check failed
org.apache.http.client.HttpResponseException: Unauthorized
at com.couchbase.lite.support.RemoteRequest.executeRequest(RemoteRequest.java:229)
at com.couchbase.lite.support.RemoteRequest.run(RemoteRequest.java:106)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:442)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
at java.util.concurrent.FutureTask.run(FutureTask.java:137)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
at java.lang.Thread.run(Thread.java:856)
07-15 14:00:22.492 E/Sync﹕ Pusher@416d6db8[http://sync.couchbasecloud.com/mydb/]: Progress: set error = org.apache.http.client.HttpResponseException: Unauthorized
I have setup in the couchbasecloud the sync function```{
"interface":":4984",
--To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/0A06C502-365D-4CAE-B896-74AF202EA1C9%40couchbase.com.
You received this message because you are subscribed to the Google Groups "Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mobile-couchba...@googlegroups.com.