Skip to content

Instantly share code, notes, and snippets.

@samlown
Created June 30, 2010 23:13
Show Gist options
  • Save samlown/459343 to your computer and use it in GitHub Desktop.
Save samlown/459343 to your computer and use it in GitHub Desktop.
Error with CouchDB while trying to replicate from a remote server proxied by Nginx
Nginx proxy configuration:
server {
server_name couchdb.ityzen.com;
listen 443;
ssl on;
ssl_certificate /etc/ssl/certs/server.crt;
ssl_certificate_key /etc/ssl/private/server.key;
ssl_protocols SSLv3;
ssl_session_cache shared:SSL:1m;
#access_log /var/log/nginx/access.log;
#error_log /var/log/nginx/error.log;
error_page 502 503 504 /error/50x.html;
location /error/50x.html {
internal;
}
location ~ ^/(.*)/_changes {
#auth_basic "Restricted";
#auth_basic_user_file /etc/nginx/htpasswd.couchdb;
#proxy_set_header Authorization "";
proxy_pass http://localhost:5984;
proxy_redirect off;
proxy_buffering 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;
}
location / {
#auth_basic "Restricted";
#auth_basic_user_file /etc/nginx/htpasswd.couchdb;
#proxy_set_header Authorization "";
proxy_pass http://localhost: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;
}
}
------------------- START /var/log/couchdb/couchdb.log OUTPUT -------------------------
[Wed, 30 Jun 2010 23:10:02 GMT] [info] [<0.8249.1>] starting new replication "8e62a6008c96957337804456d3d79aa7" at <0.8275.1>
[Wed, 30 Jun 2010 23:10:09 GMT] [info] [<0.8275.1>] recording a checkpoint for https://pyc:[email protected]:443/plazaycanales_loreal/ -> plazaycanales_loreal at source update_seq 11
[Wed, 30 Jun 2010 23:10:16 GMT] [error] [<0.8321.1>] ** Generic server <0.8321.1> terminating
** Last message in was {tcp,#Port<0.2570>,
<<"c3fed3d51165fe422121b2bd1943\",\"a0a7338346db602317e63cb6c2b4bdff\"]}}}]\n\r\n0\r\n\r\n">>}
** When Server state == {st,connector,<0.142.0>,<0.8317.1>,<0.8317.1>,19,
false,
[{mode,binary},
{nodelay,true},
{active,once},
{packet,0},
{ip,{0,0,0,0}},
{verify,0},
{depth,1}],
{sslsocket,19,<0.8321.1>},
#Port<0.2570>,nil,open,false,false}
** Reason for termination ==
** {error,{badinfo,{tcp,#Port<0.2570>,
<<"c3fed3d51165fe422121b2bd1943\",\"a0a7338346db602317e63cb6c2b4bdff\"]}}}]\n\r\n0\r\n\r\n">>}}}
[Wed, 30 Jun 2010 23:10:16 GMT] [error] [<0.8321.1>] {error_report,<0.60.0>,
{<0.8321.1>,crash_report,
[[{initial_call,{ssl_broker,init,['Argument__1']}},
{pid,<0.8321.1>},
{registered_name,[]},
{error_info,
{exit,
{error,
{badinfo,
{tcp,#Port<0.2570>,
<<"c3fed3d51165fe422121b2bd1943\",\"a0a7338346db602317e63cb6c2b4bdff\"]}}}]\n\r\n0\r\n\r\n">>}}},
[{gen_server,terminate,6},{proc_lib,init_p_do_apply,3}]}},
{ancestors,[ssl_broker_sup,ssl_sup,<0.61.0>]},
{messages,[]},
{links,[<0.142.0>,<0.8317.1>,<0.63.0>,#Port<0.2570>]},
{dictionary,[]},
{trap_exit,true},
{status,running},
{heap_size,2584},
{stack_size,24},
{reductions,17755}],
[{neighbour,
[{pid,<0.8317.1>},
{registered_name,[]},
{initial_call,{ibrowse_http_client,init,['Argument__1']}},
{current_function,{ibrowse_http_client,parse_headers_1,3}},
{ancestors,[<0.140.0>,ibrowse,ibrowse_sup,<0.68.0>]},
{messages,[]},
{links,[<0.140.0>,<0.8321.1>]},
{dictionary,
[{my_trace_flag,false},
{ibrowse_trace_token,["couchdb.ityzen.com",58,"443"]},
{http_prot_vsn,"HTTP/1.1"},
{conn_close,"keep-alive"}]},
{trap_exit,false},
{status,runnable},
{heap_size,10946},
{stack_size,47},
{reductions,128306}]}]]}}
[Wed, 30 Jun 2010 23:10:16 GMT] [error] [<0.63.0>] {error_report,<0.60.0>,
{<0.63.0>,supervisor_report,
[{supervisor,{local,ssl_broker_sup}},
{errorContext,child_terminated},
{reason,
{error,
{badinfo,
{tcp,#Port<0.2570>,
<<"c3fed3d51165fe422121b2bd1943\",\"a0a7338346db602317e63cb6c2b4bdff\"]}}}]\n\r\n0\r\n\r\n">>}}}},
{offender,
[{pid,<0.8321.1>},
{name,ssl_broker},
{mfa,{ssl_broker,start_link,[<0.8317.1>,connector,[]]}},
{restart_type,temporary},
{shutdown,100},
{child_type,worker}]}]}}
[Wed, 30 Jun 2010 23:10:35 GMT] [error] [<0.8332.1>] ** Generic server <0.8332.1> terminating
** Last message in was {tcp,#Port<0.2564>,
<<"0\",\"_rev\":\"3-1330b02b532da9db030c53577e4cdca9\",\"_deleted\":true,\"_revisions\":{\"start\":3,\"ids\":[\"1330b02b532da9db030c53577e4cdca9\",\"e08746818d86991a105c4894039529db\",\"3f1648ce29866eaabb2d038fee202471\"]}}}]\n\r\n0\r\n\r\n">>}
** When Server state == {st,connector,<0.142.0>,<0.8327.1>,<0.8327.1>,16,
false,
[{mode,binary},
{nodelay,true},
{active,once},
{packet,0},
{ip,{0,0,0,0}},
{verify,0},
{depth,1}],
{sslsocket,16,<0.8332.1>},
#Port<0.2564>,nil,open,false,false}
** Reason for termination ==
** {error,{badinfo,{tcp,#Port<0.2564>,
<<"0\",\"_rev\":\"3-1330b02b532da9db030c53577e4cdca9\",\"_deleted\":true,\"_revisions\":{\"start\":3,\"ids\":[\"1330b02b532da9db030c53577e4cdca9\",\"e08746818d86991a105c4894039529db\",\"3f1648ce29866eaabb2d038fee202471\"]}}}]\n\r\n0\r\n\r\n">>}}}
[Wed, 30 Jun 2010 23:10:35 GMT] [error] [<0.8332.1>] {error_report,<0.60.0>,
{<0.8332.1>,crash_report,
[[{initial_call,{ssl_broker,init,['Argument__1']}},
{pid,<0.8332.1>},
{registered_name,[]},
{error_info,
{exit,
{error,
{badinfo,
{tcp,#Port<0.2564>,
<<"0\",\"_rev\":\"3-1330b02b532da9db030c53577e4cdca9\",\"_deleted\":true,\"_revisions\":{\"start\":3,\"ids\":[\"1330b02b532da9db030c53577e4cdca9\",\"e08746818d86991a105c4894039529db\",\"3f1648ce29866eaabb2d038fee202471\"]}}}]\n\r\n0\r\n\r\n">>}}},
[{gen_server,terminate,6},{proc_lib,init_p_do_apply,3}]}},
{ancestors,[ssl_broker_sup,ssl_sup,<0.61.0>]},
{messages,[]},
{links,[<0.142.0>,<0.8327.1>,<0.63.0>,#Port<0.2564>]},
{dictionary,[]},
{trap_exit,true},
{status,running},
{heap_size,2584},
{stack_size,24},
{reductions,40346}],
[{neighbour,
[{pid,<0.8327.1>},
{registered_name,[]},
{initial_call,{ibrowse_http_client,init,['Argument__1']}},
{current_function,{gen,wait_resp_mon,3}},
{ancestors,[<0.140.0>,ibrowse,ibrowse_sup,<0.68.0>]},
{messages,[]},
{links,[<0.140.0>,<0.8332.1>]},
{dictionary,
[{my_trace_flag,false},
{ibrowse_trace_token,["couchdb.ityzen.com",58,"443"]},
{http_prot_vsn,"HTTP/1.1"},
{conn_close,"keep-alive"}]},
{trap_exit,false},
{status,waiting},
{heap_size,4181},
{stack_size,20},
{reductions,314265}]}]]}}
[Wed, 30 Jun 2010 23:10:35 GMT] [error] [<0.63.0>] {error_report,<0.60.0>,
{<0.63.0>,supervisor_report,
[{supervisor,{local,ssl_broker_sup}},
{errorContext,child_terminated},
{reason,
{error,
{badinfo,
{tcp,#Port<0.2564>,
<<"0\",\"_rev\":\"3-1330b02b532da9db030c53577e4cdca9\",\"_deleted\":true,\"_revisions\":{\"start\":3,\"ids\":[\"1330b02b532da9db030c53577e4cdca9\",\"e08746818d86991a105c4894039529db\",\"3f1648ce29866eaabb2d038fee202471\"]}}}]\n\r\n0\r\n\r\n">>}}}},
{offender,
[{pid,<0.8332.1>},
{name,ssl_broker},
{mfa,{ssl_broker,start_link,[<0.8327.1>,connector,[]]}},
{restart_type,temporary},
{shutdown,100},
{child_type,worker}]}]}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment