Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 114F14781 for ; Thu, 23 Jun 2011 15:27:18 +0000 (UTC) Received: (qmail 37822 invoked by uid 500); 23 Jun 2011 15:27:16 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 37759 invoked by uid 500); 23 Jun 2011 15:27:15 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 37751 invoked by uid 99); 23 Jun 2011 15:27:15 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Jun 2011 15:27:15 +0000 X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests=NORMAL_HTTP_TO_IP,SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [109.169.49.54] (HELO zoe.mltserver-three.co.uk) (109.169.49.54) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Jun 2011 15:27:06 +0000 Received: from 02dc6bf2.bb.sky.com ([2.220.107.242] helo=[192.168.0.3]) by zoe.mltserver-three.co.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.69) (envelope-from ) id 1QZlno-0007fx-Ps for user@couchdb.apache.org; Thu, 23 Jun 2011 16:26:44 +0100 From: Martin Hewitt Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: Debugging 302/Unauthorized error Date: Thu, 23 Jun 2011 16:26:43 +0100 Message-Id: To: user@couchdb.apache.org Mime-Version: 1.0 (Apple Message framework v1084) X-Mailer: Apple Mail (2.1084) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - zoe.mltserver-three.co.uk X-AntiAbuse: Original Domain - couchdb.apache.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - thenoi.se X-Source: X-Source-Args: X-Source-Dir: X-Virus-Checked: Checked by ClamAV on apache.org Hi all, For a while now, we've had a build process that creates a website, = creates Couch databases, creates a user for that site, and then uses = that new user to create the default design docs for the newly-created = databases. In the last week or so, the create view action has been returning 302 = errors and, when I run the process by hand using cURL, I get the same = error. My process is: 1. Create user through Futon (e.g. org.couchdb.user:testuser) 2. Generate a password with a salt and hash it using PHP. 3. Save the new user record. 4. Create a new database (e.g. testuser_database) 5. Using Futon, open the Security dialog and add in ["testuser"] and = ["admin"] to the Administrator fields. 6. Save the security dialog. 7. Attempt a PUT of a design doc: > curl -i -X PUT -d "{\"one\":\"two\"}" = http://testuser:testpassword@127.0.0.1:5984/testuser_database/_design/test= / 8. I get an error response: HTTP/1.1 302 Moved Temporarily Server: CouchDB/1.2.0a1075588 (Erlang OTP/R14B) Location: = http://127.0.0.1:5984/_utils/session.html?return=3D%2Fmartin_test%2F_desig= n%2Ftest&reason=3DName%20or%20password%20is%20incorrect. Date: Thu, 23 Jun 2011 15:18:36 GMT Content-Type: text/plain;charset=3Dutf-8 Content-Length: 67 Cache-Control: must-revalidate {"error":"unauthorized","reason":"Name or password is incorrect."} Now, I *know* that neither the password nor the username is incorrect, = and, up until a week or so ago, this build process completed without = issue. Raising the CouchDB log level to debug gives no more useful = information. Couch version: {"couchdb":"Welcome","version":"1.2.0a1075588"} I know a recent version of Couch was released (this was built from = source a month or two ago), but, this system is in production, so I'd = rather not rebuild Couch if I can avoid it. Any help debugging this problem would be greatly appreciated. Many thanks, Martin=20=