0

I'm building a NiFi dadaflow, and I need to get the data changes from a MySql database, so I want to use the CaptureChangeMySQL processor to do that.

I get the following error when I run the CaptureChangeMySQL processor and I don't see what's causing this :

Failed to process session due to Could not connect binlog client to any of the specified hosts due to: BinaryLogClient was unable to connect in 10000ms: org.apache.nifi.processor.exception.ProcessException: Could not connect binlog client to any of the specified hosts due to: BinaryLogClient was unable to connect in 10000ms

I have the following controller services enabled :

  • DistributedMapCacheClientService
  • DistributedMapCacheServer

But I'm not sure if they are properly configured :

DistributedMapCacheServer properties

DistributedMapCacheClientService properties

In MySql, I have enabled the log_bin variable, by default it wasn't. I checked and I have indeed some binlog files created when data change.

So I think the issue is with the controller services and how they connect, it's not clear to me.

I searched for tutorials about how to use this NiFi processor but I couldt not find how to fix this error. I looked mainly at this one : https://community.hortonworks.com/articles/113941/change-data-capture-cdc-with-apache-nifi-version-1-1.html but it did not helped me.

Does anyone have already use this processor to do CDC?

Thank you in advance.

asmoth
  • 98
  • 2
  • 9
  • That error is actually for the underlying binlog connector, not for any of your DistributedCache stuff. Can you share your `CaptureChangeMySQL` configuration? – mattyb May 23 '19 at 22:32

2 Answers2

0

I found what was wrong : I was trying to connect to the wrong port for the MySQL Host of the CaptureChangeMySQL processor :x

asmoth
  • 98
  • 2
  • 9
0

For others who are still facing similar issues, check if the firewall of the server is stopping the connection. Allow mysql 3306 in your firewall rules.

santhosh
  • 439
  • 8
  • 17