zhaojinhong / modwsgi

Automatically exported from code.google.com/p/modwsgi
0 stars 0 forks source link

Request to disambiguiate error messages #268

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In wsgi_execute_remote(), there are error cases that share the exact same error 
log text and are therefore hard to diagnose.  Users would be more able to 
diagnose their own problems with more descriptive messages.

These two cases --

#1:

    /*
     * Only allow the process group to match against a restricted
     * set of processes if such a restricted set has been defined.
     */

    if (config->restrict_process) {
        if (!apr_table_get(config->restrict_process,
                           config->process_group)) {
            wsgi_log_script_error(r, apr_psprintf(r->pool, "Daemon "
                                  "process called '%s' cannot be "
                                  "accessed by this WSGI application",
                                  config->process_group), r->filename);

            return HTTP_INTERNAL_SERVER_ERROR;
        }
    }

and #2:

    /*
     * Only allow the process group to match against a daemon
     * process defined within a virtual host with the same
     * server name or a daemon process defined at global server
     * scope.
     */

    if (group->server != r->server && group->server != wsgi_server) {
        if (strcmp(group->server->server_hostname,
                   r->server->server_hostname) != 0) {
            wsgi_log_script_error(r, apr_psprintf(r->pool, "Daemon "
                                  "process called '%s' cannot be "
                                  "accessed by this WSGI application",
                                  config->process_group), r->filename);

            return HTTP_INTERNAL_SERVER_ERROR;
        }

.. have the same error messages.

The first could use more detail in the message to say "because the process 
group ... (whatever)".  Sorry, I'm not knowledgeable enough about the error 
condition to suggest improved text on this one.

The second could use more detail to say "because the same daemon is used by 
more than one virtual server, but the ServerName parameters of the virtual 
servers do not match".

mod_wsgi is awesome, thank you so much

Original issue reported on code.google.com by stephani...@gmail.com on 13 Jun 2012 at 9:45

GoogleCodeExporter commented 9 years ago
Was finally addressed in 4.3.3.

Original comment by Graham.Dumpleton@gmail.com on 12 Nov 2014 at 10:31