You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by "Chung, Yang" <Ya...@spirent.com> on 2013/09/07 03:18:32 UTC
Replication through proxy does not work?
Hey guys,
I've been trying to replicate certain database from external source to local destination using proxy, and it keeps failing with the following error message.
{"error":"db_not_found","reason":"could not open [EXTERNAL SOURCE COUCHDB]"}
It works fine, though, if I remove "proxy" key.
{"ok":true,"no_chagne":…..}
I am making a POST request to 'http://localhost:5984/_replicate' with the following JSON data.
{
"source":[EXTERNAL SOURCE],
"target":"http://admin_user:admin_password@127.0.0.1:5984/my_test",
"create_target":false,
"continuous":false,
"doc_ids":["id1", "id2"],
"proxy":[PROXY ADDRESS:PORT]
}
Is there known bug for replicating via proxy? Or can it be a configuration issue on my proxy server?
Any help would be much appreciated.
Thank you!
E-mail confidentiality.
--------------------------------
This e-mail contains confidential and / or privileged information belonging to Spirent Communications plc, its affiliates and / or subsidiaries. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution and / or the taking of any action based upon reliance on the contents of this transmission is strictly forbidden. If you have received this message in error please notify the sender by return e-mail and delete it from your system.
Spirent Communications plc
Northwood Park, Gatwick Road, Crawley, West Sussex, RH10 9XN, United Kingdom.
Tel No. +44 (0) 1293 767676
Fax No. +44 (0) 1293 767677
Registered in England Number 470893
Registered at Northwood Park, Gatwick Road, Crawley, West Sussex, RH10 9XN, United Kingdom.
Or if within the US,
Spirent Communications,
26750 Agoura Road, Calabasas, CA, 91302, USA.
Tel No. 1-818-676- 2300
Re: Replication through proxy does not work?
Posted by "Chung, Yang" <Ya...@spirent.com>.
Hey guys,
I tried to simplify the issue by allowing all in ACL, and this time the issue was with internal target CouchDB at localhost. I had the same 'db not found' error for target db at localhost.
So, I configured http_access deny localhost set on Squid, but the same error.
Finally, I changed to bind_address of CouchDB to 0.0.0.0, and changed the ip address of target to actual IP address (not localhost), and it worked.
It seems like using proxy uses proxy server even for request to localhost. I think it should be changed such that it doesn't forward the request to proxy server when the target or dest IP address is localhost.
-Yang
From: Franck Eyraud <fr...@yrnm.net>>
Date: Sunday, September 8, 2013 2:09 AM
To: "user@couchdb.apache.org<ma...@couchdb.apache.org>" <us...@couchdb.apache.org>>, Yang Chung <ya...@spirent.com>>
Subject: Re: Replication through proxy does not work?
Ho Chung,
Doesn't couchdb try to access 127.0.0.1<http://127.0.0.1> using the proxy?
I learnt that to access the local DB as admin, it is better to use the user_ctx key, you don't have to give the password in clear text in the replicator document.
Franck
"Chung, Yang" <Ya...@spirent.com>> wrote:
Hey guys,
I've been trying to replicate certain database from external source to local destination using proxy, and it keeps failing with the following error message.
{"error":"db_not_found","reason":"could not open [EXTERNAL SOURCE COUCHDB]"}
It works fine, though, if I remove "proxy" key.
{"ok":true,"no_chagne":…..}
I am making a POST request to 'http://localhost:5984/_replicate' with the following JSON data.
{
"source":[EXTERNAL SOURCE],
"target":"http://admin_user:admin_password@127.0.0.1:5984/my_test",
"create_target":false,
"continuous":false,
"doc_ids":["id1", "id2"],
"proxy":[PROXY ADDRESS:PORT]
}
Is there known bug for replicating via proxy? Or can it be a configuration issue on my proxy server?
Any help would be much appreciated.
Thank you!
E-mail confidentiality.
________________________________
This e-mail contains confidential and / or privileged information belonging to Spirent Communications plc, its affiliates and / or subsidiaries. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution and / or the taking of any action based upon reliance on the contents of this transmission is strictly forbidden. If you have received this message in error please notify the sender by return e-mail and delete it from your system.
Spirent Communications plc
Northwood Park, Gatwick Road, Crawley, West Sussex, RH10 9XN, United Kingdom.
Tel No. +44 (0) 1293 767676
Fax No. +44 (0) 1293 767677
Registered in England Number 470893
Registered at Northwood Park, Gatwick Road, Crawley, West Sussex, RH10 9XN, United Kingdom.
Or if within the US,
Spirent Communications,
26750 Agoura Road, Calabasas, CA, 91302, USA.
Tel No. 1-818-676- 2300
Re: Replication through proxy does not work?
Posted by Franck Eyraud <fr...@yrnm.net>.
Ho Chung,
Doesn't couchdb try to access 127.0.0.1 using the proxy?
I learnt that to access the local DB as admin, it is better to use the user_ctx key, you don't have to give the password in clear text in the replicator document.
Franck
"Chung, Yang" <Ya...@spirent.com> wrote:
>Hey guys,
>
>I've been trying to replicate certain database from external source to
>local destination using proxy, and it keeps failing with the following
>error message.
>
>{"error":"db_not_found","reason":"could not open [EXTERNAL SOURCE
>COUCHDB]"}
>
>It works fine, though, if I remove "proxy" key.
>
>{"ok":true,"no_chagne":…..}
>
>I am making a POST request to 'http://localhost:5984/_replicate' with
>the following JSON data.
>
>{
> "source":[EXTERNAL SOURCE],
> "target":"http://admin_user:admin_password@127.0.0.1:5984/my_test",
> "create_target":false,
> "continuous":false,
> "doc_ids":["id1", "id2"],
> "proxy":[PROXY ADDRESS:PORT]
>}
>
>Is there known bug for replicating via proxy? Or can it be a
>configuration issue on my proxy server?
>
>Any help would be much appreciated.
>
>Thank you!
>E-mail confidentiality.
>--------------------------------
>This e-mail contains confidential and / or privileged information
>belonging to Spirent Communications plc, its affiliates and / or
>subsidiaries. If you are not the intended recipient, you are hereby
>notified that any disclosure, copying, distribution and / or the taking
>of any action based upon reliance on the contents of this transmission
>is strictly forbidden. If you have received this message in error
>please notify the sender by return e-mail and delete it from your
>system.
>
>Spirent Communications plc
>Northwood Park, Gatwick Road, Crawley, West Sussex, RH10 9XN, United
>Kingdom.
>Tel No. +44 (0) 1293 767676
>Fax No. +44 (0) 1293 767677
>
>Registered in England Number 470893
>Registered at Northwood Park, Gatwick Road, Crawley, West Sussex, RH10
>9XN, United Kingdom.
>
>Or if within the US,
>
>Spirent Communications,
>26750 Agoura Road, Calabasas, CA, 91302, USA.
>Tel No. 1-818-676- 2300
Re: Replication through proxy does not work?
Posted by Robert Newson <rn...@apache.org>.
Hi,
I just set up squid and replicated through it successfully;
curl localhost:5984/_replicate -Hcontent-type:application/json -d
'{"source":"http://127.0.0.1:5984/db1","target":"http://127.0.0.1:5984/db2","proxy":"http://127.0.0.1:3128","create_target":true}'
So, perhaps you just have a typo in one of the three urls in there?
B.
On 7 September 2013 20:44, Chung, Yang <Ya...@spirent.com> wrote:
> I am using 'squid' on Ubuntu… So, I suppose it's mis-configured access list.
>
> I am new to the proxy world. Does CouchDB replication through proxy require certain configuration on squid or any proxy server?
>
> Thanks,
>
> -Yang
>
> From: Robert Newson <rn...@apache.org>>
> Reply-To: "user@couchdb.apache.org<ma...@couchdb.apache.org>" <us...@couchdb.apache.org>>
> Date: Saturday, September 7, 2013 9:25 AM
> To: "user@couchdb.apache.org<ma...@couchdb.apache.org>" <us...@couchdb.apache.org>>
> Subject: Re: Replication through proxy does not work?
>
> Hi,
>
> Replicating through a proxy should be working just fine, more likely
> it's a problem with the proxy itself. What are you using?
>
> B.
>
>
> On 7 September 2013 02:18, Chung, Yang <Ya...@spirent.com>> wrote:
> Hey guys,
>
> I've been trying to replicate certain database from external source to local destination using proxy, and it keeps failing with the following error message.
>
> {"error":"db_not_found","reason":"could not open [EXTERNAL SOURCE COUCHDB]"}
>
> It works fine, though, if I remove "proxy" key.
>
> {"ok":true,"no_chagne":…..}
>
> I am making a POST request to 'http://localhost:5984/_replicate' with the following JSON data.
>
> {
> "source":[EXTERNAL SOURCE],
> "target":"http://admin_user:admin_password@127.0.0.1:5984/my_test",
> "create_target":false,
> "continuous":false,
> "doc_ids":["id1", "id2"],
> "proxy":[PROXY ADDRESS:PORT]
> }
>
> Is there known bug for replicating via proxy? Or can it be a configuration issue on my proxy server?
>
> Any help would be much appreciated.
>
> Thank you!
> E-mail confidentiality.
> --------------------------------
> This e-mail contains confidential and / or privileged information belonging to Spirent Communications plc, its affiliates and / or subsidiaries. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution and / or the taking of any action based upon reliance on the contents of this transmission is strictly forbidden. If you have received this message in error please notify the sender by return e-mail and delete it from your system.
>
> Spirent Communications plc
> Northwood Park, Gatwick Road, Crawley, West Sussex, RH10 9XN, United Kingdom.
> Tel No. +44 (0) 1293 767676
> Fax No. +44 (0) 1293 767677
>
> Registered in England Number 470893
> Registered at Northwood Park, Gatwick Road, Crawley, West Sussex, RH10 9XN, United Kingdom.
>
> Or if within the US,
>
> Spirent Communications,
> 26750 Agoura Road, Calabasas, CA, 91302, USA.
> Tel No. 1-818-676- 2300
>
Re: Replication through proxy does not work?
Posted by "Chung, Yang" <Ya...@spirent.com>.
I am using 'squid' on Ubuntu… So, I suppose it's mis-configured access list.
I am new to the proxy world. Does CouchDB replication through proxy require certain configuration on squid or any proxy server?
Thanks,
-Yang
From: Robert Newson <rn...@apache.org>>
Reply-To: "user@couchdb.apache.org<ma...@couchdb.apache.org>" <us...@couchdb.apache.org>>
Date: Saturday, September 7, 2013 9:25 AM
To: "user@couchdb.apache.org<ma...@couchdb.apache.org>" <us...@couchdb.apache.org>>
Subject: Re: Replication through proxy does not work?
Hi,
Replicating through a proxy should be working just fine, more likely
it's a problem with the proxy itself. What are you using?
B.
On 7 September 2013 02:18, Chung, Yang <Ya...@spirent.com>> wrote:
Hey guys,
I've been trying to replicate certain database from external source to local destination using proxy, and it keeps failing with the following error message.
{"error":"db_not_found","reason":"could not open [EXTERNAL SOURCE COUCHDB]"}
It works fine, though, if I remove "proxy" key.
{"ok":true,"no_chagne":…..}
I am making a POST request to 'http://localhost:5984/_replicate' with the following JSON data.
{
"source":[EXTERNAL SOURCE],
"target":"http://admin_user:admin_password@127.0.0.1:5984/my_test",
"create_target":false,
"continuous":false,
"doc_ids":["id1", "id2"],
"proxy":[PROXY ADDRESS:PORT]
}
Is there known bug for replicating via proxy? Or can it be a configuration issue on my proxy server?
Any help would be much appreciated.
Thank you!
E-mail confidentiality.
--------------------------------
This e-mail contains confidential and / or privileged information belonging to Spirent Communications plc, its affiliates and / or subsidiaries. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution and / or the taking of any action based upon reliance on the contents of this transmission is strictly forbidden. If you have received this message in error please notify the sender by return e-mail and delete it from your system.
Spirent Communications plc
Northwood Park, Gatwick Road, Crawley, West Sussex, RH10 9XN, United Kingdom.
Tel No. +44 (0) 1293 767676
Fax No. +44 (0) 1293 767677
Registered in England Number 470893
Registered at Northwood Park, Gatwick Road, Crawley, West Sussex, RH10 9XN, United Kingdom.
Or if within the US,
Spirent Communications,
26750 Agoura Road, Calabasas, CA, 91302, USA.
Tel No. 1-818-676- 2300
Re: Replication through proxy does not work?
Posted by Robert Newson <rn...@apache.org>.
Hi,
Replicating through a proxy should be working just fine, more likely
it's a problem with the proxy itself. What are you using?
B.
On 7 September 2013 02:18, Chung, Yang <Ya...@spirent.com> wrote:
> Hey guys,
>
> I've been trying to replicate certain database from external source to local destination using proxy, and it keeps failing with the following error message.
>
> {"error":"db_not_found","reason":"could not open [EXTERNAL SOURCE COUCHDB]"}
>
> It works fine, though, if I remove "proxy" key.
>
> {"ok":true,"no_chagne":…..}
>
> I am making a POST request to 'http://localhost:5984/_replicate' with the following JSON data.
>
> {
> "source":[EXTERNAL SOURCE],
> "target":"http://admin_user:admin_password@127.0.0.1:5984/my_test",
> "create_target":false,
> "continuous":false,
> "doc_ids":["id1", "id2"],
> "proxy":[PROXY ADDRESS:PORT]
> }
>
> Is there known bug for replicating via proxy? Or can it be a configuration issue on my proxy server?
>
> Any help would be much appreciated.
>
> Thank you!
> E-mail confidentiality.
> --------------------------------
> This e-mail contains confidential and / or privileged information belonging to Spirent Communications plc, its affiliates and / or subsidiaries. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution and / or the taking of any action based upon reliance on the contents of this transmission is strictly forbidden. If you have received this message in error please notify the sender by return e-mail and delete it from your system.
>
> Spirent Communications plc
> Northwood Park, Gatwick Road, Crawley, West Sussex, RH10 9XN, United Kingdom.
> Tel No. +44 (0) 1293 767676
> Fax No. +44 (0) 1293 767677
>
> Registered in England Number 470893
> Registered at Northwood Park, Gatwick Road, Crawley, West Sussex, RH10 9XN, United Kingdom.
>
> Or if within the US,
>
> Spirent Communications,
> 26750 Agoura Road, Calabasas, CA, 91302, USA.
> Tel No. 1-818-676- 2300