FAQ
Hi,

I have master to master replication ran was fine. One time admin re-booted one host and followed rebooted another one. After that, one of the masters was able to automatically re-connect to master and continue replication, but another master caould not resume replication.

I did three things and all got same error message on the screen. (1. re-started slave; 2.change master to where it was stopped; 3. change master to current log file and position). The error message is:

ERROR 1201 Could not initialize master info structure; more error messages can be found in the MySQL error log.

In the error log, it only said cannot connect to sserver... Error reading relay log... read up to .... SQL thread killed ... Normal shutdown
this log is the same as in another master and that server was able to re-connect.

Any idea of how to recover the replication without dump and sync database?

Thanks,
Lisa

Search Discussions

  • Miguel Araújo at Mar 17, 2010 at 3:06 pm
    Hi Lisa.

    When you said that: " (...) 2.change master to where it was stopped", what did you do? CHANGE MASTER TO .... ?
    Did you stopped the slave before executing that command?

    Have you tried to delete the file master.info?


    Miguel Araújo
    On Mar 17, 2010, at 3:00 PM, Database System wrote:

    Hi,

    I have master to master replication ran was fine. One time admin re-booted one host and followed rebooted another one. After that, one of the masters was able to automatically re-connect to master and continue replication, but another master caould not resume replication.

    I did three things and all got same error message on the screen. (1. re-started slave; 2.change master to where it was stopped; 3. change master to current log file and position). The error message is:

    ERROR 1201 Could not initialize master info structure; more error messages can be found in the MySQL error log.

    In the error log, it only said cannot connect to sserver... Error reading relay log... read up to .... SQL thread killed ... Normal shutdown
    this log is the same as in another master and that server was able to re-connect.

    Any idea of how to recover the replication without dump and sync database?

    Thanks,
    Lisa






    --
    MySQL Replication Mailing List
    For list archives: http://lists.mysql.com/replication
    To unsubscribe: http://lists.mysql.com/replication?unsub=noradone@gmail.com
  • Johan De Meersman at Mar 17, 2010 at 3:18 pm
    Dear Miguel,

    Lisa explicitly stated she did not want to dump/sync. You suggest:

    Have you tried to delete the file master.info?
    >

    Kindly explain to me what this does, and what the consequences are.



    --
    Bier met grenadyn
    Is als mosterd by den wyn
    Sy die't drinkt, is eene kwezel
    Hy die't drinkt, is ras een ezel
  • Miguel Araújo at Mar 17, 2010 at 3:30 pm
    Deal Johan,

    Lisa said that the server was rebooted, so I guess that the master info structure was lost, and that's the reason for the server not resume replication.
    She also stated the "2.change master to where it was stopped; 3. change master to current log file and position", but didn't refer if has done the "complete" CHANGE MASTER TO, command.
    So I guess that the slave can't connect to the server because it lacks the IP, user, passwd or other option.

    It's just a guess...

    Deleting the master.info erases the master structure, and erases a possible error done in the master structure by the reboot.


    On Mar 17, 2010, at 3:17 PM, Johan De Meersman wrote:

    Dear Miguel,

    Lisa explicitly stated she did not want to dump/sync. You suggest:

    Have you tried to delete the file master.info?

    Kindly explain to me what this does, and what the consequences are.



    --
    Bier met grenadyn
    Is als mosterd by den wyn
    Sy die't drinkt, is eene kwezel
    Hy die't drinkt, is ras een ezel
  • Song Voong at Mar 17, 2010 at 3:33 pm
    Why not just login to the database and do a
    show slave status;
    show master status;



    2010/3/17 Miguel Araújo <noradone@gmail.com>
    Deal Johan,

    Lisa said that the server was rebooted, so I guess that the master info
    structure was lost, and that's the reason for the server not resume
    replication.
    She also stated the "2.change master to where it was stopped; 3. change
    master to current log file and position", but didn't refer if has done the
    "complete" CHANGE MASTER TO, command.
    So I guess that the slave can't connect to the server because it lacks the
    IP, user, passwd or other option.

    It's just a guess...

    Deleting the master.info erases the master structure, and erases a
    possible error done in the master structure by the reboot.


    On Mar 17, 2010, at 3:17 PM, Johan De Meersman wrote:

    Dear Miguel,

    Lisa explicitly stated she did not want to dump/sync. You suggest:

    Have you tried to delete the file master.info?

    Kindly explain to me what this does, and what the consequences are.



    --
    Bier met grenadyn
    Is als mosterd by den wyn
    Sy die't drinkt, is eene kwezel
    Hy die't drinkt, is ras een ezel
  • Miguel Araújo at Mar 17, 2010 at 3:35 pm
    Agreed. Lisa, please show the information given by those commands.
    On Mar 17, 2010, at 3:33 PM, Song Voong wrote:

    Why not just login to the database and do a
    show slave status;
    show master status;



    2010/3/17 Miguel Araújo <noradone@gmail.com>
    Deal Johan,

    Lisa said that the server was rebooted, so I guess that the master info structure was lost, and that's the reason for the server not resume replication.
    She also stated the "2.change master to where it was stopped; 3. change master to current log file and position", but didn't refer if has done the "complete" CHANGE MASTER TO, command.
    So I guess that the slave can't connect to the server because it lacks the IP, user, passwd or other option.

    It's just a guess...

    Deleting the master.info erases the master structure, and erases a possible error done in the master structure by the reboot.


    On Mar 17, 2010, at 3:17 PM, Johan De Meersman wrote:

    Dear Miguel,

    Lisa explicitly stated she did not want to dump/sync. You suggest:

    Have you tried to delete the file master.info?

    Kindly explain to me what this does, and what the consequences are.



    --
    Bier met grenadyn
    Is als mosterd by den wyn
    Sy die't drinkt, is eene kwezel
    Hy die't drinkt, is ras een ezel
  • Johan De Meersman at Mar 17, 2010 at 3:45 pm
    Bah, I seem to be on a hair trigger today. Apologies for my blut replies.

    2010/3/17 Miguel Araújo <noradone@gmail.com>
    Lisa said that the server was rebooted, so I guess that the master info
    structure was lost, and that's the reason for the server not resume
    replication.
    She also stated the "2.change master to where it was stopped; 3. change
    master to current log file and position", but didn't refer if has done the
    "complete" CHANGE MASTER TO, command.
    So I guess that the slave can't connect to the server because it lacks the
    IP, user, passwd or other option.
    Quite possible. If this isn't the case, though, she'll have lost the only
    source of master log and position, and thus end up doing a full sync. Better
    to verify manually first :-)


    Deleting the master.info erases the master structure, and erases a
    possible error done in the master structure by the reboot.
    Yes, but doesn't magically set it to the right values afterwards.



    --
    Bier met grenadyn
    Is als mosterd by den wyn
    Sy die't drinkt, is eene kwezel
    Hy die't drinkt, is ras een ezel
  • Miguel Araújo at Mar 17, 2010 at 4:57 pm
    No problem :-)

    Yes, I have already told her to set all the right values afterwars manually.
    On Mar 17, 2010, at 3:44 PM, Johan De Meersman wrote:

    Bah, I seem to be on a hair trigger today. Apologies for my blut replies.

    2010/3/17 Miguel Araújo <noradone@gmail.com>
    Lisa said that the server was rebooted, so I guess that the master info structure was lost, and that's the reason for the server not resume replication.
    She also stated the "2.change master to where it was stopped; 3. change master to current log file and position", but didn't refer if has done the "complete" CHANGE MASTER TO, command.
    So I guess that the slave can't connect to the server because it lacks the IP, user, passwd or other option.

    Quite possible. If this isn't the case, though, she'll have lost the only source of master log and position, and thus end up doing a full sync. Better to verify manually first :-)


    Deleting the master.info erases the master structure, and erases a possible error done in the master structure by the reboot.

    Yes, but doesn't magically set it to the right values afterwards.



    --
    Bier met grenadyn
    Is als mosterd by den wyn
    Sy die't drinkt, is eene kwezel
    Hy die't drinkt, is ras een ezel
  • Johan De Meersman at Mar 17, 2010 at 3:13 pm

    On Wed, Mar 17, 2010 at 4:00 PM, Database System wrote:

    Hi,

    I have master to master replication ran was fine. One time admin re-booted
    one host and followed rebooted another one. After that, one of the masters
    was able to automatically re-connect to master and continue replication, but
    another master caould not resume replication.

    I did three things and all got same error message on the screen. (1.
    re-started slave; 2.change master to where it was stopped; 3. change master
    to current log file and position). The error message is:

    ERROR 1201 Could not initialize master info structure; more error messages
    can be found in the MySQL error log.

    In the error log, it only said cannot connect to sserver... Error reading
    relay log... read up to .... SQL thread killed ... Normal shutdown
    this log is the same as in another master and that server was able to
    re-connect.

    Any idea of how to recover the replication without dump and sync database?
    Congratulations. By doing "3. change master to current log file and
    position", you *almost* condemned yourself to the dump/sync you dread.

    You're actually lucky that it didn't start replicating when you did that.
    Hurry up and put it back to the original settings, before you do anything
    else - if a single statement gets executed, you're screwed.

    As to what's wrong, I would think "cannot connect to server" is pretty
    obvious. Find out *why*. Hint: try to telnet into the IP/port configured in
    your mysql slave.



    --
    Bier met grenadyn
    Is als mosterd by den wyn
    Sy die't drinkt, is eene kwezel
    Hy die't drinkt, is ras een ezel
  • Database System at Mar 17, 2010 at 3:25 pm
    Johan,

    If you had read carefully, you would know the reason cannot connect to server because admin rebooted the server hosts.

    I knew change master to current position is not a good solution, I just want to see if replication can be resumed. In fact, after that it is still stopped on where it was before broken. It didn't changed to new position.

    Thanks,
    Lisa

    --- On Wed, 3/17/10, Johan De Meersman wrote:


    From: Johan De Meersman <vegivamp@tuxera.be>
    Subject: Re: master to master replication broke
    To: database100@yahoo.com
    Cc: replication@lists.mysql.com
    Date: Wednesday, March 17, 2010, 10:13 AM



    On Wed, Mar 17, 2010 at 4:00 PM, Database System wrote:

    Hi,

    I have master to master replication ran was fine. One time admin re-booted one host and followed rebooted another one. After that, one of the masters was able to automatically re-connect to master and continue replication, but another master caould not resume replication.

    I did three things and all got same error message on the screen. (1. re-started slave; 2.change master to where it was stopped; 3. change master to current log file and position). The error message is:

    ERROR 1201 Could not initialize master info structure; more error messages can be found in the MySQL error log.

    In the error log, it only said cannot connect to sserver... Error reading relay log... read up to .... SQL thread killed ... Normal shutdown
    this log is the same as in another master and that server was able to re-connect.

    Any idea of how to recover the replication without dump and sync database?


    Congratulations. By doing "3. change master to current log file and position", you *almost* condemned yourself to the dump/sync you dread.

    You're actually lucky that it didn't start replicating when you did that. Hurry up and put it back to the original settings, before you do anything else - if a single statement gets executed, you're screwed.

    As to what's wrong, I would think "cannot connect to server" is pretty obvious. Find out *why*. Hint: try to telnet into the IP/port configured in your mysql slave.



    --
    Bier met grenadyn
    Is als mosterd by den wyn
    Sy die't drinkt, is eene kwezel
    Hy die't drinkt, is ras een ezel
  • Johan De Meersman at Mar 17, 2010 at 3:41 pm

    On Wed, Mar 17, 2010 at 4:24 PM, Database System wrote:

    Johan,

    If you had read carefully, you would know the reason cannot connect to
    server because admin rebooted the server hosts.
    Ahh. I assumed you posted the log from after that. So, no logging whatsoever
    in the error log, and show slave status just shows the 1201 ? does the
    general log show anything ? Does it show master IP, user and password in the
    show slave status ?



    --
    Bier met grenadyn
    Is als mosterd by den wyn
    Sy die't drinkt, is eene kwezel
    Hy die't drinkt, is ras een ezel
  • Database System at Mar 17, 2010 at 3:37 pm
    Miguel,

    I just used "change master to" to reset the same log file and pos to the same as it was. If I delete master.info, what else should I do after that?

    thanks,
    Lisa

    --- On Wed, 3/17/10, Miguel Araújo wrote:
    From: Miguel Araújo <noradone@gmail.com>
    Subject: Re: master to master replication broke
    To: database100@yahoo.com
    Cc: replication@lists.mysql.com
    Date: Wednesday, March 17, 2010, 10:06 AM
    Hi Lisa.

    When you said that: " (...) 2.change master to where it was
    stopped", what did you do? CHANGE MASTER TO .... ?
    Did you stopped the slave before executing that command?

    Have you tried to delete the file master.info?


    Miguel Araújo
    On Mar 17, 2010, at 3:00 PM, Database System wrote:

    Hi,

    I have master to master replication ran was fine. One
    time admin re-booted one host and followed rebooted another
    one. After that, one of the masters was able to
    automatically re-connect to master and continue replication,
    but another master caould not resume replication.
    I did three things and all got same error message on
    the screen. (1. re-started slave; 2.change master to where
    it was stopped; 3. change master to current log file and
    position). The error message is:
    ERROR 1201 Could not initialize master info structure;
    more error messages can be found in the MySQL error log.
    In the error log, it only said cannot connect to
    sserver... Error reading relay log... read up to .... SQL
    thread killed ... Normal shutdown
    this log is the same as in another master and that
    server was able to re-connect.
    Any idea of how to recover the replication without
    dump and sync database?
    Thanks,
    Lisa






    --
    MySQL Replication Mailing List
    For list archives: http://lists.mysql.com/replication
    To unsubscribe:    http://lists.mysql.com/replication?unsub=noradone@gmail.com
  • Song Voong at Mar 17, 2010 at 3:47 pm
    Lisa,

    Please paste the following in order for us to help you.
    both my.cnf
    master.info <- second master that is not replicating
    mysql-log <- last 20 line is ok
    show slave status;
    show master status;

    On Wed, Mar 17, 2010 at 8:37 AM, Database System wrote:

    Miguel,

    I just used "change master to" to reset the same log file and pos to the
    same as it was. If I delete master.info, what else should I do after
    that?

    thanks,
    Lisa

    --- On Wed, 3/17/10, Miguel Araújo wrote:
    From: Miguel Araújo <noradone@gmail.com>
    Subject: Re: master to master replication broke
    To: database100@yahoo.com
    Cc: replication@lists.mysql.com
    Date: Wednesday, March 17, 2010, 10:06 AM
    Hi Lisa.

    When you said that: " (...) 2.change master to where it was
    stopped", what did you do? CHANGE MASTER TO .... ?
    Did you stopped the slave before executing that command?

    Have you tried to delete the file master.info?


    Miguel Araújo
    On Mar 17, 2010, at 3:00 PM, Database System wrote:

    Hi,

    I have master to master replication ran was fine. One
    time admin re-booted one host and followed rebooted another
    one. After that, one of the masters was able to
    automatically re-connect to master and continue replication,
    but another master caould not resume replication.
    I did three things and all got same error message on
    the screen. (1. re-started slave; 2.change master to where
    it was stopped; 3. change master to current log file and
    position). The error message is:
    ERROR 1201 Could not initialize master info structure;
    more error messages can be found in the MySQL error log.
    In the error log, it only said cannot connect to
    sserver... Error reading relay log... read up to .... SQL
    thread killed ... Normal shutdown
    this log is the same as in another master and that
    server was able to re-connect.
    Any idea of how to recover the replication without
    dump and sync database?
    Thanks,
    Lisa






    --
    MySQL Replication Mailing List
    For list archives: http://lists.mysql.com/replication
    To unsubscribe:
    http://lists.mysql.com/replication?unsub=noradone@gmail.com



    --
    MySQL Replication Mailing List
    For list archives: http://lists.mysql.com/replication
    To unsubscribe:
    http://lists.mysql.com/replication?unsub=song.voong@gmail.com
  • Miguel Araújo at Mar 17, 2010 at 4:39 pm
    You should set the machine IP, user and password.
    Something like: CHANGE MASTER TO MASTER_HOST='111.111.111.111', MASTER_USER='user', MASTER_PASSWORD='passwd', MASTER_LOG_FILE='mysqld-bin.000001', MASTER_LOG_POS=0;

    On Mar 17, 2010, at 3:37 PM, Database System wrote:

    Miguel,

    I just used "change master to" to reset the same log file and pos to the same as it was. If I delete master.info, what else should I do after that?

    thanks,
    Lisa

    --- On Wed, 3/17/10, Miguel Araújo wrote:
    From: Miguel Araújo <noradone@gmail.com>
    Subject: Re: master to master replication broke
    To: database100@yahoo.com
    Cc: replication@lists.mysql.com
    Date: Wednesday, March 17, 2010, 10:06 AM
    Hi Lisa.

    When you said that: " (...) 2.change master to where it was
    stopped", what did you do? CHANGE MASTER TO .... ?
    Did you stopped the slave before executing that command?

    Have you tried to delete the file master.info?


    Miguel Araújo
    On Mar 17, 2010, at 3:00 PM, Database System wrote:

    Hi,

    I have master to master replication ran was fine. One
    time admin re-booted one host and followed rebooted another
    one. After that, one of the masters was able to
    automatically re-connect to master and continue replication,
    but another master caould not resume replication.
    I did three things and all got same error message on
    the screen. (1. re-started slave; 2.change master to where
    it was stopped; 3. change master to current log file and
    position). The error message is:
    ERROR 1201 Could not initialize master info structure;
    more error messages can be found in the MySQL error log.
    In the error log, it only said cannot connect to
    sserver... Error reading relay log... read up to .... SQL
    thread killed ... Normal shutdown
    this log is the same as in another master and that
    server was able to re-connect.
    Any idea of how to recover the replication without
    dump and sync database?
    Thanks,
    Lisa






    --
    MySQL Replication Mailing List
    For list archives: http://lists.mysql.com/replication
    To unsubscribe: http://lists.mysql.com/replication?unsub=noradone@gmail.com



    --
    MySQL Replication Mailing List
    For list archives: http://lists.mysql.com/replication
    To unsubscribe: http://lists.mysql.com/replication?unsub=noradone@gmail.com
  • Database System at Mar 17, 2010 at 3:57 pm
    SHOW ....   It didn't show any error.
    I did those two when I reset to old position and when I reset to new position.



    --- On Wed, 3/17/10, Miguel Araújo wrote:


    From: Miguel Araújo <noradone@gmail.com>
    Subject: Re: master to master replication broke
    To: "Song Voong" <song.voong@gmail.com>
    Cc: "Johan De Meersman" <vegivamp@tuxera.be>, database100@yahoo.com, replication@lists.mysql.com
    Date: Wednesday, March 17, 2010, 10:35 AM



    Agreed. Lisa, please show the information given by those commands.


    On Mar 17, 2010, at 3:33 PM, Song Voong wrote:

    Why not just login to the database and do a
    show slave status;
    show master status;






    2010/3/17 Miguel Araújo <noradone@gmail.com>

    Deal Johan,

    Lisa said that the server was rebooted, so I guess that the master info structure was lost, and that's the reason for the server not resume replication.
    She also stated the "2.change master to where it was stopped; 3. change master to current log file and position", but didn't refer if has done the "complete" CHANGE MASTER TO, command.
    So I guess that the slave can't connect to the server because it lacks the IP, user, passwd or other option.

    It's just a guess...

    Deleting the master.info erases the master structure, and erases a possible error done in the master structure by the reboot.





    On Mar 17, 2010, at 3:17 PM, Johan De Meersman wrote:

    Dear Miguel,

    Lisa explicitly stated she did not want to dump/sync. You suggest:

    Have you tried to delete the file master.info?

    Kindly explain to me what this does, and what the consequences are.



    --
    Bier met grenadyn
    Is als mosterd by den wyn
    Sy die't drinkt, is eene kwezel
    Hy die't drinkt, is ras een ezel

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupreplication @
categoriesmysql
postedMar 17, '10 at 3:00p
activeMar 17, '10 at 4:57p
posts15
users4
websitemysql.com
irc#mysql

People

Translate

site design / logo © 2022 Grokbase