You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Eliseo Soto (Created) (JIRA)" <ji...@apache.org> on 2011/11/01 00:33:32 UTC

[jira] [Created] (COUCHDB-1327) CLONE - remote to local replication fails when using a proxy

CLONE - remote to local replication fails when using a proxy
------------------------------------------------------------

                 Key: COUCHDB-1327
                 URL: https://issues.apache.org/jira/browse/COUCHDB-1327
             Project: CouchDB
          Issue Type: Bug
          Components: Replication
    Affects Versions: 1.0.1
            Reporter: Eliseo Soto


We have been trying to setup a remote to local replication through a proxy.
All requests send to the proxy server, except for the request to the _changes feed, which has been send to the target host directly.

We used the following request using curl to establish the replication:

    curl -X POST http://localhost:5984/_replicate -H "Content-Type: application/json" -d '{"target":"foo","source":"http://10.0.1.146:5981/repl_test", "proxy":"http://10.0.2.123:8888"}'

The request that was not send to the proxy was the following:
    GET /repl_test/_changes?style=all_docs&heartbeat=10000&since=0&feed=normal HTTP/1.1

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (COUCHDB-1327) CLONE - remote to local replication fails when using a proxy

Posted by "Eliseo Soto (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-1327?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13141447#comment-13141447 ] 

Eliseo Soto commented on COUCHDB-1327:
--------------------------------------

Tried with 1.1.1 and no dice... still the same error:

{"error":"json_encode","reason":"{bad_term,{nocatch,{invalid_json,<<>>}}}"}

Could it be a problem with CouchDB or with isaacs.iriscouch.com?
                
> CLONE - remote to local replication fails when using a proxy
> ------------------------------------------------------------
>
>                 Key: COUCHDB-1327
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1327
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Replication
>    Affects Versions: 1.1.2
>            Reporter: Eliseo Soto
>
> The following is failing for me:
> curl -X POST -H "Content-Type:application/json" http://localhost:5984/_replicate -d '{"source":"http://isaacs.iriscouch.com/registry/", "target":"registry", "proxy": "http://wwwgate0.myproxy.com:1080"}'
> This is the error:
> {"error":"json_encode","reason":"{bad_term,{nocatch,{invalid_json,<<>>}}}"}
> I have no clue about what's wrong, I can curl http://isaacs.iriscouch.com/registry/ directly and it works.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (COUCHDB-1327) CLONE - remote to local replication fails when using a proxy

Posted by "Eliseo Soto (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-1327?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13140696#comment-13140696 ] 

Eliseo Soto commented on COUCHDB-1327:
--------------------------------------

My mistake, I just checked and it's actually CouchBase 1.1.3, I didn't realize that they're different products.

But coming back to this problem, do you know how to show some more verbose info to give me a pointer about what went wrong?

Thanks,
Eliseo
                
> CLONE - remote to local replication fails when using a proxy
> ------------------------------------------------------------
>
>                 Key: COUCHDB-1327
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1327
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Replication
>    Affects Versions: 1.1.2
>            Reporter: Eliseo Soto
>
> The following is failing for me:
> curl -X POST -H "Content-Type:application/json" http://localhost:5984/_replicate -d '{"source":"http://isaacs.iriscouch.com/registry/", "target":"registry", "proxy": "http://wwwgate0.myproxy.com:1080"}'
> This is the error:
> {"error":"json_encode","reason":"{bad_term,{nocatch,{invalid_json,<<>>}}}"}
> I have no clue about what's wrong, I can curl http://isaacs.iriscouch.com/registry/ directly and it works.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Closed] (COUCHDB-1327) CLONE - remote to local replication fails when using a proxy

Posted by "Jan Lehnardt (Closed) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-1327?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jan Lehnardt closed COUCHDB-1327.
---------------------------------

    Resolution: Not A Problem
    
