Uploaded image for project: 'MariaDB MaxScale'
  1. MariaDB MaxScale
  2. MXS-2597

MaxScale doesn't handle errors from microhttpd

    XMLWordPrintable

Details

    Description

      MaxScale uses microhttpd to implement the admin interface/REST API:

      https://github.com/mariadb-corporation/MaxScale/blob/maxscale-2.3.9/server/core/admin.cc#L400

      microhttpd allows an application to handle errors by setting an error handler by calling the MHD_set_panic_func function:

      Function: void MHD_set_panic_func (MHD_PanicCallback cb, void *cls)
      Set a handler for fatal errors.

      cb
      function to call if MHD encounters a fatal internal error. If no handler was set explicitly, MHD will call abort.

      cls
      closure argument for cb; the other arguments are the name of the source file, line number and a string describing the nature of the fatal error (which can be NULL)

      https://www.gnu.org/software/libmicrohttpd/manual/html_node/microhttpd_002dinit.html

      MaxScale doesn't seem to currently do this, so microhttpd error messages are lost. This can make problems with the admin interface more difficult to debug.

      Attachments

        Issue Links

          Activity

            People

              markus makela markus makela
              GeoffMontee Geoff Montee (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.