开发者

couchdb not starting with alternate config directory

I have couchdb 1.1.0 installed, and it is running fine, when starting using the normal config files. That is, starting as:

couchdb

will allow me to do the usual:

curl -X GET http://127.0.0.1:5984/
{"couchdb":"Welcome","version":"1.1.0"}

Now, I need to start couchdb with an alternate config directory. For that, I fire couchdb with the following command:

couchdb -n -a test.ini

The start up is successful, and couchdb is listening to http://127.0.0.1:5984

However, as soon as I do a GET operation, couchdb crashes:

[error] [<0.196.0>] {error_report,<0.31.0>,
                     {<0.196.0>,crash_report,
                      [[{initial_call,
                         {mochiweb_acceptor,init,
                          [开发者_开发问答'Argument__1','Argument__2','Argument__3']}},
                        {pid,<0.196.0>},
                        {registered_name,[]},
                        {error_info,
                         {exit,
                          {noproc,
                           {gen_server,call,
                            [couch_httpd_vhost,
                             {match_vhost,
                              {mochiweb_request,#Port<0.2102>,'GET',"/",
                               {1,1},
                               {3,
                                {"user-agent",
                                 {'User-Agent',
                                  "curl/7.19.7 (i486-pc-linux-gnu) libcurl/7.19.7 OpenSSL/0.9.8k zlib/1.2.3.3 libidn/1.15"},
                                 {"host",
                                  {'Host',"127.0.0.1:5984"},
                                  {"accept",{'Accept',"*/*"},nil,nil},
                                  nil},
                                 nil}}}}]}},
                          [{gen_server,call,2},
                           {couch_httpd_vhost,match_vhost,1},
                           {couch_httpd,handle_request,5},
                           {mochiweb_http,headers,5},
                           {proc_lib,init_p_do_apply,3}]}},
                        {ancestors,
                         [couch_httpd,couch_secondary_services,
                          couch_server_sup,<0.32.0>]},
                        {messages,[]},
                        {links,[<0.103.0>,#Port<0.2102>]},
                        {dictionary,[]},
                        {trap_exit,false},
                        {status,running},
                        {heap_size,610},
                        {stack_size,24},
                        {reductions,672}],
                       []]}}
=CRASH REPORT==== 19-Aug-2011::17:03:44 ===
  crasher:
    initial call: mochiweb_acceptor:init/3
    pid: <0.196.0>
    registered_name: []
    exception exit: {noproc,
                     {gen_server,call,
                      [couch_httpd_vhost,
                       {match_vhost,
                        {mochiweb_request,#Port<0.2102>,'GET',"/",
                         {1,1},
                         {3,
                          {"user-agent",
                           {'User-Agent',
                            "curl/7.19.7 (i486-pc-linux-gnu) libcurl/7.19.7 OpenSSL/0.9.8k zlib/1.2.3.3 libidn/1.15"},
                           {"host",
                            {'Host',"127.0.0.1:5984"},
                            {"accept",{'Accept',"*/*"},nil,nil},
                            nil},
                           nil}}}}]}}
      in function  gen_server:call/2
      in call from couch_httpd_vhost:match_vhost/1
      in call from couch_httpd:handle_request/5
      in call from mochiweb_http:headers/5
    ancestors: [couch_httpd,couch_secondary_services,couch_server_sup,
                  <0.32.0>]
    messages: []
    links: [<0.103.0>,#Port<0.2102>]
    dictionary: []
    trap_exit: false
    status: running
    heap_size: 610
    stack_size: 24
    reductions: 672
  neighbours:

Any idea what could be going on?


Well, I think I found the problem, so I will answer my own question, for reference.

My configuration file (test.ini) was lacking (compared to the stock default.ini) the following options in the [daemon] section:

replication_manager={couch_replication_manager, start_link, []}
vhosts={couch_httpd_vhost, start_link, []}
os_daemons={couch_os_daemons, start_link, []}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