You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Richard Llewellyn <ll...@gmail.com> on 2011/04/09 19:26:23 UTC

couchb does not start after changing database_dir

Hi,
I've changed database_dir in local.ini to a directory on a different
partition (/data/mydata/couchdb), w/ same permissions (drwxrwx---  3 couchdb
couchdb 4.0K 2011-04-09 11:41 couchdb).

Couchdb now fails to start (see log message below).
I've tried changing view_index_dir as well, which seems ok alone but does
not prevent failure when done with database_dir change.
I have copied _users.couch and couch.uri to this new directory -- the latter
was a shot in the newbie dark.  I don't think this changed anything.

Thanks in advance for any suggestions.

Log:

[Sat, 09 Apr 2011 16:54:40 GMT] [error] [<0.91.0>] {error_report,<0.32.0>,
    {<0.91.0>,crash_report,
     [[{initial_call,{couch_file,init,['Argument__1']}},
       {pid,<0.91.0>},
       {registered_name,[]},
       {error_info,
           {exit,
               {{badmatch,{error,eacces}},
                [{couch_file,init,1},
                 {gen_server,init_it,6},
                 {proc_lib,init_p_do_apply,3}]},
               [{gen_server,init_it,6},{proc_lib,init_p_do_apply,3}]}},
       {ancestors,[<0.90.0>]},
       {messages,[]},
       {links,[#Port<0.1778>,<0.90.0>]},
       {dictionary,[]},
       {trap_exit,true},
       {status,running},
       {heap_size,377},
       {stack_size,24},
       {reductions,460}],
      [{neighbour,
           [{pid,<0.90.0>},
            {registered_name,[]},
            {initial_call,{erlang,apply,2}},
            {current_function,{proc_lib,sync_wait,2}},
            {ancestors,[]},
            {messages,
                [{ack,<0.91.0>,
                     {error,
                         {{badmatch,{error,eacces}},
                          [{couch_file,init,1},
                           {gen_server,init_it,6},
                           {proc_lib,init_p_do_apply,3}]}}}]},
            {links,[<0.85.0>,<0.91.0>]},
            {dictionary,[]},
            {trap_exit,false},
            {status,runnable},
            {heap_size,233},
            {stack_size,18},
            {reductions,28}]}]]}}

[Sat, 09 Apr 2011 16:54:40 GMT] [error] [<0.85.0>] Unexpected message,
restarting couch_server: {'EXIT',<0.90.0>,
                                              {{badmatch,{error,eacces}},
                                               [{couch_file,init,1},
                                                {gen_server,init_it,6},
                                                {proc_lib,init_p_do_apply,
                                                 3}]}}

[Sat, 09 Apr 2011 16:54:40 GMT] [error] [<0.85.0>] ** Generic server
couch_server terminating
** Last message in was {'EXIT',<0.90.0>,
                               {{badmatch,{error,eacces}},
                                [{couch_file,init,1},
                                 {gen_server,init_it,6},
                                 {proc_lib,init_p_do_apply,3}]}}
** When Server state == {server,"/data/mydata/couchdb",
                            {re_pattern,0,0,

 <<69,82,67,80,124,0,0,0,16,0,0,0,1,0,0,0,0,0,

 0,0,0,0,0,0,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,

 0,0,0,0,0,0,0,0,0,93,0,72,25,77,0,0,0,0,0,0,

 0,0,0,0,0,0,254,255,255,7,0,0,0,0,0,0,0,0,0,

 0,0,0,0,0,0,0,77,0,0,0,0,16,171,255,3,0,0,0,

 128,254,255,255,7,0,0,0,0,0,0,0,0,0,0,0,0,0,
                                  0,0,0,69,26,84,0,72,0>>},
                            100,0,"Sat, 09 Apr 2011 16:54:40 GMT"}
** Reason for termination ==
** kill


[Sat, 09 Apr 2011 16:54:40 GMT] [error] [<0.85.0>] {error_report,<0.32.0>,
              {<0.85.0>,crash_report,
               [[{initial_call,{couch_server,init,['Argument__1']}},
                 {pid,<0.85.0>},
                 {registered_name,couch_server},
                 {error_info,{exit,kill,
                                   [{gen_server,terminate,6},
                                    {proc_lib,init_p_do_apply,3}]}},
                 {ancestors,[couch_primary_services,couch_server_sup,
                             <0.33.0>]},
                 {messages,[]},
                 {links,[<0.80.0>]},
                 {dictionary,[]},
                 {trap_exit,true},
                 {status,running},
                 {heap_size,1597},
                 {stack_size,24},
                 {reductions,3216}],
                []]}}

[Sat, 09 Apr 2011 16:54:40 GMT] [error] [<0.80.0>] {error_report,<0.32.0>,
              {<0.80.0>,supervisor_report,
               [{supervisor,{local,couch_primary_services}},
                {errorContext,child_terminated},
                {reason,kill},
                {offender,[{pid,<0.85.0>},
                           {name,couch_server},
                           {mfa,{couch_server,sup_start_link,[]}},
                           {restart_type,permanent},
                           {shutdown,1000},
                           {child_type,worker}]}]}}

[Sat, 09 Apr 2011 16:54:40 GMT] [error] [<0.89.0>] {error_report,<0.32.0>,
    {<0.89.0>,crash_report,
     [[{initial_call,{couch_auth_cache,init,['Argument__1']}},
       {pid,<0.89.0>},
       {registered_name,[]},
       {error_info,
           {exit,
               {kill,
                   {gen_server,call,
                       [couch_server,
                        {open,<<"_users">>,
                            [{user_ctx,
                                 {user_ctx,null,[<<"_admin">>],undefined}},
                             sys_db]},
                        infinity]}},
               [{gen_server,init_it,6},{proc_lib,init_p_do_apply,3}]}},
       {ancestors,[couch_secondary_services,couch_server_sup,<0.33.0>]},
       {messages,[]},
       {links,[<0.87.0>]},
       {dictionary,[]},
       {trap_exit,false},
       {status,running},
       {heap_size,233},
       {stack_size,24},
       {reductions,136}],
      []]}}

[Sat, 09 Apr 2011 16:54:40 GMT] [error] [<0.87.0>] {error_report,<0.32.0>,
    {<0.87.0>,supervisor_report,
     [{supervisor,{local,couch_secondary_services}},
      {errorContext,start_error},
      {reason,
          {kill,
              {gen_server,call,
                  [couch_server,
                   {open,<<"_users">>,
                       [{user_ctx,{user_ctx,null,[<<"_admin">>],undefined}},
                        sys_db]},
                   infinity]}}},
      {offender,
          [{pid,undefined},
           {name,auth_cache},
           {mfa,{couch_auth_cache,start_link,[]}},
           {restart_type,permanent},
           {shutdown,1000},
           {child_type,worker}]}]}}

[Sat, 09 Apr 2011 16:54:40 GMT] [error] [<0.79.0>] {error_report,<0.32.0>,
    {<0.79.0>,supervisor_report,
     [{supervisor,{local,couch_server_sup}},
      {errorContext,start_error},
      {reason,shutdown},
      {offender,
          [{pid,undefined},
           {name,couch_secondary_services},
           {mfa,{couch_server_sup,start_secondary_services,[]}},
           {restart_type,permanent},
           {shutdown,infinity},
           {child_type,supervisor}]}]}}

Re: couchb does not start after changing database_dir

Posted by Richard Llewellyn <ll...@gmail.com>.
Well, another shot in the dark, removing the old (copied)  _user.couch from
new directory, seems to have fixed it.


On Sat, Apr 9, 2011 at 11:26 AM, Richard Llewellyn <ll...@gmail.com>wrote:

> Hi,
> I've changed database_dir in local.ini to a directory on a different
> partition (/data/mydata/couchdb), w/ same permissions (drwxrwx---  3 couchdb
> couchdb 4.0K 2011-04-09 11:41 couchdb).
>
> Couchdb now fails to start (see log message below).
> I've tried changing view_index_dir as well, which seems ok alone but does
> not prevent failure when done with database_dir change.
> I have copied _users.couch and couch.uri to this new directory -- the
> latter was a shot in the newbie dark.  I don't think this changed anything.
>
> Thanks in advance for any suggestions.
>
> Log:
>
> [Sat, 09 Apr 2011 16:54:40 GMT] [error] [<0.91.0>] {error_report,<0.32.0>,
>     {<0.91.0>,crash_report,
>      [[{initial_call,{couch_file,init,['Argument__1']}},
>        {pid,<0.91.0>},
>        {registered_name,[]},
>        {error_info,
>            {exit,
>                {{badmatch,{error,eacces}},
>                 [{couch_file,init,1},
>                  {gen_server,init_it,6},
>                  {proc_lib,init_p_do_apply,3}]},
>                [{gen_server,init_it,6},{proc_lib,init_p_do_apply,3}]}},
>        {ancestors,[<0.90.0>]},
>        {messages,[]},
>        {links,[#Port<0.1778>,<0.90.0>]},
>        {dictionary,[]},
>        {trap_exit,true},
>        {status,running},
>        {heap_size,377},
>        {stack_size,24},
>        {reductions,460}],
>       [{neighbour,
>            [{pid,<0.90.0>},
>             {registered_name,[]},
>             {initial_call,{erlang,apply,2}},
>             {current_function,{proc_lib,sync_wait,2}},
>             {ancestors,[]},
>             {messages,
>                 [{ack,<0.91.0>,
>                      {error,
>                          {{badmatch,{error,eacces}},
>                           [{couch_file,init,1},
>                            {gen_server,init_it,6},
>                            {proc_lib,init_p_do_apply,3}]}}}]},
>             {links,[<0.85.0>,<0.91.0>]},
>             {dictionary,[]},
>             {trap_exit,false},
>             {status,runnable},
>             {heap_size,233},
>             {stack_size,18},
>             {reductions,28}]}]]}}
>
> [Sat, 09 Apr 2011 16:54:40 GMT] [error] [<0.85.0>] Unexpected message,
> restarting couch_server: {'EXIT',<0.90.0>,
>                                               {{badmatch,{error,eacces}},
>                                                [{couch_file,init,1},
>                                                 {gen_server,init_it,6},
>                                                 {proc_lib,init_p_do_apply,
>                                                  3}]}}
>
> [Sat, 09 Apr 2011 16:54:40 GMT] [error] [<0.85.0>] ** Generic server
> couch_server terminating
> ** Last message in was {'EXIT',<0.90.0>,
>                                {{badmatch,{error,eacces}},
>                                 [{couch_file,init,1},
>                                  {gen_server,init_it,6},
>                                  {proc_lib,init_p_do_apply,3}]}}
> ** When Server state == {server,"/data/mydata/couchdb",
>                             {re_pattern,0,0,
>
>  <<69,82,67,80,124,0,0,0,16,0,0,0,1,0,0,0,0,0,
>
>  0,0,0,0,0,0,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
>
>  0,0,0,0,0,0,0,0,0,93,0,72,25,77,0,0,0,0,0,0,
>
>  0,0,0,0,0,0,254,255,255,7,0,0,0,0,0,0,0,0,0,
>
>  0,0,0,0,0,0,0,77,0,0,0,0,16,171,255,3,0,0,0,
>
>  128,254,255,255,7,0,0,0,0,0,0,0,0,0,0,0,0,0,
>                                   0,0,0,69,26,84,0,72,0>>},
>                             100,0,"Sat, 09 Apr 2011 16:54:40 GMT"}
> ** Reason for termination ==
> ** kill
>
>
> [Sat, 09 Apr 2011 16:54:40 GMT] [error] [<0.85.0>] {error_report,<0.32.0>,
>               {<0.85.0>,crash_report,
>                [[{initial_call,{couch_server,init,['Argument__1']}},
>                  {pid,<0.85.0>},
>                  {registered_name,couch_server},
>                  {error_info,{exit,kill,
>                                    [{gen_server,terminate,6},
>                                     {proc_lib,init_p_do_apply,3}]}},
>                  {ancestors,[couch_primary_services,couch_server_sup,
>                              <0.33.0>]},
>                  {messages,[]},
>                  {links,[<0.80.0>]},
>                  {dictionary,[]},
>                  {trap_exit,true},
>                  {status,running},
>                  {heap_size,1597},
>                  {stack_size,24},
>                  {reductions,3216}],
>                 []]}}
>
> [Sat, 09 Apr 2011 16:54:40 GMT] [error] [<0.80.0>] {error_report,<0.32.0>,
>               {<0.80.0>,supervisor_report,
>                [{supervisor,{local,couch_primary_services}},
>                 {errorContext,child_terminated},
>                 {reason,kill},
>                 {offender,[{pid,<0.85.0>},
>                            {name,couch_server},
>                            {mfa,{couch_server,sup_start_link,[]}},
>                            {restart_type,permanent},
>                            {shutdown,1000},
>                            {child_type,worker}]}]}}
>
> [Sat, 09 Apr 2011 16:54:40 GMT] [error] [<0.89.0>] {error_report,<0.32.0>,
>     {<0.89.0>,crash_report,
>      [[{initial_call,{couch_auth_cache,init,['Argument__1']}},
>        {pid,<0.89.0>},
>        {registered_name,[]},
>        {error_info,
>            {exit,
>                {kill,
>                    {gen_server,call,
>                        [couch_server,
>                         {open,<<"_users">>,
>                             [{user_ctx,
>                                  {user_ctx,null,[<<"_admin">>],undefined}},
>                              sys_db]},
>                         infinity]}},
>                [{gen_server,init_it,6},{proc_lib,init_p_do_apply,3}]}},
>        {ancestors,[couch_secondary_services,couch_server_sup,<0.33.0>]},
>        {messages,[]},
>        {links,[<0.87.0>]},
>        {dictionary,[]},
>        {trap_exit,false},
>        {status,running},
>        {heap_size,233},
>        {stack_size,24},
>        {reductions,136}],
>       []]}}
>
> [Sat, 09 Apr 2011 16:54:40 GMT] [error] [<0.87.0>] {error_report,<0.32.0>,
>     {<0.87.0>,supervisor_report,
>      [{supervisor,{local,couch_secondary_services}},
>       {errorContext,start_error},
>       {reason,
>           {kill,
>               {gen_server,call,
>                   [couch_server,
>                    {open,<<"_users">>,
>
> [{user_ctx,{user_ctx,null,[<<"_admin">>],undefined}},
>                         sys_db]},
>                    infinity]}}},
>       {offender,
>           [{pid,undefined},
>            {name,auth_cache},
>            {mfa,{couch_auth_cache,start_link,[]}},
>            {restart_type,permanent},
>            {shutdown,1000},
>            {child_type,worker}]}]}}
>
> [Sat, 09 Apr 2011 16:54:40 GMT] [error] [<0.79.0>] {error_report,<0.32.0>,
>     {<0.79.0>,supervisor_report,
>      [{supervisor,{local,couch_server_sup}},
>       {errorContext,start_error},
>       {reason,shutdown},
>       {offender,
>           [{pid,undefined},
>            {name,couch_secondary_services},
>            {mfa,{couch_server_sup,start_secondary_services,[]}},
>            {restart_type,permanent},
>            {shutdown,infinity},
>            {child_type,supervisor}]}]}}
>
>
>
>
>
>
>
>