Known Replikwando Errors

From ISoft Wiki
Revision as of 17:53, 7 March 2012 by Nenjin (talk | contribs)
Jump to navigationJump to search

Errors in Replikwando

Replikwando is made to handle inconsistent internet connections, MySQL databases that get shut off randomly, and things like that. However, sometimes things happen that Replikwando isn't able to handle automatically in a smart fashion. It uses error logs to tell the administrator when something odd has come up and should probably be looked into.

This wiki page is meant to help explain what the different errors are, as well as what needs to be done to handle them (or if they can be safely ignored).

Error Logs

FromConnectionError Log

This error log contains errors and warnings coming from the company's local database.

Lost Connection To The Database

  • Cause

Replikwando wasn't able to see the local database. This can happen if the MySQL service is stopped or restarted, or if the process was too busy to respond for a moment, or if the network connection to the server host quit working for a moment (if the MySQL server isn't hosted locally).

  • Resolution

Replikwando is built so that things like this can happen. Therefore, it's safe to ignore this error. Replikwando will just reconnect to the database when it comes back.

  • Similar Errors

MySQL Server Has Gone Away

The Following Query Was Reported And Skipped

  • Cause

Someone enabled the skip-query interface for replikwando and then told it to skip a query. The query is then logged in the error log to record what was skipped in case the administrator needs to go back and evaluate it.

  • Resolution

This error can be ignored, as it is purely for informational purposes.

ToConnectionError Log

This error log contains errors generated from interacting with the remote MySQL database.

Lost Connection To The Database

  • Cause

Replikwando wasn't able to see the remote database. This can happen if the MySQL service is stopped or restarted, or if the process was too busy to respond for a moment, or if the internet connection for the site drops.

  • Resolution

Replikwando is built so that things like this can happen. Therefore, it's safe to ignore this error. Replikwando will just reconnect to the database when it comes back.

  • Similar Errors

MySQL Server Has Gone Away

Duplicate Key

  • Cause

This error means that it tried to push a key to the remote database, but it already had the values being specified. This is normally caused by a query that gets sent, is received by the server, but the server reply just doesn't get back to Replikwando before it tries again. That means that if the remote server goes down or the internet connection is interrupted for even a moment, this can occur.

  • Resolution

It is safe to ignore this error. Newer versions no longer halt on this error, as it is indicative of the data already being on the remote server.

There is no '*'%' registered

  • Cause

This error occurs when the remote server is asked to run a stored procedure (like a function or trigger), but the user who created it or is defined as the executor no longer exists.

  • Resolution

You do not need to stop Replikwando to fix this issue. Dump the functions from the remote database into a text file, find-and-replace all instances of the obsoleted name with the name of a valid user, and re-insert them.

QueueConnectionError Log

Database Is Locked

  • Cause

This error occurs when one thread/process/person is writing into the SQLite database file while another is trying to use it. It means that whatever got the error wasn't able to query the table or write data into it. It's most common to see this error when an administrator is running queries against the SQLite database file while Replikwando is running (which is safe to do, but it can get annoying having to run your query more than once).

  • Resolution

It is safe to ignore this error. Replikwando does not halt on this error; it just tries to do what it was doing again, until it succeeds. This error should no longer occur (a spinlock was implemented to resolve it).

Failed to get the last binlog position

  • Cause

This warning occurs when Replikwando looks for where it left off last time in your binary log, but can't find an entry. This is NORMAL to see when you're starting up a new session (no LocalQueueFile.sqlite file). If you see it during normal execution, something bad happened to the binary logging.

  • Resolution

It is safe to ignore this error if you see it when running a new instance of Replikwando. If it happens during normal operation, you should check to see that

    • MySQL server binary logging is enabled
    • The internal MySQL tables that handle logging aren't corrupted (use the query 'SHOW BINARY LOGS' to verify)
    • The binary log files haven't been moved or something

Bad Behavior

Tables and views push, but functions and procedures are missing

  • Cause

This issue occurs when Replikwando does not have permission to SELECT from mysql.proc. See this MySQL doc page for more information.

  • Resolution

Replikwando must be given SELECT privs to mysql.proc. This table shows functions and procedures associated with all databases on a server, but cannot be altered unless you for some reason give the Replikwando user UPDATE status. Just don't do that :)

Replikwando2 (the gui version) 'works', but ReplikwandoService doesn't

  • Cause

'It doesn't work' isn't a working description of an error. This problem has several manifestations:

  • ReplikwandoService immediately exits without even getting started
  • ReplikwandoService starts, but won't repush
  • Repushing works, but keeping up-to-date does not

There are a whole bunch of things that could cause this.

  • The service might be running under a user that doesn't have permissions/access to necessary files
  • File permissions are screwed up
  • Files became corrupted after Replikwando2 got started
  • Magical kernel-level call interception
  • Resolution
  • Make sure the user account being used to run ReplikwandoService has access to all necessary files
  • Turn off antivirus (or, even better, add Replikwandoservice to the whitelist for the AV)

Replikwando2 runs forever without finishing the re-push

  • Possible cause

The client's binlog file is corrupted.

  • Resolution
  • Run this query in their SQLYOG:
SHOW BINARY LOGS;

If your query shows more than 1 binlog (and if this is the error, it will probably show many, many binlogs), you will need to rest the master file before attempting another repush.

  • First, make a backup of the client's database, in case something terrible happens.
  • Next, run this query in the client's SQLYOG:
RESET MASTER;

You should now be able to have Replikwando successfully re-push the client's data.