airbytehq / airbyte

The leading data integration platform for ETL / ELT data pipelines from APIs, databases & files to data warehouses, data lakes & data lakehouses. Both self-hosted and Cloud-hosted.
https://airbyte.com
Other
16.37k stars 4.16k forks source link

[destination-mysql] failed java.sql.SQLSyntaxErrorException: Access denied for user 'airbyte'@'%' to database 'airbyte_internal' #45597

Open J700Group opened 2 months ago

J700Group commented 2 months ago

Connector Name

destination-mysql

Connector Version

1.0.2

What step the error happened?

During the sync

Relevant information

The sync ran for 16 minutes and then gave the error: Destination process exited with non-zero exit code 1

Then has further details in the logs

I have tried to sync around 5 times but it always fails around 16 minutes

The timeout values for the destination MySQL server are all set for 8 or more hours

I am unsure what the database 'airbyte_internal' is that is refered to in the logs

Relevant log output

at io.airbyte.cdk.db.jdbc.JdbcDatabase.executeWithinTransaction$lambda$1(JdbcDatabase.kt:46) ~[airbyte-cdk-core-0.33.0.jar:?]
        at io.airbyte.cdk.db.jdbc.DefaultJdbcDatabase.execute(DefaultJdbcDatabase.kt:30) ~[airbyte-cdk-core-0.33.0.jar:?]
        at io.airbyte.cdk.db.jdbc.JdbcDatabase.executeWithinTransaction(JdbcDatabase.kt:43) ~[airbyte-cdk-core-0.33.0.jar:?]
        at io.airbyte.cdk.integrations.destination.jdbc.typing_deduping.JdbcDestinationHandler.execute(JdbcDestinationHandler.kt:180) ~[airbyte-cdk-db-destinations-0.33.0.jar:?]
        at io.airbyte.integrations.base.destination.typing_deduping.TyperDeduperUtil$Companion.prepareSchemas(TyperDeduperUtil.kt:167) ~[airbyte-cdk-typing-deduping-0.33.0.jar:?]
        at io.airbyte.integrations.base.destination.typing_deduping.DefaultTyperDeduper.prepareSchemasAndRunMigrations(DefaultTyperDeduper.kt:118) ~[airbyte-cdk-typing-deduping-0.33.0.jar:?]
        at io.airbyte.cdk.integrations.destination.jdbc.JdbcBufferedConsumerFactory.onStartFunction$lambda$2(JdbcBufferedConsumerFactory.kt:237) ~[airbyte-cdk-db-destinations-0.33.0.jar:?]
        at io.airbyte.commons.concurrency.VoidCallable.call(VoidCallable.kt:12) ~[airbyte-cdk-dependencies-0.33.0.jar:?]
        at io.airbyte.cdk.integrations.destination.async.AsyncStreamConsumer.start(AsyncStreamConsumer.kt:113) ~[airbyte-cdk-core-0.33.0.jar:?]
        at io.airbyte.cdk.integrations.base.SerializedAirbyteMessageConsumer$Companion$appendOnClose$1.start(SerializedAirbyteMessageConsumer.kt:60) ~[airbyte-cdk-core-0.33.0.jar:?]
        at io.airbyte.cdk.integrations.base.IntegrationRunner$Companion.consumeWriteStream$io_airbyte_airbyte_cdk_java_airbyte_cdk_airbyte_cdk_core(IntegrationRunner.kt:408) ~[airbyte-cdk-core-0.33.0.jar:?]
        at io.airbyte.cdk.integrations.base.IntegrationRunner$Companion.consumeWriteStream$io_airbyte_airbyte_cdk_java_airbyte_cdk_airbyte_cdk_core$default(IntegrationRunner.kt:403) ~[airbyte-cdk-core-0.33.0.jar:?]
        at io.airbyte.cdk.integrations.base.IntegrationRunner.runInternal(IntegrationRunner.kt:209) ~[airbyte-cdk-core-0.33.0.jar:?]
        at io.airbyte.cdk.integrations.base.IntegrationRunner.run(IntegrationRunner.kt:116) ~[airbyte-cdk-core-0.33.0.jar:?]
        at io.airbyte.integrations.destination.mysql.MySQLDestinationStrictEncrypt$Companion.main(MySQLDestinationStrictEncrypt.kt:34) ~[io.airbyte.airbyte-integrations.connectors-destination-mysql-strict-encrypt.jar:?]
        ... 1 more
