Skip to main content
Announcements
UPGRADE ADVISORY for Qlik Replicate 2024.5: Read More
cancel
Showing results for 
Search instead for 
Did you mean: 
desmondchew
Creator III
Creator III

MySQL ODBC 8.0 driver failed error email alerts

Hi,

We have installed MySQL ODBC driver 5.13 and have set internal parameter in the end point with driver = MySQL ODBC driver 5.3. I could see some of the tasks are using MySQL ODBC driver 5.13.
However I receive the following email alerts, it seems the task is using MySQL ODBC driver 8.0.21.We have restarted Qlik replicate services. Source is Oracle 11.2.0.4. Target MySQL 8.0.21

Thank you

Desmond

 

NAVI_PROD2 replication task encountered the following error:

Error forwarding bulk

Failed to truncate net changes table

Execute truncate net changes table failed. 'TRUNCATE TABLE `prod-db`.`attrep_changesEE21D208566E9EB3`'

RetCode: SQL_ERROR  SqlState: HY000 NativeError: 0 Message: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.21] Failed (retcode -1) to execute statement: 'TRUNCATE TABLE `prod-db`.`attrep_changesEE21D208566E9EB3`'.

Labels (1)
7 Replies
Steve_Nguyen
Support
Support

I do not think this ODBC driver related.

1. could you try to check if table exist : `prod-db`.`attrep_changesEE21D208566E9EB3`

2. can you try to delete this table and reload the task again if exist ?

3. for testing, use a small table, and run full load only does it works ? 

 

 

Help users find answers! Don't forget to mark a solution that worked for you! If already marked, give it a thumbs up!
Heinvandenheuvel
Specialist III
Specialist III

I agree with Steve. This is unlikely to be a driver issue.

The error shown is from the Email right? Have you checked and studied the corresponding REPTASK__<taskname>_yyyymmddhhmmss.log file? The message is a top level message. I hope there is an underlying message perhaps (object not found, object busy, no privs). The log should also show the severity and whether the task simple re-attached and tried again or stopped.

For better help please provide more context. Did this task ever work? Did it work after the error? 

As Steve indicates, can you tell us whether simple full_load (where the attrep_changes are not used) works to give you the confidence that the basic connection, driver, and privileges are operational?

The attrep_changes tables are temporary helpers only used for CDC processing with batch apply tuning select. The table is create before first change to a target, loaded, changes requested. Before the next bulk it is truncated and reloaded with the fresh changes. At the clean task stop the table will be dropped. It should NOT be there before the task is started, and for most targets the name is dynamic. Static within the run, but never the same twice between runs. Switch task Logging to at least TRACE for TARGET_APPLY if the problem repeats.

A workaround while you investigate will be to switch settings for apply changes tuning to 'transactional apply' where the attrep_changes tables are no used.

Hein

 

desmondchew
Creator III
Creator III
Author

Hi,

The task is working fine, it triggers an email alerts sproadically.  I have attached an excerpt of the corresponding REPTASK_prod2 logfile masking some details. There's no obvious error found except pointing to the driver.  I could enable detail trace to verbose for target apply if alerts gets triggered again.

The task is currently running CDC, it was setup months ago with full load then CDC. Now and then it will trigger email alerts related to 

Execute truncate net changes table failed. 'TRUNCATE TABLE `prod-db`.`attrep_changesEE21D208566E9EB3`'

 

Thank you.
Desmond

 

 

 

desmondchew
Creator III
Creator III
Author

Uploading another log shown from the GUI.

Steve_Nguyen
Support
Support

this section in the log look strange :

 

00019756: 2022-03-21T09:16:07 [TARGET_APPLY ]I: Failed (retcode -1) to execute statement: 'TRUNCATE TABLE `bdp-ods-prod-db`.`attrep_changesEE21D208566E9EB3`' [1022502] (ar_odbc_stmt.c:4906)
00019756: 2022-03-21T09:16:07 [TARGET_APPLY ]I: RetCode: SQL_ERROR SqlState: HY000 NativeError: 0 Message: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.21] [1022502] (ar_odbc_stmt.c:4913)
00019756: 2022-03-21T09:16:07 [TARGET_APPLY ]I: Execute truncate net changes table failed. 'TRUNCATE TABLE `prod-db`.`attrep_changesEE21D208566E9EB3`' [1022502] (odbc_bulk.c:775)
00019756: 2022-03-21T09:16:07 [TARGET_APPLY ]I: Failed to truncate net changes table [1022502] (odbc_bulk.c:873)
00019756: 2022-03-21T09:16:07 [TARGET_APPLY ]I: Error executing command [1022502] (streamcomponent.c:1955)
00019756: 2022-03-21T09:16:07 [TASK_MANAGER ]I: Stream component failed at subtask 0, component st_0_MySQL_PROD [1022502] (subtask.c:1396)
00019756: 2022-03-21T09:16:07 [TARGET_APPLY ]I: Target component st_0_MySQL_PROD was detached because of recoverable error. Will try to reattach (subtask.c:1511)
00019756: 2022-03-21T09:16:07 [TARGET_APPLY ]E: RetCode: SQL_ERROR SqlState: HY000 NativeError: 0 Message: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.21] [1022502] (ar_odbc_stmt.c:3974)
00019756: 2022-03-21T09:16:07 [TARGET_APPLY ]E: Failed to create statement: 'SELECT count(*) FROM information_schema.tables WHERE table_name='attrep_changesEE21D208566E9EB3' AND table_schema='prod-db'' [1022502] (odbc_endpoint_imp.c:5983)

 

====

1. Replicate try to truncate , it fail , recover and then try to create the same table and fail but does not provide enough information.

2. best to have target_apply ,, trace logging level, so if happen again we could see what may have happen.

3. have you check with your target DBA to see any connection issue or other error message.

Help users find answers! Don't forget to mark a solution that worked for you! If already marked, give it a thumbs up!
Heinvandenheuvel
Specialist III
Specialist III

>> The task is working fine, it triggers an email alerts sproadically. 

Great. (Why did you not provide that information right away??)

>> I have attached an excerpt of the corresponding REPTASK_prod2 logfile masking some details.

Excellent. Next time, provide that right away!

>> There's no obvious error found except pointing to the driver. 

The driver details are just informational telling us where the problem was reported, not the cause. Considering the lack of hard DML error, considering a simple 'prepare' failing  for a normal predictable sql, considering the standard defensive re-attach actually succeeded my interpretation of this all is that the target dabase connection failed. Someone killed a process of a network connection, or even bounced the whole DB. You should focus on working with target DBA and Network folks to see if any glitches were reported in the timeframes indicated by the replicate logs.

My opinion here is that Replicate is working as designed and nicely warns you about environmental issues outside the control of Replicate. Replicate is the victim, not a cause. The failing statement could have been any statement but that truncate is a more likely candidate because it is the first statement to happen before getting ready to submit the next batch of changes and as such it is at the end of the longest gap between operations. It is the most likely to detect a connection issue.  It may be executed after seconds even minutes of 'idle' time collecting the next batch whereas the subsequent activity would be rapid fire - sub second and less likely to catch a bad connection.

>> I could enable detail trace to verbose for target apply if alerts gets triggered again.

You might as well, just for a few days. Be sure to setup log management like rolling every day or every 100MB.

Hein.

lyka
Support
Support

Hello! this looks like an intermittent error and Replicate is able to recover from it. While we work on identifying the root cause, I will recommend setting the following notifications Task was stopped due to a non-recoverable error" and "Table processing was suspended due to errors" instead of using "Any Error" .

"Any error" will trigger notifications for all ]E from the task log.

Thanks
Lyka