n00b question: What about the GRA logs in my data dir?

810 views
Skip to first unread message

P4tt4nz

unread,
Oct 12, 2012, 8:36:08 AM10/12/12
to codersh...@googlegroups.com
Hi

Have search the web but cant find any info about the GRA log files:
-rw-rw----. 1 mysql mysql        188 Sep 25 08:45 GRA_2_297.log
-rw-rw----. 1 mysql mysql        186 Sep 25 08:45 GRA_2_305.log
-rw-rw----. 1 mysql mysql        191 Sep 25 08:45 GRA_2_313.log
-rw-rw----. 1 mysql mysql        186 Sep 25 08:45 GRA_2_321.log
-rw-rw----. 1 mysql mysql        220 Sep 25 08:45 GRA_2_336.log
-rw-rw----. 1 mysql mysql        177 Sep 25 08:45 GRA_2_343.log
-rw-rw----. 1 mysql mysql        223 Sep 25 08:45 GRA_2_358.log
-rw-rw----. 1 mysql mysql        130 Oct 12 10:01 GRA_2_386.log
-rw-rw----. 1 mysql mysql        149 Oct 12 10:01 GRA_2_397.log
-rw-rw----. 1 mysql mysql        130 Oct 12 10:05 GRA_2_414.log

I got like 20-30 on one node and less/more on other. What are they and what should i do with them?

Cheers
Patrik

seppo....@codership.com

unread,
Oct 12, 2012, 8:47:29 AM10/12/12
to codersh...@googlegroups.com
Each GRA* file corresponds with one replication failure, slave thread
was not able to apply one transaction (write set). There is a
warning/error in the mysql error log related to each failure. It can
be false positive, e.g. a bad DDL statement, and error was ignored.
You should take a look at error log and locate these messages.

The GRA file contains binlog events of the failed transaction, and it
can be analyzed if need be.

-seppo
> --

P4tt4nz

unread,
Oct 12, 2012, 9:03:02 AM10/12/12
to codersh...@googlegroups.com
Aha! ok. Thanx! Is there a tool to analyze the logs like mysqlbinlog(tried that and it didnt work:))?

Cheers
Patrik

seppo....@codership.com

unread,
Oct 12, 2012, 9:17:23 AM10/12/12
to codersh...@googlegroups.com, p4t...@gmail.com
mysqlbinlog can print the file, but you must prepend the GRA file with
a valid binlog header first. I will attach a sample header part in
this mail, it will not show in mailing list, but you should get it as
I added your address in CC list.

So do as follows:

$ cat GRA_2_297.log >> GRA-header
$ mysqlbinlog --verbose GRA-header

Still, you must read your error log and locate the corresponding
warning messages.

-seppo

Quoting P4tt4nz <p4t...@gmail.com>:

> Aha! ok. Thanx! Is there a tool to analyze the logs like mysqlbinlog(tried
> that and it didnt work:))?
>
> Cheers
> Patrik
>
> On Friday, October 12, 2012 2:47:31 PM UTC+2, Seppo Jaakola wrote:
>>
>> Each GRA* file corresponds with one replication failure, slave thread
>> was not able to apply one transaction (write set). There is a
>> warning/error in the mysql error log related to each failure. It can
>> be false positive, e.g. a bad DDL statement, and error was ignored.
>> You should take a look at error log and locate these messages.
>>
>> The GRA file contains binlog events of the failed transaction, and it
>> can be analyzed if need be.
>>
>> -seppo
>>
>> Quoting P4tt4nz <p4t...@gmail.com <javascript:>>:
>>
>> > Hi
>> >
>> > Have search the web but cant find any info about the GRA log files:
>> > -rw-rw----. 1 mysql mysql 188 Sep 25 08:45 GRA_2_297.log
>> > -rw-rw----. 1 mysql mysql 186 Sep 25 08:45 GRA_2_305.log
>> > -rw-rw----. 1 mysql mysql 191 Sep 25 08:45 GRA_2_313.log
>> > -rw-rw----. 1 mysql mysql 186 Sep 25 08:45 GRA_2_321.log
>> > -rw-rw----. 1 mysql mysql 220 Sep 25 08:45 GRA_2_336.log
>> > -rw-rw----. 1 mysql mysql 177 Sep 25 08:45 GRA_2_343.log
>> > -rw-rw----. 1 mysql mysql 223 Sep 25 08:45 GRA_2_358.log
>> > -rw-rw----. 1 mysql mysql 130 Oct 12 10:01 GRA_2_386.log
>> > -rw-rw----. 1 mysql mysql 149 Oct 12 10:01 GRA_2_397.log
>> > -rw-rw----. 1 mysql mysql 130 Oct 12 10:05 GRA_2_414.log
>> >
>> > I got like 20-30 on one node and less/more on other. What are they and
>> what
>> > should i do with them?
>> >
>> > Cheers
>> > Patrik
>> >
>> > --
>>
>>
>
> --


GRA-header

P4tt4nz

unread,
Oct 12, 2012, 9:33:14 AM10/12/12
to codersh...@googlegroups.com, p4t...@gmail.com
Got it! Thanx for your help.

Cheers
Patrik

Haris Zukanovic

unread,
Oct 14, 2012, 4:54:25 PM10/14/12
to codersh...@googlegroups.com
Where exactly should these log files files be located?

find / -name "GRA*"
finds nothing
--
 
 

-- 
--
Haris Zukanovic

seppo....@codership.com

unread,
Oct 15, 2012, 4:53:31 PM10/15/12
to codersh...@googlegroups.com
GRA* files will appear in mysql data directory and they are only
created if there is suspected database inconsistency. There is always
a related log message in error log describing the failed slave apply
attempt.

-seppo

Quoting Haris Zukanovic <haris.zu...@gmail.com>:

> Where exactly should these log files files be located?
>
> find / -name "GRA*"
> finds nothing
>
>
>
> On 12/10/12 15.33, P4tt4nz wrote:
>> Got it! Thanx for your help.
>>
>> Cheers
>> Patrik
>>
>> On Friday, October 12, 2012 3:17:24 PM UTC+2, Seppo Jaakola wrote:
>>
>> mysqlbinlog can print the file, but you must prepend the GRA file
>> with
>> a valid binlog header first. I will attach a sample header part in
>> this mail, it will not show in mailing list, but you should get it as
>> I added your address in CC list.
>>
>> So do as follows:
>>
>> $ cat GRA_2_297.log >> GRA-header
>> $ mysqlbinlog --verbose GRA-header
>>
>> Still, you must read your error log and locate the corresponding
>> warning messages.
>>
>> -seppo
>>
> --


Reply all
Reply to author
Forward
0 new messages