couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Rupp <caphrim...@gmail.com>
Subject Re: Couchdb 1.0 on Linux problems
Date Sun, 29 Aug 2010 13:54:41 GMT
What does your nginx proxy configuration look like?

Can you run couch with log level "debug" and provide log events from 
when you receive those 502 bad gateways?

I've run with an nginx frontend and have had luck with the following 
configuration. My nginx conf added SSL and basic auth, but the meat of 
the configuration was.

location / {
   auth_basic "CouchDB Admin";
   auth_basic_user_file  /etc/httpd/conf/couchdb-auth;

   proxy_pass http://couchdb.host.domain:5984;
   proxy_redirect off;
   proxy_set_header Host $host;
   proxy_set_header X-Real-IP $remote_addr;
   proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
   proxy_set_header X-Forwarded-Ssl on;
   proxy_set_header Authorization "";
}

The "Invalid JSON" message is being thrown by futon because of the 502 
response it is receiving from the nginx proxy.

Do you have any relevant nginx logs?

-Tim

On 08/29/2010 03:34 AM, Alasdair Macmillan wrote:
> I've installed Couchdb 1.0 on my webfaction linux box but it isn't running properly and
I don't know how to fix it or what is wrong.
>
> Futon pops up with errors like this:
>
> The database could not be created: Invalid JSON:<html>
> <head><title>502 Bad Gateway</title></head>
> <body bgcolor="white">
> <center><h1>502 Bad Gateway</h1></center>
> <hr><center>nginx</center>
> </body>
> </html>
>
>
> And when I run the test suite:
> basics, all_docs, attachments, attachments_multipart, attachment_names, compact, config,
conflicts, delayed_commits, design_docs, design_options all fail
>
> all the errors are:
>
> Exception raised: {"error":"unknown","reason":"\u000d\u000a502 Bad Gateway\u000d\u000a\u000d\u000a<h1>502
Bad Gateway\u000d\u000a
>
> nginx\u000d\u000a\u000d\u000a\u000d\u000a"}
> except for 'compact; which also has:
>
> Assertion failed: xhr.responseText == "This is a base64 encoded text" Assertion failed:
xhr.getResponseHeader("Content-Type") == "text/plain"
>
> Any help would be so gratefully appreciated
>
> Kind thanks
> AL
>
>

Mime
View raw message