> CLONE - remote to local replication fails when using a proxy
> ------------------------------------------------------------
>
>                 Key: COUCHDB-1327
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1327
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Replication
>    Affects Versions: 1.1.2
>            Reporter: Eliseo Soto
>
> The following is failing for me:
> curl -X POST -H "Content-Type:application/json" http://localhost:5984/_replicate -d '{"source":"http://isaacs.iriscouch.com/registry/", "target":"registry", "proxy": "http://wwwgate0.myproxy.com:1080"}'
> This is the error:
> {"error":"json_encode","reason":"{bad_term,{nocatch,{invalid_json,<<>>}}}"}
> I have no clue about what's wrong, I can curl http://isaacs.iriscouch.com/registry/ directly and it works.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (COUCHDB-1327) CLONE - remote to local replication fails when using a proxy

Posted by "Jason Smith (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-1327?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13141092#comment-13141092 ] 

Jason Smith commented on COUCHDB-1327:
--------------------------------------

The source database (isaacs.iriscouch.com/registry) no longer has the problematic document.
                
> CLONE - remote to local replication fails when using a proxy
> ------------------------------------------------------------
>
>                 Key: COUCHDB-1327
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1327
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Replication
>    Affects Versions: 1.1.2
>            Reporter: Eliseo Soto
>
> The following is failing for me:
> curl -X POST -H "Content-Type:application/json" http://localhost:5984/_replicate -d '{"source":"http://isaacs.iriscouch.com/registry/", "target":"registry", "proxy": "http://wwwgate0.myproxy.com:1080"}'
> This is the error:
> {"error":"json_encode","reason":"{bad_term,{nocatch,{invalid_json,<<>>}}}"}
> I have no clue about what's wrong, I can curl http://isaacs.iriscouch.com/registry/ directly and it works.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (COUCHDB-1327) CLONE - remote to local replication fails when using a proxy

Posted by "Eliseo Soto (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-1327?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13141388#comment-13141388 ] 

Eliseo Soto commented on COUCHDB-1327:
--------------------------------------

I just tried it with 1.1.0 (the one you can get right now with HomeBrew) and got the same error, I'll build 1.1.1 and try it there.
                
> CLONE - remote to local replication fails when using a proxy
> ------------------------------------------------------------
>
>                 Key: COUCHDB-1327
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1327
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Replication
>    Affects Versions: 1.1.2
>            Reporter: Eliseo Soto
>
> The following is failing for me:
> curl -X POST -H "Content-Type:application/json" http://localhost:5984/_replicate -d '{"source":"http://isaacs.iriscouch.com/registry/", "target":"registry", "proxy": "http://wwwgate0.myproxy.com:1080"}'
> This is the error:
> {"error":"json_encode","reason":"{bad_term,{nocatch,{invalid_json,<<>>}}}"}
> I have no clue about what's wrong, I can curl http://isaacs.iriscouch.com/registry/ directly and it works.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (COUCHDB-1327) CLONE - remote to local replication fails when using a proxy

Posted by "Filipe Manana (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-1327?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13145518#comment-13145518 ] 

Filipe Manana commented on COUCHDB-1327:
----------------------------------------

Eliseo, I get the same issue as you.

I confirmed that the receiving side no longer receives documents with empty ID (or an ID consisting of white spaces only). What happens is that the response to some document GETs is empty, which makes the replicator since it expects a non-empty JSON body.
I think this is an issue either with the http client's pipeline implementation.

Setting "max_http_pipeline_size" to 1 in the .ini config works, but the replication will be very very slow, since that particular database has many large attachments. The replicator in the 1.2.x branch (or master) is way faster for this database.

Let me know if it works for you.
                
> CLONE - remote to local replication fails when using a proxy
> ------------------------------------------------------------
>
>                 Key: COUCHDB-1327
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1327
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Replication
>    Affects Versions: 1.1.2
>            Reporter: Eliseo Soto
>
> The following is failing for me:
> curl -X POST -H "Content-Type:application/json" http://localhost:5984/_replicate -d '{"source":"http://isaacs.iriscouch.com/registry/", "target":"registry", "proxy": "http://wwwgate0.myproxy.com:1080"}'
> This is the error:
> {"error":"json_encode","reason":"{bad_term,{nocatch,{invalid_json,<<>>}}}"}
> I have no clue about what's wrong, I can curl http://isaacs.iriscouch.com/registry/ directly and it works.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (COUCHDB-1327) CLONE - remote to local replication fails when using a proxy

Posted by "Robert Newson (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-1327?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13140690#comment-13140690 ] 

Robert Newson commented on COUCHDB-1327:
----------------------------------------

There is no CouchDB 1.1.2 release yet, which version does this really affect?
                
> CLONE - remote to local replication fails when using a proxy
> ------------------------------------------------------------
>
>                 Key: COUCHDB-1327
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1327
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Replication
>    Affects Versions: 1.1.2
>            Reporter: Eliseo Soto
>
> The following is failing for me:
> curl -X POST -H "Content-Type:application/json" http://localhost:5984/_replicate -d '{"source":"http://isaacs.iriscouch.com/registry/", "target":"registry", "proxy": "http://wwwgate0.myproxy.com:1080"}'
> This is the error:
> {"error":"json_encode","reason":"{bad_term,{nocatch,{invalid_json,<<>>}}}"}
> I have no clue about what's wrong, I can curl http://isaacs.iriscouch.com/registry/ directly and it works.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (COUCHDB-1327) CLONE - remote to local replication fails when using a proxy

Posted by "Jason Smith (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-1327?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13140700#comment-13140700 ] 

Jason Smith commented on COUCHDB-1327:
--------------------------------------

This is due to the empty string ID bug which I believe was fixed in 1.1.1. (And regarding isaacs.iriscouch.com, I will permanently delete that problematic document today in a delete/upgrade dance.)
                
> CLONE - remote to local replication fails when using a proxy
> ------------------------------------------------------------
>
>                 Key: COUCHDB-1327
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1327
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Replication
>    Affects Versions: 1.1.2
>            Reporter: Eliseo Soto
>
> The following is failing for me:
> curl -X POST -H "Content-Type:application/json" http://localhost:5984/_replicate -d '{"source":"http://isaacs.iriscouch.com/registry/", "target":"registry", "proxy": "http://wwwgate0.myproxy.com:1080"}'
> This is the error:
> {"error":"json_encode","reason":"{bad_term,{nocatch,{invalid_json,<<>>}}}"}
> I have no clue about what's wrong, I can curl http://isaacs.iriscouch.com/registry/ directly and it works.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (COUCHDB-1327) CLONE - remote to local replication fails when using a proxy

Posted by "Eliseo Soto (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-1327?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eliseo Soto updated COUCHDB-1327:
---------------------------------

          Description: 
The following is failing for me:

curl -X POST -H "Content-Type:application/json" http://localhost:5984/_replicate -d '{"source":"http://isaacs.iriscouch.com/registry/", "target":"registry", "proxy": "http://wwwgate0.myproxy.com:1080"}'

This is the error:
{"error":"json_encode","reason":"{bad_term,{nocatch,{invalid_json,<<>>}}}"}

I have no clue about what's wrong, I can curl http://isaacs.iriscouch.com/registry/ directly and it works.

  was:
We have been trying to setup a remote to local replication through a proxy.
All requests send to the proxy server, except for the request to the _changes feed, which has been send to the target host directly.

We used the following request using curl to establish the replication:

    curl -X POST http://localhost:5984/_replicate -H "Content-Type: application/json" -d '{"target":"foo","source":"http://10.0.1.146:5981/repl_test", "proxy":"http://10.0.2.123:8888"}'

The request that was not send to the proxy was the following:
    GET /repl_test/_changes?style=all_docs&heartbeat=10000&since=0&feed=normal HTTP/1.1

    Affects Version/s:     (was: 1.0.1)
                       1.1.2
    
> CLONE - remote to local replication fails when using a proxy
> ------------------------------------------------------------
>
>                 Key: COUCHDB-1327
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1327
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Replication
>    Affects Versions: 1.1.2
>            Reporter: Eliseo Soto
>
> The following is failing for me:
> curl -X POST -H "Content-Type:application/json" http://localhost:5984/_replicate -d '{"source":"http://isaacs.iriscouch.com/registry/", "target":"registry", "proxy": "http://wwwgate0.myproxy.com:1080"}'
> This is the error:
> {"error":"json_encode","reason":"{bad_term,{nocatch,{invalid_json,<<>>}}}"}
> I have no clue about what's wrong, I can curl http://isaacs.iriscouch.com/registry/ directly and it works.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (COUCHDB-1327) CLONE - remote to local replication fails when using a proxy

Posted by "Filipe Manana (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-1327?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13187955#comment-13187955 ] 

Filipe Manana commented on COUCHDB-1327:
----------------------------------------

Likely fixed by COUCHDB-1340
Any chance to try it?
                
> CLONE - remote to local replication fails when using a proxy
> ------------------------------------------------------------
>
>                 Key: COUCHDB-1327
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1327
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Replication
>    Affects Versions: 1.1.2
>            Reporter: Eliseo Soto
>
> The following is failing for me:
> curl -X POST -H "Content-Type:application/json" http://localhost:5984/_replicate -d '{"source":"http://isaacs.iriscouch.com/registry/", "target":"registry", "proxy": "http://wwwgate0.myproxy.com:1080"}'
> This is the error:
> {"error":"json_encode","reason":"{bad_term,{nocatch,{invalid_json,<<>>}}}"}
> I have no clue about what's wrong, I can curl http://isaacs.iriscouch.com/registry/ directly and it works.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (COUCHDB-1327) CLONE - remote to local replication fails when using a proxy

Posted by "Filipe Manana (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-1327?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13141082#comment-13141082 ] 

Filipe Manana commented on COUCHDB-1327:
----------------------------------------

Eliseo, the replication proxy feature had bugs in the Apache CouchDB 1.0.1 release. They were corrected in 1.0.2.

Also, as Jason said, you're also hitting a bug where the source database has a document with an empty ID which makes it crash the replicator. The only Apache release with a fix for this is 1.1.1 (you should use it, as it fixes many other issues).

Try 1.1.1 and reopen this ticket if the proxy feature is still not working fine.
                
> CLONE - remote to local replication fails when using a proxy
> ------------------------------------------------------------
>
>                 Key: COUCHDB-1327
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1327
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Replication
>    Affects Versions: 1.1.2
>            Reporter: Eliseo Soto
>
> The following is failing for me:
> curl -X POST -H "Content-Type:application/json" http://localhost:5984/_replicate -d '{"source":"http://isaacs.iriscouch.com/registry/", "target":"registry", "proxy": "http://wwwgate0.myproxy.com:1080"}'
> This is the error:
> {"error":"json_encode","reason":"{bad_term,{nocatch,{invalid_json,<<>>}}}"}
> I have no clue about what's wrong, I can curl http://isaacs.iriscouch.com/registry/ directly and it works.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (COUCHDB-1327) CLONE - remote to local replication fails when using a proxy

Posted by "Cody A. Ray (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-1327?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13187942#comment-13187942 ] 

Cody A. Ray commented on COUCHDB-1327:
--------------------------------------

I'm having the same issue, except I'm not going through a proxy.

$ curl -X POST -H "Content-Type:application/json" http://localhost:5984/_replicate -d '{"source":"http://isaacs.iriscouch.com/registry/", "target":"registry"}'

{"error":"json_encode","reason":"{bad_term,{nocatch,{invalid_json,<<>>}}}"}

Thus it might be unrelated to the proxy bug. Any thoughts/suggestions?
                
> CLONE - remote to local replication fails when using a proxy
> ------------------------------------------------------------
>
>                 Key: COUCHDB-1327
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1327
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Replication
>    Affects Versions: 1.1.2
>            Reporter: Eliseo Soto
>
> The following is failing for me:
> curl -X POST -H "Content-Type:application/json" http://localhost:5984/_replicate -d '{"source":"http://isaacs.iriscouch.com/registry/", "target":"registry", "proxy": "http://wwwgate0.myproxy.com:1080"}'
> This is the error:
> {"error":"json_encode","reason":"{bad_term,{nocatch,{invalid_json,<<>>}}}"}
> I have no clue about what's wrong, I can curl http://isaacs.iriscouch.com/registry/ directly and it works.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira