[MDEV-19900] Failed to open the relay log after update Created: 2019-06-28 Updated: 2019-08-27 Resolved: 2019-07-17 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Replication |
| Affects Version/s: | 10.4.6 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Critical |
| Reporter: | sjon | Assignee: | Sujatha Sivakumar (Inactive) |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | slave-configuration | ||
| Description |
|
Something caused 10.4.6 to fail on startup on our upgraded (from 10.3.16) node. I can't find any documentation as to what can be done to fix this, other then a rollback
but mysqlbinlog shows the specified relay_log_pos is actually present: mysqlbinlog /var/lib/mysql/mysql-relay-bin-db1.000002|tail |
| Comments |
| Comment by Sujatha Sivakumar (Inactive) [ 2019-07-10 ] |
|
Hello Sjon, Thanks for reporting the issue. The bug description has following details. [Note] Reading Master_info: 'master-db1.info' Relay_info:'relay-log-db1.info' Looks like no basename was specified for the "relay-log" file. When the For example: If basename='db1' Has the host name has been changed from 'db1' to 'db2'? New default basename='db2' i.e prior to upgrade the slave would have been using 'db1-relay-bin.000001'. Because of this issue even though the old relay log exists it will not be |
| Comment by sjon [ 2019-07-10 ] |
|
Hello Sujatha, thanks for your extensive explanation. This error comes from a machine that is called db1 and it replicates from another machine that is called db2. While I could set relay-log as suggested, this machine will never have it's hostname changed so it doesn't seem applicable. Fyi; this is what the binlogs are currently named:
It seems to me the default basename is not the issue? Why does mariadb-10.4 fail on Failed to open the relay log if that file is present and perfectly readable? |
| Comment by Sujatha Sivakumar (Inactive) [ 2019-07-10 ] |
|
Hello Sjon, Thanks for the updates. The reason why open relay log fails is explained The sql Thread maintains its positions in a file named "relay-log.info" File: relay-log.info Relay log file name and index file names would be: In the latest update you mentioned that the files are currently named like mysql-relay-bin-db2.000001 The issue is caused because of this newly named index files. When server is restarted after upgrade it tries to initialize the slave threads File:mysql-relay-bin-db2.index It will fail to locate the file name in index file. Hence the error is One way of fixing this issue would be to prepend the old relay log index file |
| Comment by Sujatha Sivakumar (Inactive) [ 2019-07-17 ] |
|
Hello Sjon, Good morning. Were the above document references helpful to resolve the reported issue? Please let us know. From the MDEV description it looks like "log-basename", "relay-log" and mysql-relay-bin-db2.000001 Thank you. |
| Comment by sjon [ 2019-07-17 ] |
|
Hello Sujatha, it took some debugging but you were correct - we used to have relay_log=mysql-relay-bin configured, but our distribution (Archlinux) moved from /etc/mysql to /etc/my.cnf.d , effectively removing our custom configuration. After reinstating that setting I have successfully upgraded our cluster. Thanks again! |