-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Connection sharing is corrupted when replicating using a proxy #2271
Labels
Comments
rnewson
added a commit
that referenced
this issue
Oct 24, 2019
rnewson
added a commit
that referenced
this issue
Oct 24, 2019
rnewson
added a commit
that referenced
this issue
Oct 24, 2019
rnewson
added a commit
that referenced
this issue
Oct 25, 2019
rnewson
added a commit
that referenced
this issue
Oct 25, 2019
rnewson
added a commit
that referenced
this issue
Oct 25, 2019
rnewson
added a commit
that referenced
this issue
Oct 28, 2019
rnewson
added a commit
that referenced
this issue
Oct 28, 2019
nickva
pushed a commit
that referenced
this issue
Oct 28, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
In 2505436 we introduced an optimization to share connections to given host:port across different replications. I believe this functionality results in broken replications when using a forward proxy, as every connection that uses the proxy is tossed into the same pool, resulting in requests being directed to the wrong hosts.
Steps to Reproduce
Expected Behaviour
Replication should replicate data.
Your Environment
CouchDB 3.0.0-201d5935c on macOS Catalina
Additional context
#1080 also talked about replication failing behind a proxy years ago, but I think this is a different issue. I do agree with the suggestion in that issue that configuring proxies separately for the source and the target makes a lot of sense.
As a test I tried the following patch to cause the shared connection pool to look at the final host:port instead of the proxy host:port
This did allow me to get the replication working. It's not a complete fix; if a server had different replications with a given host:port as the final endpoint, but some of them used a proxy and some did not, this code would still mix them together.
A more complete fix would be to expand the key used in the
couch_replicator_connection
module to include more attributes besides just a single URL.The text was updated successfully, but these errors were encountered: