couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Baranczak (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (COUCHDB-966) More explicit error messages when there are file access errors due to lack of permission
Date Sat, 25 Feb 2012 03:57:46 GMT

    [ https://issues.apache.org/jira/browse/COUCHDB-966?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13216287#comment-13216287
] 

Mike Baranczak commented on COUCHDB-966:
----------------------------------------


1. Regarding Filipe's patch: I don't know if it's a good idea to send the full path of the
problematic file to a potentially untrusted client. This information should definitely be
written to the log, but the HTTP response can be a little less informative. "Something went
wrong, check the log" is perfectly OK. If I can't read the log, then I wouldn't be able to
fix the permissions anyway.

2. I'm using CouchDB 1.1.1 (installed on Mac OS via MacPorts), and I ran into something just
like this. The directory /opt/local/var/run/couchdb didn't exist, and CouchDB didn't have
the permissions to create it. Start-up failed with a completely non-descriptive error message.
Should I open a separate ticket for this?
                
> More explicit error messages when there are file access errors due to lack of permission
> ----------------------------------------------------------------------------------------
>
>                 Key: COUCHDB-966
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-966
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Database Core
>    Affects Versions: 1.0
>         Environment: Any
>            Reporter: MC Brown
>            Assignee: Filipe Manana
>            Priority: Minor
>             Fix For: 1.1, 1.2
>
>         Attachments: COUCHDB-966.patch, COUCHDB-966.patch
>
>
> 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 == {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}]},
>                                   {gen_server,call,
>                                    [couch_config,
>                                     {set,"uuids","algorithm","random",
>                                      true}]}}}
> None of this nicely points out that it is simply a file permission issue. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message