Uploaded image for project: 'CouchDB'
  1. CouchDB
  2. COUCHDB-966

More explicit error messages when there are file access errors due to lack of permission

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.0
    • 1.1, 1.2
    • Database Core
    • None
    • Any

    Description

      If you try to update the configuration settings, either through the API or Futon, but the underlying configuration files are not writable by the CouchDB process, the API response is '500', and the Futon response is just to appear to have frozen.

      Checking the log, you get this output:

      [Thu, 25 Nov 2010 12:51:45 GMT] [error] [<0.31700.81>] ** Generic server couch_config terminating

        • Last message in was {set,"uuids","algorithm","random",true}
        • When Server state ==
          Unknown macro: {config,[{<0.31726.81>,#Fun<couch_config.2.4103357>}, {<0.31719.81>,#Fun<couch_config.3.18912695>},
          {<0.31719.81>,#Fun<couch_config.3.18912695>}, {<0.31717.81>,#Fun<couch_config.2.4103357>}, {<0.31715.81>,#Fun<couch_config.2.4103357>}, {<0.31714.81>,#Fun<couch_config.2.4103357>},
          {<0.31714.81>,#Fun<couch_config.2.4103357>}, {<0.31712.81>,#Fun<couch_config.3.18912695>}, {<0.31711.81>,#Fun<couch_config.2.4103357>}, {<0.31709.81>,#Fun<couch_config.2.4103357>}, {false,#Fun<couch_server.3.123842465>}, {<0.31706.81>,#Fun<couch_config.3.18912695>}, {<0.31706.81>,#Fun<couch_config.2.4103357>}, {<0.6.0>,#Fun<couch_config.2.4103357>}], "/etc/couchdb/local.ini"}
        • Reason for termination ==
        • badmatch,{error,eacces,
          [ {couch_config_writer,save_to_file,2},
          {couch_config,handle_call,3},
          {gen_server,handle_msg,5},
          {proc_lib,init_p_do_apply,3}]}


          [Thu, 25 Nov 2010 12:51:45 GMT] [error] [<0.31700.81>] {error_report,<0.32.0>,
          {<0.31700.81>,crash_report,
          [[{initial_call,{couch_config,init,['Argument__1']}},
          {pid,<0.31700.81>},
          {registered_name,couch_config},
          {error_info,{exit,badmatch,{error,eacces,
          [{couch_config_writer,save_to_file,2}

          ,

          {couch_config,handle_call,3},
          {gen_server,handle_msg,5},
          {proc_lib,init_p_do_apply,3}]},
          [{gen_server,terminate,6},
          {proc_lib,init_p_do_apply,3}]}},
          {ancestors,[couch_server_sup,<0.33.0>]},
          {messages,[]},
          {links,[<0.79.0>]},
          {dictionary,[]},
          {trap_exit,false},
          {status,running},
          {heap_size,6765},
          {stack_size,24},
          {reductions,52930}],
          []]}}

          [Thu, 25 Nov 2010 12:51:45 GMT] [error] [<0.79.0>] {error_report,<0.32.0>,
          {<0.79.0>,supervisor_report,
          [{supervisor,{local,couch_server_sup}},
          {errorContext,child_terminated},
          {reason,
          badmatch,{error,eacces,
          [{couch_config_writer,save_to_file,2},
          {couch_config,handle_call,3}

          ,

          {gen_server,handle_msg,5},
          {proc_lib,init_p_do_apply,3}]}},
          {offender,
          [{pid,<0.31700.81>},
          {name,couch_config},
          {mfa,
          {couch_server_sup,couch_config_start_link_wrapper,
          [["/etc/couchdb/default.ini","/etc/couchdb/local.ini",
          "/etc/couchdb/default.ini","/etc/couchdb/local.ini"],
          <0.78.0>]}},
          {restart_type,permanent},
          {shutdown,brutal_kill},
          {child_type,worker}]}]}}

          [Thu, 25 Nov 2010 12:51:45 GMT] [error] [<0.31718.81>] Uncaught error in HTTP request: {exit,
          {badmatch,{error,eacces,
          [{couch_config_writer,save_to_file,2},
          {couch_config,handle_call,3},
          {gen_server,handle_msg,5}

          ,

          {proc_lib,init_p_do_apply,3}

          ]},

          Unknown macro: {gen_server,call, [couch_config, {set,"uuids","algorithm","random", true}]}

          }}

      None of this nicely points out that it is simply a file permission issue.

      Attachments

        1. COUCHDB-966.patch
          5 kB
          Filipe David Borba Manana
        2. COUCHDB-966.patch
          5 kB
          Filipe David Borba Manana

        Activity

          People

            fdmanana Filipe David Borba Manana
            mccouch MC Brown
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: