DMS and Terraform

0

We have a DMS task for reading data from MySQL and exporting data to S3 , which is created and updated by Terraform . The updations to the task are about adding tables to the list . Everytime such an update is deployed through Terraform , the task changes its state to Stopped . If we try to resume the task , it fails with the errors

2022-09-17T12:27:44 [SOURCE_CAPTURE ]E: Error 1236 reading binlog, exit after 11 retries [1020493] (mysql_endpoint_capture.c:1152) 2022-09-17T12:27:44 [SOURCE_CAPTURE ]E: Error 1236 (Could not find first log file name in binary log index file) reading binlog [1020493] (mysql_endpoint_capture.c:1153)

Restarting the task works fine though. I am guessing the pointer to the binlog file is lost somehow . Note , no changes are being done on the MYSQL end .

Any pointers on how to avoid this problem , while using Terraform ?

질문됨 2년 전1400회 조회
2개 답변
0

Hi! Looking at the docs https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/dms_replication_task there is a note which seems relevant:

NOTE: Changing most arguments will stop the task if it is running. You can set start_replication_task to resume the task afterwards.

Unfortunately, the docs don't indicate the type of the parameter so I suggest you look at your state to see if it should be start_replication_task = true or something else.

Hope this helps!

profile pictureAWS
Bent_T
답변함 2년 전
  • Yes, but I think the pointer to the binary log is getting lost, in which case its unable to resume

0

Whenever you Stop and Resume an AWS DMS task, it resumes from the position where it was paused. Meaning, if you resume the task after X minutes, AWS DMS task will try to get the changes since it was paused by reading the Binary Logs. Looking at the error, it looks like the task was not able to find the required Binary Logs to resume the replication.

If you happen to Stop the DMS task, make sure that the DB host has all the required Binary Logs available so that the task can be successfully resumed.

AWS
D-Rao
답변함 2년 전
  • Ya you are right , I suspect the same too .

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