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

[mariadbmon] The current master server 'server1' is no longer valid because it has been down over 5 (failcount) monitor updates and it does not have any running slaves, but there is no valid alternative to swap to.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Incomplete
    • Affects Version/s: None
    • Fix Version/s: N/A
    • Component/s: N/A
    • Labels:
      None
    • Environment:
      maxscale 2.5,mariadb 10.5

      Description

      maxscale.cnf

      root@u1:/etc# cat maxscale.cnf

      1. MaxScale documentation:
      2. https://mariadb.com/kb/en/mariadb-maxscale-24/
      1. Global parameters
        #
      2. Complete list of configuration options:
      3. https://mariadb.com/kb/en/mariadb-maxscale-24-mariadb-maxscale-configuration-guide/

      [maxscale]
      threads=auto
      admin_host=0.0.0.0
      admin_secure_gui=false

      1. Server definitions
        #
      2. Set the address of the server to the network
      3. address of a MariaDB server.
        #

      [server1]
      type=server
      address=192.168.8.248
      port=3306
      protocol=MariaDBBackend

      [server2]
      type=server
      address=192.168.8.32
      port=3306
      protocol=MariaDBBackend

      1. Monitor for the servers
        #
      2. This will keep MaxScale aware of the state of the servers.
      3. MariaDB Monitor documentation:
      4. https://mariadb.com/kb/en/mariadb-maxscale-24-mariadb-monitor/

      [MariaDB-Monitor]
      type=monitor
      module=mariadbmon
      servers=server1,server2
      user=monitor_user
      password=123456
      monitor_interval=2000

      1. Service definitions
        #
      2. Service Definition for a read-only service and
      3. a read/write splitting service.
        #
      1. ReadConnRoute documentation:
      2. https://mariadb.com/kb/en/mariadb-maxscale-24-readconnroute/

      [Master-Slave-Service]
      type=service
      router=readwritesplit
      servers=server1,server2
      user=maxscale
      password=123456
      #router_options=master,slave
      max_connections=1024

      1. Listener definitions for the services
        #
      2. These listeners represent the ports the
      3. services will listen on.
        #

      [Master-Slaver-Listener]
      type=listener
      service=Master-Slave-Service
      protocol=MariaDBClient
      port=4008

      root@u1:/etc#

      I run it on ubuntu 20.04 lts, My mariadb master, slave is ok.
      but after i run

      systemctl restart maxscale

      it not works well.

      my sql is:

      CREATE USER 'maxscale'@'%' IDENTIFIED BY '123456';
      GRANT SELECT ON mysql.user TO 'maxscale'@'%';
      GRANT SELECT ON mysql.db TO 'maxscale'@'%';
      GRANT SELECT ON mysql.tables_priv TO 'maxscale'@'%';
      GRANT SELECT ON mysql.columns_priv TO 'maxscale'@'%';
      GRANT SELECT ON mysql.proxies_priv TO 'maxscale'@'%';
      GRANT SELECT ON mysql.roles_mapping TO 'maxscale'@'%';
      GRANT SHOW DATABASES ON . TO 'maxscale'@'%';
      flush privileges;

      CREATE USER 'max_user'@'%' IDENTIFIED BY '123456';
      GRANT SELECT, INSERT, UPDATE, DELETE ON . TO 'max_user'@'%';
      flush privileges;

      CREATE USER 'monitor_user'@'%' IDENTIFIED BY '123456';
      GRANT REPLICATION CLIENT on . to 'monitor_user'@'%';
      GRANT SUPER, RELOAD on . to 'monitor_user'@'%';
      flush privileges;

      the error log is

      MariaDB MaxScale /var/log/maxscale/maxscale.log Fri Jan 29 19:12:44 2021
      ----------------------------------------------------------------------------
      2021-01-29 19:12:44 notice : syslog logging is enabled.
      2021-01-29 19:12:44 notice : maxlog logging is enabled.
      2021-01-29 19:12:44 notice : The collection of SQLite memory allocation statistics turned off.
      2021-01-29 19:12:44 notice : Threading mode of SQLite set to Multi-thread.
      2021-01-29 19:12:44 notice : The systemd watchdog is Enabled. Internal timeout = 30s
      2021-01-29 19:12:44 notice : Worker message queue size: 1MiB
      2021-01-29 19:12:44 notice : Using up to 590.3MiB of memory for query classifier cache
      2021-01-29 19:12:44 notice : Running OS: Linux@5.4.0-65-generic, #73-Ubuntu SMP Mon Jan 18 17:25:17 UTC 2021, x86_64 with 6 processor cores.
      2021-01-29 19:12:44 notice : Total usable main memory: 3.84GiB.
      2021-01-29 19:12:44 notice : MariaDB MaxScale 2.5.7 started (Commit: cec605f3894b2098329fea2685edcec38d9764ed)
      2021-01-29 19:12:44 notice : MaxScale is running in process 4544
      2021-01-29 19:12:44 notice : Configuration file: /etc/maxscale.cnf
      2021-01-29 19:12:44 notice : Log directory: /var/log/maxscale
      2021-01-29 19:12:44 notice : Data directory: /var/lib/maxscale
      2021-01-29 19:12:44 notice : Module directory: /usr/lib/x86_64-linux-gnu/maxscale
      2021-01-29 19:12:44 notice : Service cache: /var/cache/maxscale
      2021-01-29 19:12:44 notice : Working directory: /var/log/maxscale
      2021-01-29 19:12:44 notice : Loaded module qc_sqlite: V1.0.0 from /usr/lib/x86_64-linux-gnu/maxscale/libqc_sqlite.so
      2021-01-29 19:12:44 notice : Query classification results are cached and reused. Memory used per thread: 98.38MiB
      2021-01-29 19:12:44 notice : Password encryption key file '/var/lib/maxscale/.secrets' not found, using configured passwords as plaintext.
      2021-01-29 19:12:44 notice : MaxScale started with 6 worker threads, each with a stack size of 8388608 bytes.
      2021-01-29 19:12:44 notice : Loading /etc/maxscale.cnf.
      2021-01-29 19:12:44 notice : /etc/maxscale.cnf.d does not exist, not reading.
      2021-01-29 19:12:44 notice : Loaded module MariaDBClient: V1.1.0 from /usr/lib/x86_64-linux-gnu/maxscale/libmariadbclient.so
      2021-01-29 19:12:44 notice : Loaded module readwritesplit: V1.1.0 from /usr/lib/x86_64-linux-gnu/maxscale/libreadwritesplit.so
      2021-01-29 19:12:44 notice : Loaded module mariadbmon: V1.5.0 from /usr/lib/x86_64-linux-gnu/maxscale/libmariadbmon.so
      2021-01-29 19:12:44 notice : (Master-Slaver-Listener) Loaded module MariaDBAuth: V2.1.0 from /usr/lib/x86_64-linux-gnu/maxscale/libmariadbauth.so
      2021-01-29 19:12:44 notice : Started REST API on [0.0.0.0]:8989
      2021-01-29 19:12:47 notice : Starting a total of 1 services...
      2021-01-29 19:12:47 notice : (Master-Slaver-Listener) Listening for connections at [::]:4008
      2021-01-29 19:12:47 notice : Service 'Master-Slave-Service' started (1/1)
      2021-01-29 19:13:03 warning: [mariadbmon] The current master server 'server1' is no longer valid because it has been down over 5 (failcount) monitor updates and it does not have any running slaves, but there is no valid alternative to swap to.

      Am I wrong?

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            zyy zyy
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: