couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randall Leeds <randall.le...@gmail.com>
Subject Re: replication and error 500
Date Sun, 21 Mar 2010 22:34:34 GMT
CouchDB is trying to open the replication log on the remote server. This log
is a document with the _local prefix you see in the log. If it's not found
(normal for first replication) the remote couch (the replication target in
your case) returns a 404 with a json body describing the error. Expecting
this json the source couch is trying to json decode the response which
appears to be xhtml instead. Boom.

Check to see if your hosting provider is rewriting the 404 reply with a
custom response body and disable this if you can. You can test by trying to
fetch any document or database that does not exist. You should get a json
response, not xhtml.

Cheers,
Randall

On Mar 21, 2010 2:07 PM, "Stephane&Jolicoeur" <picto@stephanejolicoeur.com>
wrote:

Hello,

I am a first time couchDB user and up until replication things were going
fine ...
My setup :
I installed a couchDB instance on my webfaction account listening on a port
supplied by them hence it is behind an apache server. on that instance there
is an admin user with password and a different secret passphrase.

and then I have couchDB running on my local laptop.

I wanted to replicate  data from my laptop (Mac OS X + curl 7.19.4 ) to the
server on webfaction but I seem to be getting 500 errors in futon even with
authentication. What could be happening ?

Thank you for any help,

Stephane


here's the trace from futon :

Starting CouchDB...
Eshell V5.7.3  (abort with ^G)
1> Apache CouchDB 0.10.1 (LogLevel=info) is starting.
1> Apache CouchDB has started. Time to relax.
1> [info] [<0.1.0>] Apache CouchDB has started on http://127.0.0.1:5984/
1> [info] [<0.66.0>] 127.0.0.1 - - 'GET' /_all_dbs 200
1> [info] [<0.70.0>] 127.0.0.1 - - 'GET' / 200
1> [error] [<0.84.0>] {error_report,<0.23.0>,
   {<0.84.0>,crash_report,
    [[{initial_call,{couch_rep,init,['Argument__1']}},
      {pid,<0.84.0>},
      {registered_name,[]},
      {error_info,
          {exit,
              {bad_return_value,
                  {invalid_json,
                      <<"<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML
2.0//EN\">\n<html><head>\n<title>404 Not
Found</title>\n</head><body>\n<h1>Not Found</h1>\n<p>The
requested URL
/baseball/_local/711ad469b7a597fc798e24388dfde992 was not found on this
server.</p>\n</body></html>\n">>}},
              [{gen_server,init_it,6},{proc_lib,init_p_do_apply,3}]}},
      {ancestors,
          [couch_rep_sup,couch_primary_services,couch_server_sup,<0.1.0>]},
      {messages,[]},
      {links,[<0.51.0>]},
      {dictionary,[]},
      {trap_exit,true},
      {status,running},
      {heap_size,2584},
      {stack_size,24},
      {reductions,1148}],
     []]}}
1> [error] [<0.66.0>] Uncaught error in HTTP request: {error,
                                {case_clause,
                                 {error,
                                  {{bad_return_value,
                                    {invalid_json,
                                     <<"<!DOCTYPE HTML PUBLIC \"-//IETF//DTD
HTML 2.0//EN\">\n<html><head>\n<title>404 Not
Found</title>\n</head><body>\n<h1>Not Found</h1>\n<p>The
requested URL
/baseball/_local/711ad469b7a597fc798e24388dfde992 was not found on this
server.</p>\n</body></html>\n">>}},
                                   {child,undefined,
                                    "711ad469b7a597fc798e24388dfde992",
                                    {gen_server,start_link,
                                     [couch_rep,
                                      ["711ad469b7a597fc798e24388dfde992",
                                       {[{<<"source">>,<<"test">>},
                                         {<<"target">>,
                                          <<"http://admin:xxx@xxxx
/baseball">>}]},
                                       {user_ctx,null,[<<"_admin">>]}],
                                      []]},
                                    temporary,1,worker,
                                    [couch_rep]}}}}}
1> [info] [<0.66.0>] Stacktrace: [{couch_rep,start_replication_server,1},
            {couch_rep,replicate,2},
            {couch_httpd_misc_handlers,handle_replicate_req,1},
            {couch_httpd,handle_request,5},
            {mochiweb_http,headers,5},
            {proc_lib,init_p_do_apply,3}]
1> [info] [<0.66.0>] 127.0.0.1 - - 'POST' /_replicate 500
1>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message