PouchDB的外部访问,同步错误

时间:2017-08-16 15:42:36

标签: javascript couchdb pouchdb phonegap

我正在创建一个从本地CouchDB中提取数据的应用。但是,当我将远程数据库URL从localhost:5984更改为我的ip:5984以便我可以从我的移动设备进行测试时,从远程设备同步时出现以下错误

{"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}}

我已经设置了CORS,将我的httpd绑定地址设置为0.0.0.0,我的内容安全策略设置为允许几乎所有内容,我觉得有点丢失如何解决这个问题,因为谷歌搜索已经命中对我来说只有死路一条。谢谢你的帮助。

当我尝试远程同步到任何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"

编辑:通过我尝试的所有更改和修复,重新创建系统数据库,用户,重新安装以及客户端控制台错误稍有改变的各种其他内容。 CouchDB日志是相同的。这是最新的错误

{"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}}

1 个答案:

答案 0 :(得分:1)

您是否尝试过使用https代替http?它在这篇文章中解释过。 Couchdb sync access with userid and password