Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I use HTTPS replication with iOS Couchbase Mobile?

I'm using iOS Couchbase Mobile to have a couchdb server on an iPad that uses replication to sync with a server on https://cloudant.com. cloudant uses HTTPS, and when I try replicating on the iPad, i just get spammed by errors.

This is a known issue, as seen on this FAQ article. It recommends using 1.0.2 to fix the issue, but how do i know if I'm running it on Erlang R14?

Version Info

  • On myserver.cloudant.com: {"couchdb":"Welcome","version":"1.0.2","cloudant_build":"1.3.49"}
  • On iOS Couchbase Mobile: {"couchdb":"Welcome","version":"2.0.0-beta"}

(For some reason it says I'm using 2.0.0-beta on iOS, even though I downloaded this version (2.0.1).)

Here's the kind of error that I get:

[info] [<0.327.0>] Retrying HEAD request to https://user:[email protected]/mydb/ in 16.0 seconds due to error {'EXIT',
{no_ssl_server,
    {gen_server,call,
        [<0.347.0>,
         {send_req,
             {{url,
                  "https://user:[email protected]/mydb/",
                  "mycompany.cloudant.com",443,"mycompany","password",
                  "/mydb/",https,hostname},
              [{"Accept","application/json"},
               {"User-Agent","CouchDB/2.0.0-beta"}],
              head,<<>>,
              [{response_format,binary},
               {inactivity_timeout,30000},
               {is_ssl,true},
               {socket_options,[{keepalive,true},{nodelay,false}]},
               {ssl_options,[{depth,3},{verify,verify_none}]}],
              infinity}},
         infinity]}}}
like image 785
Louis Boux Avatar asked May 09 '12 17:05

Louis Boux


2 Answers

The issue of enabling https connection between CouchBase Mobile for iOS and another CouchDB/CouchBase instance is also discussed here: https://groups.google.com/d/msg/mobile-couchbase/DDHSisVWEyo/hxtlVRhQtwkJ

Apparently it can be done.

like image 106
marius Avatar answered Sep 21 '22 14:09

marius


I've found a "nightly build" that enables SSL support in CouchBase Mobile for iOS, but it was never QA'd and it never got released in a "stable build". I have contacted someone who was working on Couchbase Mobile for iOS, and he told me that I should use TouchDB instead.

like image 26
Louis Boux Avatar answered Sep 21 '22 14:09

Louis Boux