You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Markus Burrer <mb...@embedit.de> on 2011/09/23 19:57:45 UTC
Replication only in one direction
Hi, I have a remote database on a web server with an SSL proxy. If I
start a replication from the local server to the remote server any
change on the local server will be replicated to the remote server.
But if I start a replication on the local server in the opposite
direction I get an error message
Replication failed: {error,
{{{badmatch,{error,changes_timeout}},
[{couch_rep,do_init,1},
{couch_rep,init,1},
{gen_server,init_it,6},
{proc_lib,init_p_do_apply,3}]},
{child,undefined,"804fb0ce823a28530fbcec336d333dfe+continuous",
{gen_server,start_link,
[couch_rep,
["804fb0ce823a28530fbcec336d333dfe",
{[{<<"source">>,
<<"https://user:pwd@example.de:6984/database">>},
{<<"target">>,<<"database">>},
{<<"continuous">>,true}]},
{user_ctx,null,
[<<"_admin">>],
<<"{couch_httpd_auth, default_authentication_handler}">>}],
[]]},
temporary,1,worker,
[couch_rep]}}}
What's wrong?
Kind Regards
Markus
Re: Replication only in one direction
Posted by CGS <cg...@gmail.com>.
Sorry, I missed the part when you wrote about trying reversed operation, but
from the local server. My bad.
Do you have an admin on the local server? If so, try instead of "database"
something like "http:user:password@local_ip/database". If local_ip is
virtual and the remote server is not in the same local network, you may need
to create a traffic redirection.
> First of all, on the local database you are not using SSL if I understood
> > correctly.
> Thats correct. The local machine is running on port 5984 without SSL,
> the remote server uses port 6984 with SSL
> > That means httpS is raising exception. Secondly, if you didn't
> > change the port on your local server, it should be 5... and not 6... So,
> > main point here is to check how you access the database from the remote
> > server. There may be some other problems there, but let's see one at the
> > time. If the above is not correct, please, let us know.
> Both replications started on the local machine with Futon. If I select a
> local database for "from" and the remote database for "to" the
> replication works. If I select the remote database for "from" and the
> local database for "to" it doesn't work.
>
> I did not try to start a replication from the remote server.
>
> Markus
>
Re: Replication only in one direction
Posted by Markus Burrer <mb...@embedit.de>.
Am 24.09.2011 12:41, schrieb CGS:
> Hi,
>
> First of all, on the local database you are not using SSL if I understood
> correctly.
Thats correct. The local machine is running on port 5984 without SSL,
the remote server uses port 6984 with SSL
> That means httpS is raising exception. Secondly, if you didn't
> change the port on your local server, it should be 5... and not 6... So,
> main point here is to check how you access the database from the remote
> server. There may be some other problems there, but let's see one at the
> time. If the above is not correct, please, let us know.
Both replications started on the local machine with Futon. If I select a
local database for "from" and the remote database for "to" the
replication works. If I select the remote database for "from" and the
local database for "to" it doesn't work.
I did not try to start a replication from the remote server.
Markus
Re: Replication only in one direction
Posted by CGS <cg...@gmail.com>.
Hi,
First of all, on the local database you are not using SSL if I understood
correctly. That means httpS is raising exception. Secondly, if you didn't
change the port on your local server, it should be 5... and not 6... So,
main point here is to check how you access the database from the remote
server. There may be some other problems there, but let's see one at the
time. If the above is not correct, please, let us know.
Cheers,
CGS
On Fri, Sep 23, 2011 at 7:57 PM, Markus Burrer <mb...@embedit.de> wrote:
> Hi, I have a remote database on a web server with an SSL proxy. If I
> start a replication from the local server to the remote server any
> change on the local server will be replicated to the remote server.
>
> But if I start a replication on the local server in the opposite
> direction I get an error message
>
> Replication failed: {error,
>
> {{{badmatch,{error,changes_timeout}},
>
> [{couch_rep,do_init,1},
>
> {couch_rep,init,1},
>
> {gen_server,init_it,6},
>
> {proc_lib,init_p_do_apply,3}]},
>
> {child,undefined,"804fb0ce823a28530fbcec336d333dfe+continuous",
>
> {gen_server,start_link,
>
> [couch_rep,
>
> ["804fb0ce823a28530fbcec336d333dfe",
>
> {[{<<"source">>,
>
> <<"https://user:pwd@example.de:6984/database">>},
>
> {<<"target">>,<<"database">>},
>
> {<<"continuous">>,true}]},
>
> {user_ctx,null,
>
> [<<"_admin">>],
>
> <<"{couch_httpd_auth,
> default_authentication_handler}">>}],
>
> []]},
>
> temporary,1,worker,
>
> [couch_rep]}}}
>
>
> What's wrong?
>
> Kind Regards
> Markus
>
Re: Replication only in one direction
Posted by CGS <cg...@gmail.com>.
No. I meant from remote server to local server, but instead of "database" in
the local server to put full database path
(http://user:passwd@local_ip_or_dns:5984/database). It may not work, but
it's worth the try.
I am sorry that I am giving you blind attempts which may not solve the
problem, but the error doesn't say too much. The error says in human
language something like: "there is no connection in between the two servers,
so, I cannot do what you asked". That can mean many things (except for
CouchDB bugs or CouchDB servers incopatibility):
1. SSL proxy doesn't allow the reverse connection (strange, but not
impossible);
2. SSL proxy slows the response so much that a timeout appears as a
response;
3. local server doesn't permit such operation due to the insufficient
permissions;
...and so on so forth. So, I am trying to figure out which may be the
problem.
It's also worth trying to PUT/GET documents via cURL to see if one or the
other server blocks the connection. A shortcut to learn fast how to use cURL
with CouchDB can be found here:
http://jpmens.net/2010/04/20/the-antepenultimate-couchdb-reference-card/
If all the operations are permitted (PUT/GET to/from remote/local servers)
that means there may be a network problem. If not, then this may be a bug in
CouchDB (which I doubt, but I wouldn't take it out totally from the
equation).
On Sun, Sep 25, 2011 at 12:01 PM, Benoit Chesneau <bc...@gmail.com>wrote:
> On Friday, September 23, 2011, Markus Burrer <mb...@embedit.de> wrote:
> > Hi, I have a remote database on a web server with an SSL proxy. If I
> > start a replication from the local server to the remote server any
> > change on the local server will be replicated to the remote server.
> >
> > But if I start a replication on the local server in the opposite
> > direction I get an error message
> >
> > Replication failed: {error,
> >
> > {{{badmatch,{error,changes_timeout}},
> >
> > [{couch_rep,do_init,1},
> >
> > {couch_rep,init,1},
> >
> > {gen_server,init_it,6},
> >
> > {proc_lib,init_p_do_apply,3}]},
> >
> > {child,undefined,"804fb0ce823a28530fbcec336d333dfe+continuous",
> >
> > {gen_server,start_link,
> >
> > [couch_rep,
> >
> > ["804fb0ce823a28530fbcec336d333dfe",
> >
> > {[{<<"source">>,
> >
> > <<"https://user:pwd@example.de:6984/database">>},
> >
> > {<<"target">>,<<"database">>},
> >
> > {<<"continuous">>,true}]},
> >
> > {user_ctx,null,
> >
> > [<<"_admin">>],
> >
> > <<"{couch_httpd_auth,
> default_authentication_handler}">>}],
> >
> > []]},
> >
> > temporary,1,worker,
> >
> > [couch_rep]}}}
> >
> >
> > What's wrong?
> >
> > Kind Regards
> > Markus
> >
>
>
> same version on both sides?
>
Re: Replication only in one direction
Posted by Benoit Chesneau <bc...@gmail.com>.
On Friday, September 23, 2011, Markus Burrer <mb...@embedit.de> wrote:
> Hi, I have a remote database on a web server with an SSL proxy. If I
> start a replication from the local server to the remote server any
> change on the local server will be replicated to the remote server.
>
> But if I start a replication on the local server in the opposite
> direction I get an error message
>
> Replication failed: {error,
>
> {{{badmatch,{error,changes_timeout}},
>
> [{couch_rep,do_init,1},
>
> {couch_rep,init,1},
>
> {gen_server,init_it,6},
>
> {proc_lib,init_p_do_apply,3}]},
>
> {child,undefined,"804fb0ce823a28530fbcec336d333dfe+continuous",
>
> {gen_server,start_link,
>
> [couch_rep,
>
> ["804fb0ce823a28530fbcec336d333dfe",
>
> {[{<<"source">>,
>
> <<"https://user:pwd@example.de:6984/database">>},
>
> {<<"target">>,<<"database">>},
>
> {<<"continuous">>,true}]},
>
> {user_ctx,null,
>
> [<<"_admin">>],
>
> <<"{couch_httpd_auth,
default_authentication_handler}">>}],
>
> []]},
>
> temporary,1,worker,
>
> [couch_rep]}}}
>
>
> What's wrong?
>
> Kind Regards
> Markus
>
same version on both sides?