Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_replicate between 2 dbs on same LiteServ fails #1292

Closed
sethrosetter opened this issue Jun 14, 2016 · 1 comment
Closed

_replicate between 2 dbs on same LiteServ fails #1292

sethrosetter opened this issue Jun 14, 2016 · 1 comment

Comments

@sethrosetter
Copy link
Contributor


  • Version: N/A
  • Client OS: LiteServ 1.3.0-20
  • Server: N/A

Steps to reproduce

~ » http PUT http://localhost:59840/db1
HTTP/1.1 201 Created
Accept-Ranges: bytes
Content-Length: 11
Content-Type: application/json
Date: Tue, 14 Jun 2016 23:16:15 GMT
Location: http://localhost:59840/db1
Server: CouchbaseLite 1.3.0 (build 20)

{
    "ok": true
}
~ » http PUT http://localhost:59840/db2
HTTP/1.1 201 Created
Accept-Ranges: bytes
Content-Length: 11
Content-Type: application/json
Date: Tue, 14 Jun 2016 23:16:18 GMT
Location: http://localhost:59840/db2
Server: CouchbaseLite 1.3.0 (build 20)

{
    "ok": true
}
~ » http POST http://localhost:59840/db1/ _id=doc_1
HTTP/1.1 201 Created
Accept-Ranges: bytes
Content-Type: application/json
Date: Tue, 14 Jun 2016 23:20:34 GMT
Etag: "1-ca9ad22802b66f662ff171f226211d5c"
Location: http://localhost:59840/db1/doc_1
Server: CouchbaseLite 1.3.0 (build 20)
Transfer-Encoding: chunked

{
    "id": "doc_1",
    "ok": true,
    "rev": "1-ca9ad22802b66f662ff171f226211d5c"
}
~ » http POST http://localhost:59840/db2/ _id=doc_2
HTTP/1.1 201 Created
Accept-Ranges: bytes
Content-Type: application/json
Date: Tue, 14 Jun 2016 23:20:45 GMT
Etag: "1-ca9ad22802b66f662ff171f226211d5c"
Location: http://localhost:59840/db2/doc_2
Server: CouchbaseLite 1.3.0 (build 20)
Transfer-Encoding: chunked

{
    "id": "doc_2",
    "ok": true,
    "rev": "1-ca9ad22802b66f662ff171f226211d5c"
}
~ » http POST http://localhost:59840/_replicate \
target=db1 \
source=db2

There is a 500 internal server error

HTTP/1.1 500 Internal Server Error
Accept-Ranges: bytes
Date: Tue, 14 Jun 2016 23:22:51 GMT
Server: CouchbaseLite 1.3.0 (build 20)
Transfer-Encoding: chunked

{"session_id":"repl001"}

This works with 1.2.1-13

~ » http POST http://localhost:59840/_replicate \
target=db1 \
source=db2
HTTP/1.1 200 OK
Accept-Ranges: bytes
Date: Tue, 14 Jun 2016 23:34:43 GMT
Server: CouchbaseLite 1.2.1 (build 13)
Transfer-Encoding: chunked

{"session_id":"repl001","ok":true}
@sethrosetter sethrosetter changed the title Docs on 2 dbs on the the same LiteServ fail to replicate _replicate between 2 dbs on same LiteServ fail Jun 14, 2016
@sethrosetter sethrosetter changed the title _replicate between 2 dbs on same LiteServ fail _replicate between 2 dbs on same LiteServ fails Jun 14, 2016
snej added a commit that referenced this issue Jun 15, 2016
…asks

If a one-shot replication fails, you now get full info in the response
body, instead of just a "500 Internal Server Error" status.

For #1292
snej added a commit that referenced this issue Jun 15, 2016
Regression from the conversion to NSURLSession. The CBL_URLProtocol has
to be explicitly registered with the session. This restores the ability
of the replicator to reach URLs served by the router.

Fixes #1292
@snej
Copy link
Contributor

snej commented Jun 16, 2016

Merged to dev branch; closing.

@snej snej closed this as completed Jun 16, 2016
@snej snej added this to the 1.3 milestone Jul 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants