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

maxctrl commands exception with file .maxctrl.cnf

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 6.2.4
    • 6.3.0
    • maxctrl
    • None

    Description

      With the .maxctrl.cnf file created, having the details like below:

      [maxscale@test001 ~]$ cat .maxctrl.cnf
      [maxctrl]
      --hosts=test001:8989
      --user=admin123
      --password=password

      Note: I have created a user admin123.

      Trying to run maxctrl -h <hostname>:8989 -u <user> -p <pass> show maxscale or any commands like show servers, list servers are throwing following error.

      example:
      ====
      [maxscale@test001 ~]$ maxctrl -h 127.0.0.1:8989 -u admin123 -p password show maxscale
      (node:28803) UnhandledPromiseRejectionWarning: TypeError: undefined is not a function
      at /snapshot/maxctrl/lib/common.js
      at Object.handler (/snapshot/maxctrl/lib/show.js)
      at /snapshot/maxctrl/node_modules/yargs/build/index.cjs:1:9114
      at j (/snapshot/maxctrl/node_modules/yargs/build/index.cjs:1:4993)
      at M.applyMiddlewareAndGetResult (/snapshot/maxctrl/node_modules/yargs/build/index.cjs:1:9083)
      at M.runCommand (/snapshot/maxctrl/node_modules/yargs/build/index.cjs:1:7268)
      at Jt.[runYargsParserAndExecuteCommands] (/snapshot/maxctrl/node_modules/yargs/build/index.cjs:1:56059)
      at M.parseAndUpdateUsage (/snapshot/maxctrl/node_modules/yargs/build/index.cjs:1:8035)
      at M.applyBuilderUpdateUsageAndParse (/snapshot/maxctrl/node_modules/yargs/build/index.cjs:1:7744)
      at M.runCommand (/snapshot/maxctrl/node_modules/yargs/build/index.cjs:1:7115)
      (Use `maxctrl --trace-warnings ...` to show where the warning was created)
      (node:28803) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
      (node:28803) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

      If we remove the .maxctrl.cnf file, all commands with maxctrl are working fine.

      example:
      ======
      [maxscale@test001 ~]$ mv .maxctrl.cnf .maxctrl.cnf_old
      [maxscale@test001 ~]$ maxctrl -h 127.0.0.1:8989 -u admin123 -p password show maxscale
      ┌──────────────┬──────────────────────────────────────────────────────────┐
      │ Version │ 6.2.4 │
      ├──────────────┼──────────────────────────────────────────────────────────┤
      │ Commit │ 6e1317be296490366b7bf11b8e9b1864acc365d6 │
      ├──────────────┼──────────────────────────────────────────────────────────┤
      │ Started At │ Wed, 06 Apr 2022 00:30:16 GMT │
      ├──────────────┼──────────────────────────────────────────────────────────┤
      │ Activated At │ Wed, 06 Apr 2022 00:30:16 GMT │

      Attachments

        Activity

          People

            markus makela markus makela
            suresh.ramagiri@mariadb.com suresh ramagiri
            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.