External access for PouchDB, error on sync
Asked Answered
M

1

12

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}}
Major answered 16/8, 2017 at 15:42 Comment(7)
Please include error messages as text, rather than images. They're easier to read, and they help search engines and screen readers.Soucy
Sorry @Flimzy I'll keep that in mind for next time, 5984, sorry that was a misread beforeMajor
No need to wait until next time... you can (and should) edit this one.Soucy
I'm actually getting a different error now.. so that's fun, it's being a pigMajor
Clarifying, I edited my post to include the new errorMajor
Is there any error/warning in the javascript console of your mobile?Tasty
The first error is from the mobile @TastyMajor
F
1

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

Fighterbomber answered 28/8, 2017 at 5:56 Comment(2)
Sorry it's been so long and I haven't gotten back to you, I've been away. I'll give that a try thanks @82TuskersMajor
I'm afraid it doesn't change anything @82TuskersMajor

© 2022 - 2024 — McMap. All rights reserved.