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

Malformed disk image error

    XMLWordPrintable

Details

    Description

      Folks,

      I've been working with the dynamic commands on MariaDB Maxscale 2.1.10 and when loading configurations, I found the below:

      2017-11-16 12:48:56   error  : [mysqlmon] No Master can be determined
      2017-11-16 12:48:56   error  : (6) [MySQLAuth] Failed to delete old users: database disk image is malformed
      2017-11-16 12:48:56   notice : (6) [MySQLAuth] [rwsplit-service] No users were loaded but 'inject_service_user' is enabled. Enabling service credentials for authentication until database users have been successfully loaded.
      

      It's relevant to say that, it's a new Maxscale server but, for existing backends, so, user/password for MySQLAuth does exist.

      How to repeat it:

      CentOS 7.2 fresh install
      Get Maxscale 2.1.10 rpm and setup
      Put together a basic config

      [root@maxscale ~]# cat ~/maxscale_configs/basic.cnf
      [maxscale]
      threads=auto
       
      [rwsplit-service]
      type=service
      router=readwritesplit
      user=maxuser
      passwd=FD08F35D87C442AABA518CFB7471D691
       
      [CLI]
      type=service
      router=cli
       
      [CLI Listener]
      type=listener
      service=CLI
      protocol=maxscaled
      socket=default
      

      Start maxscale:

      [root@maxscale ~]# maxscale -f ~/maxscale_configs/basic.cnf
      [root@maxscale ~]#
      

      Execute the below static script:

      [root@maxscale ~]# cat maxscale_objects/readwritesplitter.obj
      #!/bin/bash
      #: the below will create the readwritesplitter for defined replication servers
      maxadmin create monitor cluster-monitor mysqlmon
      maxadmin alter monitor cluster-monitor user=maxuser password=FD08F35D87C442AABA518CFB7471D691 monitor_interval=10000
      maxadmin restart monitor cluster-monitor
      maxadmin list monitors
      maxadmin create listener rwsplit-service rwsplit-listener 0.0.0.0 4006
      maxadmin list listeners
      maxadmin list services
      maxadmin create server prod_mariadb01 192.168.50.11 3306
      maxadmin create server prod_mariadb02 192.168.50.12 3306
      maxadmin create server prod_mariadb03 192.168.50.13 3306
      maxadmin list servers
      maxadmin add server prod_mariadb01 cluster-monitor rwsplit-service
      maxadmin add server prod_mariadb02 cluster-monitor rwsplit-service
      maxadmin add server prod_mariadb03 cluster-monitor rwsplit-service
      maxadmin list servers
      

      Logs will be like below:

      MariaDB MaxScale  /var/log/maxscale/maxscale.log  Thu Nov 16 12:05:49 2017
      ----------------------------------------------------------------------------
      2017-11-16 12:05:49   notice : Working directory: /var/log/maxscale
      2017-11-16 12:05:49   notice : MariaDB MaxScale 2.1.10 started
      2017-11-16 12:05:49   notice : MaxScale is running in process 4269
      2017-11-16 12:05:49   notice : Configuration file: /root/maxscale_configs/basic.cnf
      2017-11-16 12:05:49   notice : Log directory: /var/log/maxscale
      2017-11-16 12:05:49   notice : Data directory: /var/lib/maxscale
      2017-11-16 12:05:49   notice : Module directory: /usr/lib64/maxscale
      2017-11-16 12:05:49   notice : Service cache: /var/cache/maxscale
      2017-11-16 12:05:49   notice : Loading /root/maxscale_configs/basic.cnf.
      2017-11-16 12:05:49   notice : /root/maxscale_configs/basic.cnf.d does not exist, not reading.
      2017-11-16 12:05:49   notice : [cli] Initialise CLI router module
      2017-11-16 12:05:49   notice : Loaded module cli: V1.0.0 from /usr/lib64/maxscale/libcli.so
      2017-11-16 12:05:49   notice : [readwritesplit] Initializing statement-based read/write split router module.
      2017-11-16 12:05:49   notice : Loaded module readwritesplit: V1.1.0 from /usr/lib64/maxscale/libreadwritesplit.so
      2017-11-16 12:05:49   notice : Loaded module maxscaled: V2.0.0 from /usr/lib64/maxscale/libmaxscaled.so
      2017-11-16 12:05:49   notice : Loaded module MaxAdminAuth: V2.1.0 from /usr/lib64/maxscale/libMaxAdminAuth.so
      2017-11-16 12:05:49   notice : No query classifier specified, using default 'qc_sqlite'.
      2017-11-16 12:05:49   notice : Loaded module qc_sqlite: V1.0.0 from /usr/lib64/maxscale/libqc_sqlite.so
      2017-11-16 12:05:49   warning: Service 'rwsplit-service' has no listeners defined.
      2017-11-16 12:05:49   notice : Listening for connections at [/tmp/maxadmin.sock]:0 with protocol MaxScale Admin
      2017-11-16 12:05:49   notice : MaxScale started with 1 server threads.
      2017-11-16 12:05:49   notice : Started MaxScale log flusher.
      2017-11-16 12:48:56   notice : (2) [mysqlmon] Initialise the MySQL Monitor module.
      2017-11-16 12:48:56   notice : (2) Loaded module mysqlmon: V1.5.0 from /usr/lib64/maxscale/libmysqlmon.so
      2017-11-16 12:48:56   notice : (2) Created monitor 'cluster-monitor'
      2017-11-16 12:48:56   notice : (3) Updated monitor 'cluster-monitor': user=maxuser
      2017-11-16 12:48:56   notice : (3) Updated monitor 'cluster-monitor': password=FD08F35D87C442AABA518CFB7471D691
      2017-11-16 12:48:56   notice : (3) Updated monitor 'cluster-monitor': monitor_interval=10000
      2017-11-16 12:48:56   notice : (6) Loaded module MySQLClient: V1.1.0 from /usr/lib64/maxscale/libMySQLClient.so
      2017-11-16 12:48:56   notice : (6) Loaded module MySQLAuth: V1.1.0 from /usr/lib64/maxscale/libMySQLAuth.so
      2017-11-16 12:48:56   notice : (6) Using encrypted passwords. Encryption key: '/var/lib/maxscale/.secrets'.
      2017-11-16 12:48:56   error  : [mysqlmon] No Master can be determined
      2017-11-16 12:48:56   error  : (6) [MySQLAuth] Failed to delete old users: database disk image is malformed
      2017-11-16 12:48:56   notice : (6) [MySQLAuth] [rwsplit-service] No users were loaded but 'inject_service_user' is enabled. Enabling service credentials for authentication until database users have been successfully loaded.
      2017-11-16 12:48:56   notice : (6) Listening for connections at [0.0.0.0]:4006 with protocol MySQL
      2017-11-16 12:48:56   notice : (6) Created listener 'rwsplit-listener' at 0.0.0.0:4006 for service 'rwsplit-service'
      2017-11-16 12:48:56   notice : (10) Loaded module MySQLBackend: V2.0.0 from /usr/lib64/maxscale/libMySQLBackend.so
      2017-11-16 12:48:56   notice : (10) Loaded module MySQLBackendAuth: V1.0.0 from /usr/lib64/maxscale/libMySQLBackendAuth.so
      2017-11-16 12:48:56   notice : (10) Created server 'prod_mariadb01' at 192.168.50.11:3306
      2017-11-16 12:48:56   notice : (11) Created server 'prod_mariadb02' at 192.168.50.12:3306
      2017-11-16 12:48:56   notice : (12) Created server 'prod_mariadb03' at 192.168.50.13:3306
      2017-11-16 12:48:56   notice : (14) Added server 'prod_mariadb01' to monitor 'cluster-monitor'
      2017-11-16 12:48:56   notice : (14) Added server 'prod_mariadb01' to service 'rwsplit-service'
      ^@2017-11-16 12:48:56   notice : Server changed state: prod_mariadb01[192.168.50.11:3306]: new_master. [Running] -> [Master, Running]
      2017-11-16 12:48:56   notice : [mysqlmon] A Master Server is now available: 192.168.50.11:3306
      2017-11-16 12:48:56   notice : (15) Added server 'prod_mariadb02' to monitor 'cluster-monitor'
      2017-11-16 12:48:56   notice : (15) Added server 'prod_mariadb02' to service 'rwsplit-service'
      2017-11-16 12:48:56   notice : Server changed state: prod_mariadb02[192.168.50.12:3306]: new_slave. [Running] -> [Slave, Running]
      2017-11-16 12:48:56   notice : (16) Added server 'prod_mariadb03' to monitor 'cluster-monitor'
      2017-11-16 12:48:56   notice : (16) Added server 'prod_mariadb03' to service 'rwsplit-service'
      2017-11-16 12:48:57   notice : Server changed state: prod_mariadb03[192.168.50.13:3306]: new_slave. [Running] -> [Slave, Running]
      

      Thanks folks.

      Attachments

        Issue Links

          Activity

            People

              markus makela markus makela
              wagnerbianchi Wagner Bianchi (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.