Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Shells Virtual Desktop
BMail.ag - Secure Email Service
Server.net
CPLicense.net
VPS Server
Buy VPN
Vultr
VMs for AI
HostDare
HostDare
ReliableSite White-Label Dedicated Hosting for Resellers
InterServer VPS
BMail.ag - Secure Email Service
Best VPN
High-Performance Bare Metal Server Solutions
Karvl.com
Server Mania Cloud Hosting
DataWagon Hosting
AlphaVPS Hosting
Evoxt.com
Clouvider
VPS Hosting with NVMe
Residential IPs in the US & 4G Mobile Proxies in EU & US with Unlimited Bandwidth
ReliableSite White-Label Dedicated Hosting for Resellers
Rabisu - Hosting Solutions
Shells Virtual Desktop
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

MySQL replication failure

edited April 2015 in Help

Hello :)

Recently the replication on my MySQL servers appears to have broken for no reason I can tell.

In the mySQL log, I can see the following:

[ERROR] Slave I/O: error connecting to master 'slave_user@[host]:3306' - retry-time: 60 retries: 86400, Error_code: 2003

150408 20:01:37 [Note] Error reading relay log event: slave SQL thread was killed

150408 20:01:37 [Note] Slave I/O thread killed while connecting to master

150408 20:01:37 [Note] Slave I/O thread exiting, read up to log 'mysql-bin.000057', position 129754

150408 20:01:38 [Note] Slave SQL thread initialized, starting replication in log 'mysql-bin.000057' at position 129

Doing SHOW SLAVE STATUS\G shows that status as:

Slave_IO_State: Connecting to master

Do you have any tips or advice? I've tried the following:

  • Verified that the host is reachable via ping from the slave
  • Restarted mysql, restarted the slave.

Comments

  • edited April 2015

    Can you login using slave_user on the master with the set password?

    I.e.

    mysql -uslave_user -p -h [host]

    Thanked by 1YellowHummingbird
  • @StartledPhoenix said:
    Can you login using slave_user on the master with the set password?

    I.e.

    mysql -uslave_user -p -h [host]

    Thanks for the suggestion :) It appears to just hang after entering the password. I'm guessing there might be some kind of firewall issue, but I really haven't changed anything at all.

  • edited April 2015

    @YellowHummingbird said:
    Thanks for the suggestion :) It appears to just hang after entering the password. I'm guessing there might be some kind of firewall issue, but I really haven't changed anything at all.

    tcpdump time

    Maybe some telnet as well

    Thanked by 1YellowHummingbird
  • edited April 2015

    @StartledPhoenix said:
    Maybe some telnet as well

    Yay, fixed it! Thanks for your help. Turns out, I'd saved my iptables rules into a file, and blocked all IP's except for those that were running services that needed the databases. I'd got a new server, and added the rule, but not added it to the file. Hence, when I rebooted for a kernel update, the old rules got added (so all the services I was monitoring carried on working) but the replication stopped.

    Thanks once again, and have an amazing day.

    If a mod sees this and wants to lock it, that's fine by me :)

  • edited April 2015

    np, glad I could help :)

    Btw, for no rebooting, try using KSplice or KernelCare, will make it so that you don't have to reboot for security patches.

    Thanked by 1YellowHummingbird
Sign In or Register to comment.