Uploaded image for project: 'Debezium'
  1. Debezium
  2. DBZ-6479

DDL statement couldn't be parsed: AUTHENTICATION_POLICY_ADMIN

XMLWordPrintable

    • False
    • None
    • False
    • Important

      What Debezium connector do you use and what version?

      Docker image: debezium/connect-base:2.2

      Debezium version: 2.2.1.Final

      What is the connector configuration?

      {
          "connector.class": "io.debezium.connector.mysql.MySqlConnector",
          "snapshot.locking.mode": "none",
          "schema.history.internal.kafka.security.protocol": "SASL_PLAINTEXT",
          "tasks.max": "1",
          "schema.history.internal.consumer.sasl.jaas.config": "${file:/app/file.properties:kafka.jaas}",
          "transforms": "route, multi",
          "transforms.multi.operation": "c",
          "schema.history.internal.kafka.recovery.attempts": "1000",
          "include.schema.changes": "false",
          "table.whitelist": "srv_dc\\.(.+),srv\\.srv_auth_events,srv_healthcheck.cdc_ping",
          "tombstones.on.delete": "false",
          "transforms.route.type": "org.apache.kafka.connect.transforms.RegexRouter",
          "topic.prefix": "srv_dc",
          "transforms.route.regex": "srv_dc\\.(srv_dc|srv)\\.(.+)",
          "schema.history.internal.kafka.topic": "debezium-history-v2-srv-dc4242-fix2",
          "schema.history.internal.producer.security.protocol": "SASL_PLAINTEXT",
          "transforms.multi.type": "com.srv.Multi",
          "poll.interval.ms": "100",
          "transforms.multi.region": "region-1",
          "transforms.route.replacement": "$1.$2",
          "schema.history.internal.producer.sasl.mechanism": "SCRAM-SHA-256",
          "database.user": "debezium",
          "database.server.id": "424200",
          "schema.history.internal.kafka.sasl.jaas.config": "${file:/app/file.properties:kafka.jaas}",
          "schema.history.internal.kafka.bootstrap.servers": "1.1.1.1:9092,2.2.2.2:9092,3.3.3.3:9092",
          "schema.history.internal.kafka.consumer.max.poll.records": "1000",
          "database.port": "3306",
          "schema.history.internal.kafka.recovery.poll.interval.ms": "10000",
          "inconsistent.schema.handling.mode": "fail",
          "schema.history.internal.kafka.sasl.mechanism": "SCRAM-SHA-256",
          "database.hostname": "1.2.3.4",
          "ddl.parser.mode": "antlr",
          "database.password": "******",
          "name": "job_4242",
          "schema.history.internal.consumer.sasl.mechanism": "SCRAM-SHA-256",
          "schema.history.internal.producer.sasl.jaas.config": "${file:/app/secrets/file.properties:kafka.jaas}",
          "transforms.multi.whitelist": "srv.srv_auth_events",
          "snapshot.mode": "schema_only",
          "connect.timeout.ms": "120000",
          "schema.history.internal.consumer.security.protocol": "SASL_PLAINTEXT"
      }
      

      What is the captured database version and mode of deployment?

      On-premises database, version: MySQL 8.0.32-24

      What behaviour do you expect?

      Successful handling of database events.

      What behaviour do you see?

      Debezium fails with the following error:

      io.debezium.text.ParsingException: DDL statement couldn't be parsed. Please open a Jira issue with the statement 'GRANT APPLICATION_PASSWORD_ADMIN, AUDIT_ABORT_EXEMPT, AUDIT_ADMIN, AUTHENTICATION_POLICY_ADMIN, BACKUP_ADMIN, BINLOG_ADMIN, BINLOG_ENCRYPTION_ADMIN, CLONE_ADMIN, CONNECTION_ADMIN, ENCRYPTION_KEY_ADMIN, FIREWALL_EXEMPT, FLUSH_OPTIMIZER_COSTS, FLUSH_STATUS, FLUSH_TABLES, FLUSH_USER_RESOURCES, GROUP_REPLICATION_ADMIN, GROUP_REPLICATION_STREAM, INNODB_REDO_LOG_ARCHIVE, INNODB_REDO_LOG_ENABLE, PASSWORDLESS_USER_ADMIN, PERSIST_RO_VARIABLES_ADMIN, REPLICATION_APPLIER, REPLICATION_SLAVE_ADMIN, RESOURCE_GROUP_ADMIN, RESOURCE_GROUP_USER, ROLE_ADMIN, SENSITIVE_VARIABLES_OBSERVER, SERVICE_CONNECTION_ADMIN, SESSION_VARIABLES_ADMIN, SET_USER_ID, SHOW_ROUTINE, SYSTEM_USER, SYSTEM_VARIABLES_ADMIN, TABLE_ENCRYPTION_ADMIN, XA_RECOVER_ADMIN ON *.* TO 'root'@'127.0.0.1' WITH GRANT OPTION'no viable alternative at input 'GRANT APPLICATION_PASSWORD_ADMIN, AUDIT_ABORT_EXEMPT, AUDIT_ADMIN, AUTHENTICATION_POLICY_ADMIN' 

      Do you see the same behaviour using the latest released Debezium version?

      This is the latest stable version. I upgraded to see if it fixes the issue after checking DBZ-6211

      Do you have the connector logs, ideally from start to finish?

      2023-05-18 07:32:31,517 ERROR  MySQL|srv_dc|binlog  Error during binlog processing. Last offset stored = {transaction_id=null, ts_sec=1684317472, file=mysql-bin.000007, pos=117679496, gtids=7668707f-e352-11ed-a8a0-02f14f270475:1-107118,86d88bdc-e352-11ed-ac12-0215ab2b6855:1-2, server_id=910532, event=1}, binlog reader near position = mysql-bin.000007/117679496   [io.debezium.connector.mysql.MySqlStreamingChangeEventSource]
      2023-05-18 07:32:31,519 ERROR  MySQL|srv_dc|binlog  Producer failure   [io.debezium.pipeline.ErrorHandler]
      io.debezium.DebeziumException: Error processing binlog event
       at io.debezium.connector.mysql.MySqlStreamingChangeEventSource.handleEvent(MySqlStreamingChangeEventSource.java:392)
       at io.debezium.connector.mysql.MySqlStreamingChangeEventSource.lambda$execute$27(MySqlStreamingChangeEventSource.java:923)
       at com.github.shyiko.mysql.binlog.BinaryLogClient.notifyEventListeners(BinaryLogClient.java:1246)
      at com.github.shyiko.mysql.binlog.BinaryLogClient.listenForEventPackets(BinaryLogClient.java:1072)
       at com.github.shyiko.mysql.binlog.BinaryLogClient.connect(BinaryLogClient.java:631)
       at com.github.shyiko.mysql.binlog.BinaryLogClient$7.run(BinaryLogClient.java:932)
       at java.base/java.lang.Thread.run(Thread.java:829)
      Caused by: io.debezium.text.ParsingException: DDL statement couldn't be parsed. Please open a Jira issue with the statement 'GRANT APPLICATION_PASSWORD_ADMIN, AUDIT_ABORT_EXEMPT, AUDIT_ADMIN, AUTHENTICATION_POLICY_ADMIN, BACKUP_ADMIN, BINLOG_ADMIN, BINLOG_ENCRYPTION_ADMIN, CLONE_ADMIN, CONNECTION_ADMIN, ENCRYPTION_KEY_ADMIN, FIREWALL_EXEMPT, FLUSH_OPTIMIZER_COSTS, FLUSH_STATUS, FLUSH_TABLES, FLUSH_USER_RESOURCES, GROUP_REPLICATION_ADMIN, GROUP_REPLICATION_STREAM, INNODB_REDO_LOG_ARCHIVE, INNODB_REDO_LOG_ENABLE, PASSWORDLESS_USER_ADMIN, PERSIST_RO_VARIABLES_ADMIN, REPLICATION_APPLIER, REPLICATION_SLAVE_ADMIN, RESOURCE_GROUP_ADMIN, RESOURCE_GROUP_USER, ROLE_ADMIN, SENSITIVE_VARIABLES_OBSERVER, SERVICE_CONNECTION_ADMIN, SESSION_VARIABLES_ADMIN, SET_USER_ID, SHOW_ROUTINE, SYSTEM_USER, SYSTEM_VARIABLES_ADMIN, TABLE_ENCRYPTION_ADMIN, XA_RECOVER_ADMIN ON *.* TO 'root'@'127.0.0.1' WITH GRANT OPTION'
      no viable alternative at input 'GRANT APPLICATION_PASSWORD_ADMIN, AUDIT_ABORT_EXEMPT, AUDIT_ADMIN, AUTHENTICATION_POLICY_ADMIN'
       at io.debezium.antlr.ParsingErrorListener.syntaxError(ParsingErrorListener.java:43)
       at org.antlr.v4.runtime.ProxyErrorListener.syntaxError(ProxyErrorListener.java:41)
       at org.antlr.v4.runtime.Parser.notifyErrorListeners(Parser.java:543)
       at org.antlr.v4.runtime.DefaultErrorStrategy.reportNoViableAlternative(DefaultErrorStrategy.java:310)
       at org.antlr.v4.runtime.DefaultErrorStrategy.reportError(DefaultErrorStrategy.java:136)
       at io.debezium.ddl.parser.mysql.generated.MySqlParser.sqlStatements(MySqlParser.java:1261)
       at io.debezium.ddl.parser.mysql.generated.MySqlParser.root(MySqlParser.java:979)
       at io.debezium.connector.mysql.antlr.MySqlAntlrDdlParser.parseTree(MySqlAntlrDdlParser.java:74)
       at io.debezium.connector.mysql.antlr.MySqlAntlrDdlParser.parseTree(MySqlAntlrDdlParser.java:46)
       at io.debezium.antlr.AntlrDdlParser.parse(AntlrDdlParser.java:78)
       at io.debezium.connector.mysql.MySqlDatabaseSchema.parseDdl(MySqlDatabaseSchema.java:213)
       at io.debezium.connector.mysql.MySqlDatabaseSchema.parseStreamingDdl(MySqlDatabaseSchema.java:199)
       at io.debezium.connector.mysql.MySqlStreamingChangeEventSource.handleQueryEvent(MySqlStreamingChangeEventSource.java:590)
       at io.debezium.connector.mysql.MySqlStreamingChangeEventSource.lambda$execute$15(MySqlStreamingChangeEventSource.java:894)
       at io.debezium.connector.mysql.MySqlStreamingChangeEventSource.handleEvent(MySqlStreamingChangeEventSource.java:372)
       ... 6 more
      Caused by: org.antlr.v4.runtime.NoViableAltException
       at org.antlr.v4.runtime.atn.ParserATNSimulator.noViableAlt(ParserATNSimulator.java:2028)
       at org.antlr.v4.runtime.atn.ParserATNSimulator.execATN(ParserATNSimulator.java:467)
       at org.antlr.v4.runtime.atn.ParserATNSimulator.adaptivePredict(ParserATNSimulator.java:393)
       at io.debezium.ddl.parser.mysql.generated.MySqlParser.sqlStatements(MySqlParser.java:1055)
       ... 15 more
      2023-05-18 07:32:31,598 ERROR  ||  WorkerSourceTask{id=job_91053-0} Task threw an uncaught and unrecoverable exception. Task is being killed and will not recover until manually restarted   [org.apache.kafka.connect.runtime.WorkerTask]
      org.apache.kafka.connect.errors.ConnectException: An exception occurred in the change event producer. This connector will be stopped.
      

      How to reproduce the issue using our tutorial deployment?

      I think, try to handle a binlog event containing: 

      GRANT AUTHENTICATION_POLICY_ADMIN

              anmohant Anisha Mohanty
              vkassenbaev Valeriy Kassenbaev (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: