Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 92763 invoked from network); 5 Jul 2010 16:46:16 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 5 Jul 2010 16:46:16 -0000 Received: (qmail 40191 invoked by uid 500); 5 Jul 2010 16:46:16 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 40132 invoked by uid 500); 5 Jul 2010 16:46:15 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 40124 invoked by uid 99); 5 Jul 2010 16:46:15 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Jul 2010 16:46:15 +0000 X-ASF-Spam-Status: No, hits=-1996.4 required=10.0 tests=ALL_TRUSTED,FS_REPLICA,NORMAL_HTTP_TO_IP,WEIRD_PORT X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Jul 2010 16:46:12 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o65Gjo7K008720 for ; Mon, 5 Jul 2010 16:45:50 GMT Message-ID: <28560160.203751278348350489.JavaMail.jira@thor> Date: Mon, 5 Jul 2010 12:45:50 -0400 (EDT) From: "Klaus Trainer (JIRA)" To: dev@couchdb.apache.org Subject: [jira] Commented: (COUCHDB-720) Pull replication fails due to "401 Authentication required" while push replication works fine In-Reply-To: <311133489.587301269980547183.JavaMail.jira@brutus.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/COUCHDB-720?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12885270#action_12885270 ] Klaus Trainer commented on COUCHDB-720: --------------------------------------- Hi Couchers! On my CouchDB 0.10.0 instance delivered with Ubuntu 10.04 amd64 I experience the same pull replication problem (although I don't use a proxy or SSL etc.) in the case I have an [admins] -entry (for instance "admin = secret") in the config file. In my configuration, only the [httpd] port and the [admins] entry differ from the original (i.e., default) CouchDB configuration. The thing is that with that configuration all tests succeed, except the oauth and the replication one. For instance, when replicating, I get the following output: klausi@devil:~$ curl -vX POST http://admin:secret@127.0.0.1:5991/_replicate -d '{"source":"test_suite_db_a","target":"http://127.0.0.1:5991/test_suite_db_b"}' * About to connect() to 127.0.0.1 port 5991 (#0) * Trying 127.0.0.1... connected * Connected to 127.0.0.1 (127.0.0.1) port 5991 (#0) * Server auth using Basic with user 'admin' > POST /_replicate HTTP/1.1 > Authorization: Basic YWRtaW46c2VjcmV0 > User-Agent: curl/7.19.7 (x86_64-pc-linux-gnu) libcurl/7.19.7 OpenSSL/0.9.8k zlib/1.2.3.3 libidn/1.15 > Host: 127.0.0.1:5991 > Accept: */* > Content-Length: 77 > Content-Type: application/x-www-form-urlencoded > < HTTP/1.1 200 OK < Server: CouchDB/0.10.0 (Erlang OTP/R13B) < Date: Mon, 05 Jul 2010 16:15:13 GMT < Content-Type: text/plain;charset=utf-8 < Content-Length: 378 < Cache-Control: must-revalidate < {"ok":true,"session_id":"280fe9ab1efeff12017da569ec443edf","source_last_seq":17,"history":[{"session_id":"280fe9ab1efeff12017da569ec443edf","start_time":"Mon, 05 Jul 2010 16:15:13 GMT","end_time":"Mon, 05 Jul 2010 16:15:13 GMT","start_last_seq":0,"end_last_seq":17,"recorded_seq":17,"missing_checked":0,"missing_found":2,"docs_read":2,"docs_written":0,"doc_write_failures":2}]} (Just to clarify, it's basically the same output I see in Firebug when running the Test Suite's replication test. Everything replicates fine, except _design documents.) When removing the [admins] entry from the config file, everything, including replication of _design documents, works well: klausi@devil:~$ curl -vX POST http://127.0.0.1:5991/_replicate -d '{"source":"test_suite_db_a","target":"http://127.0.0.1:5991/test_suite_db_b"}' * About to connect() to 127.0.0.1 port 5991 (#0) * Trying 127.0.0.1... connected * Connected to 127.0.0.1 (127.0.0.1) port 5991 (#0) > POST /_replicate HTTP/1.1 > User-Agent: curl/7.19.7 (x86_64-pc-linux-gnu) libcurl/7.19.7 OpenSSL/0.9.8k zlib/1.2.3.3 libidn/1.15 > Host: 127.0.0.1:5991 > Accept: */* > Content-Length: 77 > Content-Type: application/x-www-form-urlencoded > < HTTP/1.1 200 OK < Server: CouchDB/0.10.0 (Erlang OTP/R13B) < Date: Mon, 05 Jul 2010 16:19:37 GMT < Content-Type: text/plain;charset=utf-8 < Content-Length: 378 < Cache-Control: must-revalidate < {"ok":true,"session_id":"220e214ea84bc5fe8c123e41db372fec","source_last_seq":17,"history":[{"session_id":"220e214ea84bc5fe8c123e41db372fec","start_time":"Mon, 05 Jul 2010 16:19:37 GMT","end_time":"Mon, 05 Jul 2010 16:19:37 GMT","start_last_seq":0,"end_last_seq":17,"recorded_seq":17,"missing_checked":0,"missing_found":2,"docs_read":2,"docs_written":2,"doc_write_failures":0}]} I don't believe that this behavior is correct. Although my configuration is different, I suppose it to be related to the present ticket. > Pull replication fails due to "401 Authentication required" while push replication works fine > --------------------------------------------------------------------------------------------- > > Key: COUCHDB-720 > URL: https://issues.apache.org/jira/browse/COUCHDB-720 > Project: CouchDB > Issue Type: Bug > Components: Futon, HTTP Interface, Replication > Affects Versions: 0.10.1, 0.11 > Environment: Remote server having Nginx reverse proxy and basic authentication enabled > Reporter: Jochen Kempf > Priority: Blocker > > Pull replication fails using both Futon Replicator and http request throwing an "401 Authentication required" error. This just happens when design documents are existent. > Push replication on the other hand works fine. > See used code here: http://gist.github.com/364072 -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.