generate Prebuild couchbase lite database

174 views
Skip to first unread message

djougue basso

unread,
May 29, 2018, 7:14:28 PM5/29/18
to Couchbase Mobile
hi,
Please i would like to know how to proceed in order to generate a prebuilt couchbase lite database from my database. I only see procedure to embeded a generated database within android project without seeing the database generation procedure.

thanks for your help.

Traun Leyden

unread,
May 30, 2018, 1:53:47 PM5/30/18
to mobile-c...@googlegroups.com
Have you seen this blog post?


I realize it's ios specific, but thought it might be helpful.  



--
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-couchbase+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/ca64235c-d09c-4919-8033-fa75eac18787%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Priya Rajagopal

unread,
May 30, 2018, 5:58:56 PM5/30/18
to Couchbase Mobile
how to proceed in order to generate a prebuilt couchbase lite database from my database.
What is the "database"  in the "from my database". What is your database source?

djougue basso

unread,
May 30, 2018, 8:25:18 PM5/30/18
to Couchbase Mobile
"My database" is the one hosted by the couchbase server. So i would i would like To bundle it within mobile application (couchbase lite). If you follow for instance travel-sample project, you will remark that there is a pre built database (travel-sample.cblite2.zip). i would like To know how they have generated that.

Priya Rajagopal

unread,
May 30, 2018, 9:36:34 PM5/30/18
to Couchbase Mobile
I generated the travel-sample.cblite2 by simply pull syncing the relevant files to a CBL enabled app via the SGW. I located the cblite file and copied it over for future use. 

djougue basso

unread,
May 30, 2018, 9:41:20 PM5/30/18
to Couchbase Mobile
what is SGW please?

Priya Rajagopal

unread,
May 30, 2018, 9:45:46 PM5/30/18
to Couchbase Mobile

Rupesh Sasne

unread,
Oct 13, 2018, 6:14:09 AM10/13/18
to Couchbase Mobile
app means the iOS/Android app, right?

we are currently using cblite 1.4.1 & migrating to 2.1.0; according to the documentation 2.x SDK supports mobile only. Is there any way by which we can generate pre-built database file via command line application (non-mobile)?

Priya Rajagopal

unread,
Oct 13, 2018, 12:11:51 PM10/13/18
to mobile-c...@googlegroups.com

Priya 
Sent from my iPhone
--
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/880f0afd-2a77-4652-87e9-298833ea6e68%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Rupesh Sasne

unread,
Oct 15, 2018, 6:28:19 AM10/15/18
to Couchbase Mobile
Thanks..!!

So, I built cblite tool and using it for my intended purpose (using travel-sample)

./cblite cp ws://localhost:4984/travel-sample ~/Development/couchbase/travel-prebuilt.cblite2


but it is failing as it needs credentials;

...


15:47:10.640818| [WS] WARNING: {C4SocketImpl#1}==> litecore::repl::C4SocketImpl ws://localhost:4984/travel-sample/_blipsync @0x7f93ae9040a0


15:47:10.641081| [WS] WARNING: {C4SocketImpl#1} WebSocket closed abnormally with status 401


15:47:10.641229| [Sync] ERROR: {Repl#1}==> litecore::repl::Replicator /Users/rupesh.sasne/Development/couchbase/travel-prebuilt.cblite2/ ->ws://localhost:4984/travel-sample/_blipsync @0x7f93ae903d68


15:47:10.641260| [Sync] ERROR: {Repl#1} Got LiteCore error: WebSocket error 401 "Unexpected response status 401 Unauthorized"


Completed 0 docs in 0.313241 secs; 0 docs/sec


How do I pass on the credentials?

Also, when I used it in our production environment the command is failing with the message

[Sync] ERROR: {Repl#1} Got LiteCore error: LiteCore error 26 "SSL is not initialized"


I'm not getting what does that mean, besides our production sync-gateway is working perfectly with couchbase 2.1.0 mobile-sdk.

Could you please help me here?

Jens Alfke

unread,
Oct 15, 2018, 11:49:05 AM10/15/18
to Couchbase Mobile


On Oct 15, 2018, at 3:28 AM, Rupesh Sasne <rupes...@gmail.com> wrote:

How do I pass on the credentials?

I don’t think there’s currently a way to do that in the cblite tool. You could work around this by connecting to the admin port of Sync Gateway if that’s accessible.

[Sync] ERROR: {Repl#1} Got LiteCore error: LiteCore error 26 "SSL is not initialized”

The cblite tool doesn’t support SSL. (Ordinarily HTTP is provided by the platform-specific code in Couchbase Lite, but the cblite tool has none, so instead there’s a lightweight HTTP layer [civetweb] linked into it. Unfortunately adding SSL support for that introduces some significant build complexities, so we left it out.)

—Jens

Jens Alfke — Mobile Architect — Couchbase, Inc.

Rupesh Sasne

unread,
Oct 15, 2018, 11:55:34 AM10/15/18
to Couchbase Mobile
so, there is no direct way by which we can generate pre-built database file via command line application (non-mobile)?

Jens Alfke

unread,
Oct 15, 2018, 11:58:26 AM10/15/18
to Couchbase Mobile


On Oct 15, 2018, at 8:55 AM, Rupesh Sasne <rupes...@gmail.com> wrote:

so, there is no direct way by which we can generate pre-built database file via command line application (non-mobile)?

You can build a command-line app using Couchbase Lite for MacOS, or for .NET.

Virendra Patil

unread,
Oct 16, 2018, 1:00:42 PM10/16/18
to Couchbase Mobile
I have used cblite tool, trying to create preload db for travel-sample app but  getting an error  WebSocket error 401 "Unexpected response status 401 Unauthorized",  How can I pass credentials?

Dylan Wilson

unread,
Oct 17, 2018, 4:31:12 PM10/17/18
to Couchbase Mobile
It would be super helpful to be able to pick a few channels to pull if credentials aren't possible.  

Jens Alfke

unread,
Oct 17, 2018, 8:04:28 PM10/17/18
to mobile-c...@googlegroups.com
just added support for credentials — there’s a “--user” flag for “cblite cp” now.

—Jens
Reply all
Reply to author
Forward
0 new messages