405 return code on pull replication with Couchbase Lite 1.2

73 views
Skip to first unread message

Jordan Wood

unread,
Jan 8, 2016, 11:15:44 AM1/8/16
to Couchbase Mobile
I am attempting to move from Couchbase Lite 1.1.1 to 1.2 (pre-release).  I have included the framework and followed the instructions in the GitHub wiki to build it, but now I'm getting the following errors when I start replication:

10:03:15.046‖ Sync: CBLRestPuller[https://couchdev.browzine.com/user-ebdae0b0-a75f-11e5-a229-c18be2c872a2] Progress: set active = 1
10:03:15.050‖ Sync: CBLReplication[from https://couchdev.browzine.com/user-ebdae0b0-a75f-11e5-a229-c18be2c872a2]: active, progress = 0 / 0, err: (null)
10:03:15.267‖ CBLSocketChangeTracker[0x7ff944001990 user-ebdae0b0-a75f-11e5-a229-c18be2c872a2]: Can't connect, giving up: Error Domain=CBLHTTP Code=405 "405 method_not_allowed" UserInfo={NSURL=https://couchdev.browzine.com/user-ebdae0b0-a75f-11e5-a229-c18be2c872a2/_changes, NSLocalizedFailureReason=method_not_allowed, NSLocalizedDescription=405 method_not_allowed}
10:03:15.267‖ Sync: CBLRestPuller[https://couchdev.browzine.com/user-ebdae0b0-a75f-11e5-a229-c18be2c872a2]: ChangeTracker stopped; error=Error Domain=CBLHTTP Code=405 "405 method_not_allowed" UserInfo={NSURL=https://couchdev.browzine.com/user-ebdae0b0-a75f-11e5-a229-c18be2c872a2/_changes, NSLocalizedFailureReason=method_not_allowed, NSLocalizedDescription=405 method_not_allowed}
10:03:15.267‖ Sync: CBLRestPuller[https://couchdev.browzine.com/user-ebdae0b0-a75f-11e5-a229-c18be2c872a2] Progress: set error = 405 method_not_allowed
10:03:15.267‖ Sync: CBLRestPuller[https://couchdev.browzine.com/user-ebdae0b0-a75f-11e5-a229-c18be2c872a2] STOPPING...

This worked perviously with version 1.1.1.  Is there something else I need to do?

Jens Alfke

unread,
Jan 8, 2016, 11:25:41 AM1/8/16
to mobile-c...@googlegroups.com
The 405 is a server error. What server are you connecting to?

--Jens

Jordan Wood

unread,
Jan 8, 2016, 11:26:42 AM1/8/16
to Couchbase Mobile
Cloudant.

Jens Alfke

unread,
Jan 8, 2016, 11:36:17 AM1/8/16
to mobile-c...@googlegroups.com
Then apparently Cloudant doesn't support POST to _changes yet, unlike CouchDB and Sync Gateway. Crap.

Could you file an issue please? I can add a workaround.

Also, it'd be great if you could request to Cloudant that they support this. (The benefit of POST is that it allows arbitrary length filter parameters without running into URL length limitations.)

—Jens 
--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/0a0a54a4-2363-4fb9-926f-da173cae4a7c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jordan Wood

unread,
Jan 8, 2016, 11:53:33 AM1/8/16
to mobile-c...@googlegroups.com
I'll be filing both issues shortly.

J

--
You received this message because you are subscribed to a topic in the Google Groups "Couchbase Mobile" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mobile-couchbase/Z-45spRybG0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mobile-couchba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/D80B71B7-F44F-48AD-BB50-490710C340FE%40couchbase.com.

Jordan Wood

unread,
Jan 11, 2016, 9:17:01 AM1/11/16
to Couchbase Mobile
One caveat of the fix you applied for this, Jens, is that I will have to use a Cloudant URL, correct?  I currently am using a custom URL which doesn't have "cloudant.com" in it.  We wanted our code to be independent of who was hosting our backend.

It would be a good idea to document somewhere what form the URL has to be in order to connect to Cloudant.  Does it just have to have "cloudant" in it, or does it actually have to end in "cloudant.com"?

Jordan

Jordan Wood

unread,
Jan 13, 2016, 9:57:16 AM1/13/16
to mobile-c...@googlegroups.com
Jens, there has been some input on the your closed issue about Cloudant integration.  A Cloudant engineer gave some suggestions on how to recognize that you are replicating to Cloudant.  I don't know if you saw it, since it's a closed issue.  

I appreciate that you came up with a fix for this so quickly, but it is a bit limited and likely to cause support/maintenance headaches for both of us down the road.  Is this truly a closed issue for version 1.2, and if so, will it be addressed again for the next release?

Thanks for your time,

Jordan


--
You received this message because you are subscribed to a topic in the Google Groups "Couchbase Mobile" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mobile-couchbase/Z-45spRybG0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mobile-couchba...@googlegroups.com.

Jens Alfke

unread,
Jan 13, 2016, 1:10:41 PM1/13/16
to mobile-c...@googlegroups.com
Looks like I’ll need to revisit that, and use a better fix (i.e. detecting the 405 response and retrying without POST.)
I’ll try to get that in today.

—Jens

Jordan Wood

unread,
Jan 14, 2016, 9:07:49 AM1/14/16
to Couchbase Mobile
This is now working great for me!  Thanks Jens!

Jordan
Reply all
Reply to author
Forward
0 new messages