Monday, June 24, 2013

MySql replication error: "Could not parse relay log event entry"

I was able to solve this problem by executing the following steps.


  1. I checked replication on the other slave. The replication thread on the other slave was running fine and slave was upto date with the master, implying that the relay logs on the first slave were the problem.
  2. On my first slave (the one with the replication error) I ran the following commands:
    • stop slave;
    • show slave status\G;
    • Note the Relay_Master_Log_File and Exec_Master_Log_Pos variables.
    • run command:- change master to MASTER_LOG_FILE='mysql-bin.010530, MASTER_LOG_POS=40783167;
    • start slave
This fixed my replication problem.

Wednesday, June 19, 2013

Debugging ssh permission denied for password-less login

Sometimes after setting up password less login using ssh, you still get the password prompt when a login is attempted. The reason could be multifold. This is how you can go about debugging the problem.

  • use the -v switch with ssh. This will give you the detailed steps of all that ssh tried before falling back to the password prompt.
  • Login to the machine where you were trying to connect to and look at the auth logs on the machine. (Note: Auth logs are located @/var/log/auth.log. )
  • Often the problem is that you have to add the users group to "AllowGroups" property in /etc/ssh/sshd_config file.