Open chrisekelley opened 6 years ago
I think this was a bug in CouchDB that is now fixed.
I just hit this, doesn't appear to be fixed
Getting...
session_request_failed
replication_auth_error
{conn_failed,{error,nxdomain}}
I think this was a bug in CouchDB that is now fixed.
it seems issue is still there i am still getting this error:
{
"error": "nxdomain",
"reason": "could not resolve http://any:5984/mydb/"
}
Apache CouchDB: v. 2.3.1
Hi @jamesmfriedman and @Aftabalamrana: Thanks for chiming in on this issue. What is the CouchDB versions of both the source and destination CouchDB installations?
couchDB 2.3.1 (using in docker) i want to copy data from one database to another database for backup purpose (on local machine)
I think I understand. Just to confirm, you are trying to replicate between databases on the same CouchDB installation? If so, try having the CouchDB installation address itself at http://localhost:5984
as opposed to http://any:5984
.
Also, I'm not familiar with the http://any
convention as a loopback address, is that something you added to your /etc/hosts
file on your host machine?
Example:
I think i am missing something here
curl -X POST \
http://comhar:pwd@127.0.0.1:32816/_replicate \
-H 'Accept: application/json' \
-H 'Accept-Encoding: gzip, deflate' \
-H 'Authorization: Basic Y29taGFyOmNvdWNoZGIxOTU5MzUxYS04NDA0LTRiODgtOTNlNC04ZDhmNTQ4NjNlY2I=' \
-H 'Cache-Control: no-cache' \
-H 'Connection: keep-alive' \
-H 'Content-Length: 198' \
-H 'Content-Type: application/json' \
-H 'Host: 127.0.0.1:32816' \
-H 'Postman-Token: 6af44c5f-6193-498f-9b12-e7620c4aba82,b176a21d-33ef-4f2d-9d1e-4db6c6caf170' \
-H 'User-Agent: PostmanRuntime/7.16.3' \
-H 'cache-control: no-cache' \
-d '{
"source": "http://comhar:pwd@127.0.0.1:32816/source",
"target": "http://comhar:pwd@127.0.0.1:32816/target"
}'
got following response with status code 500:
{
"error": "replication_auth_error",
"reason": "{session_request_failed,\"http://127.0.0.1:32816/_session\",\"comhar\",\n {conn_failed,{error,econnrefused}}}"
}
Tried UI as well though i want it using api only
From inside the container created using the installation process for Tangerine outlined here, the port to address CouchDB is 5984
as opposed to 32816
. That's strange that using the UI would fail there.
@Aftabalamrana Is this a CouchDB installation you are hoping to use as the database for a Tangerine installation?
i mapped port 5984 to 32816 in docker compose couchdb is available at localhost:32816 and both source and target dbs
We don't currently use Docker Compose to start Tangerine. Are you trying to use CouchDB with Tangerine? If so, give the scripts we wrote a try as detailed in our documentation.
Tangerine
no i am not using Tangerine
I think you are looking for the CouchDB issue queue :) . https://github.com/apache/couchdb
I hit this same issue again this weekend!
root@70abfedfee92:/# curl -X POST http://admin:password@127.0.0.1:5984/_replicate -d '{"source":"group-8575d794-c3fc-45b8-ac1c-f335f1584e82", "target":"http://admin:password@127.0.0.1:5984/group-58093841-eaeb-4e51-8675-29757d71fd35", "doc_ids": [ "_design/shared_conflicts" ]}' -H "Content-Type: application/json"
{"error":"replication_auth_error","reason":"{session_request_failed,\"http://any:5984/_session\",\"admin\",\n {conn_failed,{error,nxdomain}}}"}
Removing doc_ids let it pass, but did not replicate the _design docs:
root@70abfedfee92:/# curl -X POST http://admin:password@127.0.0.1:5984/_replicate -d '{"source":"http://admin:password@localhost:5984/group-8575d794-c3fc-45b8-ac1c-f335f1584e82", "target":"http://admin:password@127.0.0.1:5984/group-58093841-eaeb-4e51-8675-29757d71fd35"}' -H "Content-Type: application/json"
{"ok":true,"no_changes":true,"session_id":"52a5e1253c8ba70d9a628771e1c09fa0","source_last_seq":"6-g1AAAAIXeJyV0UEOgjAQBdAKJurCM-gRWkBaVnITnWZKkGC7UNd6E72J3kRvgsWaIBoS3EyTSf9Lf1oSQsa5j2SqjTaoUm1ys9uXdu0BkbOqqorch8HWLkYYByAp_77cEZdzO-WyJYTRIsg47SuktbB6C8QJCcooZkgmB40q22iFXel1nT620oktoBjvkdZDO8nJHhY4Nw04hIxy0bOBUy5OudaK91IEQgig_lJuTrk3bRRXAmjQu83DCZ8_miEK9vOO4gmSVKMD","replication_id_version":4,"history":[{"session_id":"52a5e1253c8ba70d9a628771e1c09fa0","start_time":"Sat, 08 Feb 2020 01:09:01 GMT","end_time":"Sat, 08 Feb 2020 01:09:04 GMT","start_last_seq":0,"end_last_seq":"6-g1AAAAIXeJyV0UEOgjAQBdAKJurCM-gRWkBaVnITnWZKkGC7UNd6E72J3kRvgsWaIBoS3EyTSf9Lf1oSQsa5j2SqjTaoUm1ys9uXdu0BkbOqqorch8HWLkYYByAp_77cEZdzO-WyJYTRIsg47SuktbB6C8QJCcooZkgmB40q22iFXel1nT620oktoBjvkdZDO8nJHhY4Nw04hIxy0bOBUy5OudaK91IEQgig_lJuTrk3bRRXAmjQu83DCZ8_miEK9vOO4gmSVKMD","recorded_seq":"6-g1AAAAIXeJyV0UEOgjAQBdAKJurCM-gRWkBaVnITnWZKkGC7UNd6E72J3kRvgsWaIBoS3EyTSf9Lf1oSQsa5j2SqjTaoUm1ys9uXdu0BkbOqqorch8HWLkYYByAp_77cEZdzO-WyJYTRIsg47SuktbB6C8QJCcooZkgmB40q22iFXel1nT620oktoBjvkdZDO8nJHhY4Nw04hIxy0bOBUy5OudaK91IEQgig_lJuTrk3bRRXAmjQu83DCZ8_miEK9vOO4gmSVKMD","missing_checked":6,"missing_found":0,"docs_read":0,"docs_written":0,"doc_write_failures":0}]}
I also got the mysterious "any" ip:
root@70abfedfee92:/# curl -X POST http://admin:password@127.0.0.1:5984/_replicate -d '{"source":"group-8575d794-c3fc-45b8-ac1c-f335f1584e82", "target":"http://admin:password@127.0.0.1:5984/group-58093841-eaeb-4e51-8675-29757d71fd35", "doc_ids": [ "_design/shared_conflicts" ]}' -H "Content-Type: application/json"
{"error":"replication_auth_error","reason":"{session_request_failed,\"http://any:5984/_session\",\"admin\",\n {conn_failed,{error,nxdomain}}}"}
We may have been hitting some various Couchdb 2.0 issues, which may be ameliorated in Couchdb 3.0, which was recently released. Here is an issue that may be related: https://github.com/apache/couchdb/issues/2440
I am hitting this same issue several times lately, I have same docker instace of couchdb installed on several raspberry pi devices, each should be replicating to a master db hosted at IBM, however it works pretty well in most devices but fails in a few
Error: {session_request_failed,"https://xxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxx-bluemix.cloudantnosqldb.appdomain.cloud/_session", "a24a020c-fcf1-48ad-b253-68fcb8750371-bluemix", {conn_failed,{error,nxdomain}}}
'xx-xxx-xxx' being my identifier at ibm cloudant
I'm trying to do some debugging of the reporting app and would like to replicate some docs from an external database. The remote db is running Couchdb 2.2. When I run the following command:
I get the following error:
I followed the advice in this couchdb issue report - https://github.com/apache/couchdb/issues/1550 -
After rebooting the couchdb docker instance, I got some other errors:
The solution was to docker exec into the couchdb instance and run the curl command from there.