mysql-binlog-connector-java icon indicating copy to clipboard operation
mysql-binlog-connector-java copied to clipboard

MariaDB disconnections with error "A slave with the same server_uuid/server_uid has connected to master"

Open damischa1 opened this issue 4 years ago • 1 comments

Hello,

I have two slaves running against single MariaDB master.

After a while I get and error and disconnection (had to dig this error out in debugger, it was swallowed by try-catch in line BinaryLogClient.java:970).

A slave with the same server_uuid/server_id as this slave has connected to the master; the first event '-test-bin.000015' at 238636500, the last event read from '-test-bin.000015' at 256, the last byte read from '***-bin.000015' at 238636500.

I am not sure how this should be handled. Maybe the client should support setting the slave uuid?

damischa1 avatar May 18 '21 11:05 damischa1

Sorted out this by specifying different serverId for each client.

However, I would suggest to add logging (with level WARN or ERROR) of the errors in line BinaryLogClient.java:970 to make server errors visible to library users.

damischa1 avatar May 18 '21 12:05 damischa1