Koji Kawamura created NIFI-3741:
-----------------------------------

             Summary: CaptureChangeMySQL should show actual IOException detail 
when it failed to connect
                 Key: NIFI-3741
                 URL: https://issues.apache.org/jira/browse/NIFI-3741
             Project: Apache NiFi
          Issue Type: Bug
          Components: Extensions
    Affects Versions: 1.2.0
            Reporter: Koji Kawamura


When I setup a flow using CaptureChangeMySQL processor, I forgot to enable 
bin-log, and grant appropriate privileges at MySQL side, then 
CaptureChangeMySQL failed to connect the MySQL instance.

However, it wan't easy for me to find what configuration I had missed. The 
error message that I got was "Could not connect binlog client to any of the 
specified hosts" without information of actual IOException. By debugging the 
source code, I finally recalled that extra configuration was needed for bin-log.

[CaptureChangeMySQL.connect() | 
https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-cdc/nifi-cdc-mysql-bundle/nifi-cdc-mysql-processors/src/main/java/org/apache/nifi/cdc/mysql/processors/CaptureChangeMySQL.java#L665]
 does not log the Exception message and it may be difficult for users to 
diagnose what went wrong.

It would be more user friendly if we add the message of the last thrown 
exception if it failed to connect to any. For instance, IOException message 
contains details like "com.github.shyiko.mysql.binlog.network.ServerException: 
Host '192.168.99.1' is not allowed to connect to this MySQL serve".





--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to