Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

External access for PouchDB, error on sync

I'm creating an app which is pulling data down from a local CouchDB. However when I change the remote db url from localhost:5984 to my ip :5984 so that I can test from my mobile I get the following error when I sync from a remote device

{"status":0,"name":"unknown","message":"getCheckpoint rejected with ","result":{"ok":false,"start_time":"2017-08-17T11:14:48.510Z","docs_read":0,"docs_written":0,"doc_write_failures":0,"errors":[],"status":"aborting","end_time":"2017-08-17T11:14:56.314Z","last_seq":0}}

I've set up CORS, set my httpd bind address to 0.0.0.0, my content security policy is set up to allow almost everything, I feel a bit lost as to how to fix this issue as googling has hit only dead ends for me. Thanks for any help guys.

I get the following in the server log when I try to remotely sync to any db:

2017-08-22T10:59:12.194000Z couchdb@localhost <0.52.0> -------- alarm_handler: {clear,system_memory_high_watermark}
[info] 2017-08-22T10:59:26.074000Z couchdb@localhost <0.26330.0> -------- Opening index for db: shards/80000000-9fffffff/_replicator.1503391828 idx: _design/_replicator sig: "3e823c2a4383ac0c18d4e574135a5b08"

Edit: with all of the changes and fixes I've been trying, recreating system databases, users, reinstalls and a variety of other stuff the client console error has changed slightly. The CouchDB logs are the same. Here is the newest error

{"code":"ETIMEDOUT","status":0,"result":{"ok":false,"start_time":"2017-09-04T09:19:26.309Z","docs_read":0,"docs_written":0,"doc_write_failures":0,"errors":[],"status":"aborting","end_time":"2017-09-04T09:19:36.326Z","last_seq":0}}
like image 863
Shardj Avatar asked Aug 16 '17 15:08

Shardj


1 Answers

Have you tried using https instead of http ? Its explained here in this post. Couchdb sync access with userid and password

like image 91
trk Avatar answered Oct 05 '22 05:10

trk