Stack Trace: io.airbyte.commons.exceptions.ConfigErrorException: Access denied. Please check your configuration
        at io.airbyte.integrations.destination.mysql.MySQLDestination$Companion.handleException(MySQLDestination.kt:221)
        at io.airbyte.integrations.destination.mysql.MySQLDestinationStrictEncrypt$Companion.main(MySQLDestinationStrictEncrypt.kt:36)
        at io.airbyte.integrations.destination.mysql.MySQLDestinationStrictEncrypt.main(MySQLDestinationStrictEncrypt.kt)
Caused by: java.sql.SQLSyntaxErrorException: Access denied for user 'airbyte'@'%' to database 'airbyte_internal'
        at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)
        at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
        at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
        at com.mysql.cj.jdbc.StatementImpl.executeInternal(StatementImpl.java:764)
        at com.mysql.cj.jdbc.StatementImpl.execute(StatementImpl.java:648)
        at com.zaxxer.hikari.pool.ProxyStatement.execute(ProxyStatement.java:94)
        at com.zaxxer.hikari.pool.HikariProxyStatement.execute(HikariProxyStatement.java)
        at io.airbyte.cdk.db.jdbc.JdbcDatabase.executeWithinTransaction$lambda$1(JdbcDatabase.kt:46)
        at io.airbyte.cdk.db.jdbc.DefaultJdbcDatabase.execute(DefaultJdbcDatabase.kt:30)
        at io.airbyte.cdk.db.jdbc.JdbcDatabase.executeWithinTransaction(JdbcDatabase.kt:43)
        at io.airbyte.cdk.integrations.destination.jdbc.typing_deduping.JdbcDestinationHandler.execute(JdbcDestinationHandler.kt:180)
        at io.airbyte.integrations.base.destination.typing_deduping.TyperDeduperUtil$Companion.prepareSchemas(TyperDeduperUtil.kt:167)
        at io.airbyte.integrations.base.destination.typing_deduping.DefaultTyperDeduper.prepareSchemasAndRunMigrations(DefaultTyperDeduper.kt:118)
        at io.airbyte.cdk.integrations.destination.jdbc.JdbcBufferedConsumerFactory.onStartFunction$lambda$2(JdbcBufferedConsumerFactory.kt:237)
        at io.airbyte.commons.concurrency.VoidCallable.call(VoidCallable.kt:12)
        at io.airbyte.cdk.integrations.destination.async.AsyncStreamConsumer.start(AsyncStreamConsumer.kt:113)
        at io.airbyte.cdk.integrations.base.SerializedAirbyteMessageConsumer$Companion$appendOnClose$1.start(SerializedAirbyteMessageConsumer.kt:60)
        at io.airbyte.cdk.integrations.base.IntegrationRunner$Companion.consumeWriteStream$io_airbyte_airbyte_cdk_java_airbyte_cdk_airbyte_cdk_core(IntegrationRunner.kt:408)
        at io.airbyte.cdk.integrations.base.IntegrationRunner$Companion.consumeWriteStream$io_airbyte_airbyte_cdk_java_airbyte_cdk_airbyte_cdk_core$default(IntegrationRunner.kt:403)
        at io.airbyte.cdk.integrations.base.IntegrationRunner.runInternal(IntegrationRunner.kt:209)
        at io.airbyte.cdk.integrations.base.IntegrationRunner.run(IntegrationRunner.kt:116)
        at io.airbyte.integrations.destination.mysql.MySQLDestinationStrictEncrypt$Companion.main(MySQLDestinationStrictEncrypt.kt:34)

Contribute

marcosmarxm commented 2 months ago

@J700Group can you confirm the user airbyte has the required permissions?

J700Group commented 2 months ago

Yes, the airbyte user has full permissions on the destination MySQL database on the MySQL server