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

Logs Archive page doesn't show useful API error

    XMLWordPrintable

Details

    • MXS-SPRINT-230

    Description

      Instead of showing "AxiosError: Request failed with status code 400", the GUI show show the actual error it receives from the API.
      The GUI didn’t show any useful error because it looks like it didn’t receive anything from MaxScale.

      Steps to reproduce the error is to set `syslog=true` and then removing read access to the system journal.

      The following request returns nothing:

      curl 'http://127.0.0.1:8989/maxscale/logs/entries?page\[size\]=100&filter\[$.attributes.unix_timestamp\]=and(ge(1741212000),le(1741245248))' \
      -b 'token_sig=eyJhbGciOiJIUzI1NiJ9.eyJhY2NvdW50IjoiYWRtaW4iLCJhdWQiOiJhZG1pbiIsImV4cCI6MTc0MTMzMTA3MywiaWF0IjoxNzQxMjQ0NjczLCJpc3MiOiJtYXhzY2FsZSIsInN1YiI6ImFkbWluIn0.Xz2NmVWA9MRxf9_mv56UpoxvFq-2KoyLUFUtGGnm6LM'
      

      But this one does return errors:

      curl 'http://127.0.0.1:8989/maxscale/logs/entries' \
      -b 'token_sig=eyJhbGciOiJIUzI1NiJ9.eyJhY2NvdW50IjoiYWRtaW4iLCJhdWQiOiJhZG1pbiIsImV4cCI6MTc0MTMzMTA3MywiaWF0IjoxNzQxMjQ0NjczLCJpc3MiOiJtYXhzY2FsZSIsInN1YiI6ImFkbWluIn0.Xz2NmVWA9MRxf9_mv56UpoxvFq-2KoyLUFUtGGnm6LM'
      {
          "errors": [
              {
                  "detail": "Failed to read any data from the systemd journal. Make sure that the user that MaxScale is running as has the required permissions to read the log data. On most systems, this means that the 'maxscale' user must be a part of the 'systemd-journal' or 'wheel' groups. Alternatively, switch the log source to 'maxlog' by configuring 'maxlog=true' and 'syslog=false' under the '[maxscale]' section."
              }
          ]
      }
      

      So it looks like /maxscale/logs/entries or /maxscale/logs/entries?page[size]=100 returns errors but when filters are added, the errors aren’t returned.

      Attachments

        Activity

          People

            markus makela markus makela
            thien.ly Thien Ly
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.