Mariadb Synchronisation

Stefan U. Hegner stefan at hegner-online.de
Sat Nov 23 21:48:07 CET 2024


Moin in die Runde,

ich bin gerade ziemlich am verzweifeln, weil ich hier einen Fehler habe, 
den ich mir nicht erklären kann. Ich habe auf zwei Ubuntu-Kisten 
(24.04.01 LTS) einen Mariadb-10.11 server laufen und seit dem Upgrade 
von 22.04 kriege ich die 2-Wege-DB-Synchronisation zwischen den beiden 
Kisten nicht mehr an den Start.

Ich schreib das mal in Spalten pro Kiste:

Rechner: *MBIRIBUKU*
	Rechner: *LAPUTOPU*
In der /etc/mysql/my.cnf:

[mariadb]
log-bin
*server-id=2*
log-basename=mbiribuku
binlog-format=mixed
	In der /etc/mysql/my.cnf:

[mariadb]
log-bin
*server-id=1*
log-basename=laputopu
binlog-format=mixed
MariaDB [(none)]> show variables like 'server_id';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| s*erver_id     | 2 *    |
+---------------+-------+
	MariaDB [(none)]> show variables like 'server_id';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
|*server_id     | 1*     |
+---------------+-------+
MariaDB [(none)]> SHOW SLAVE STATUS \G;
*************************** 1. row ***************************
                 Slave_IO_State:
*Master_Host: laputopu*
                    Master_User: replicator
                    Master_Port: 3306
                  Connect_Retry: 60
                Master_Log_File:
            Read_Master_Log_Pos: 4
                 Relay_Log_File: mbiribuku-relay-bin.000001
                  Relay_Log_Pos: 4
          Relay_Master_Log_File:
*Slave_IO_Running: No*
              Slave_SQL_Running: Yes
                Replicate_Do_DB:
            Replicate_Ignore_DB:
             Replicate_Do_Table:
         Replicate_Ignore_Table:
        Replicate_Wild_Do_Table:
    Replicate_Wild_Ignore_Table:
                     Last_Errno: 0
                     Last_Error:
                   Skip_Counter: 0
            Exec_Master_Log_Pos: 4
                Relay_Log_Space: 256
                Until_Condition: None
                 Until_Log_File:
                  Until_Log_Pos: 0
             Master_SSL_Allowed: No
             Master_SSL_CA_File:
             Master_SSL_CA_Path:
                Master_SSL_Cert:
              Master_SSL_Cipher:
                 Master_SSL_Key:
          Seconds_Behind_Master: NULL
  Master_SSL_Verify_Server_Cert: No
                  Last_IO_Errno: 1593
                  Last_IO_Error: Fatal error: *The slave I/O thread 
stops because master and slave have equal MariaDB server ids; these ids 
must be different for replication to work (or the 
--replicate-same-server-id option must be used on slave but this does 
not always make sense; please check the manual before using it).*
                 Last_SQL_Errno: 0
                 Last_SQL_Error:
    Replicate_Ignore_Server_Ids:
*Master_Server_Id: 2*
                 Master_SSL_Crl:
             Master_SSL_Crlpath:
                     Using_Gtid: Slave_Pos
                    Gtid_IO_Pos:
        Replicate_Do_Domain_Ids:
    Replicate_Ignore_Domain_Ids:
                  Parallel_Mode: optimistic
                      SQL_Delay: 0
            SQL_Remaining_Delay: NULL
        Slave_SQL_Running_State: Slave has read all relay log; waiting 
for more updates
               Slave_DDL_Groups: 0
Slave_Non_Transactional_Groups: 0
     Slave_Transactional_Groups: 0
           Replicate_Rewrite_DB:
	MariaDB [(none)]> SHOW SLAVE STATUS \G;
*************************** 1. row ***************************
                 Slave_IO_State:
*Master_Host: mbiribuku*
                    Master_User: replicator
                    Master_Port: 3306
                  Connect_Retry: 60
                Master_Log_File:
            Read_Master_Log_Pos: 4
                 Relay_Log_File: laputopu-relay-bin.000001
                  Relay_Log_Pos: 4
          Relay_Master_Log_File:
*Slave_IO_Running: No*
              Slave_SQL_Running: Yes
                Replicate_Do_DB:
            Replicate_Ignore_DB:
             Replicate_Do_Table:
         Replicate_Ignore_Table:
        Replicate_Wild_Do_Table:
    Replicate_Wild_Ignore_Table:
                     Last_Errno: 0
                     Last_Error:
                   Skip_Counter: 0
            Exec_Master_Log_Pos: 4
                Relay_Log_Space: 256
                Until_Condition: None
                 Until_Log_File:
                  Until_Log_Pos: 0
             Master_SSL_Allowed: No
             Master_SSL_CA_File:
             Master_SSL_CA_Path:
                Master_SSL_Cert:
              Master_SSL_Cipher:
                 Master_SSL_Key:
          Seconds_Behind_Master: NULL
  Master_SSL_Verify_Server_Cert: No
                  Last_IO_Errno: 1236
                  Last_IO_Error: Got fatal error 1236 from master when 
reading data from binary log: 'Error: connecting slave requested to 
start from GTID 0-2-1983, which is not in the master's binlog'
                 Last_SQL_Errno: 0
                 Last_SQL_Error:
    Replicate_Ignore_Server_Ids:
*Master_Server_Id: 2*
                 Master_SSL_Crl:
             Master_SSL_Crlpath:
                     Using_Gtid: Slave_Pos
                    Gtid_IO_Pos: 0-2-1983
        Replicate_Do_Domain_Ids:
    Replicate_Ignore_Domain_Ids:
                  Parallel_Mode: optimistic
                      SQL_Delay: 0
            SQL_Remaining_Delay: NULL
        Slave_SQL_Running_State: Slave has read all relay log; waiting 
for more updates
               Slave_DDL_Groups: 0
Slave_Non_Transactional_Groups: 0
     Slave_Transactional_Groups: 0
           Replicate_Rewrite_DB:

Ich begreife nicht, dass die Kisten sich mit den Server-Ids behaken.

In der Config und in der DB sind die doch klar verschieden. Beide Kisten 
melden jeweils die andere als Master-Host, aber im Slave-Status steht 
beide Male eine Master_Server_ID:2.

Und bevor das nicht geklärt ist komme ich wohl auch kaum mit dem GTID 
Sync-Fehler weiter ...

Hat da zufällig jemand von Euch noch einen schlauen Tipp?

Danke & Gruß

Stefan.

-- 
Stefan U. Hegner
          <stefan at hegner-online.de>
               * * *
D-32584 Löhne --- good ole Germany
internet:http://www.hegner-web.de
               * * *
GPG-Key | 048D 7F64 0BEB 73B1 2725
F-Print | C05E 4F77 9674 EF11 55FE

-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 236 bytes
Desc: OpenPGP digital signature
URL: <http://lug-owl.de/pipermail/linux/attachments/20241123/d511c217/attachment.sig>


More information about the Linux mailing list