Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error regarding GTID consistency when using Google CloudSQL for database #133

Open
hartfordfive opened this issue Apr 28, 2017 · 1 comment

Comments

@hartfordfive
Copy link

Cloudier Director Version: 2.4.0
OS: CentOS 6

The bootstrapping process for the manager instance fails when attempting to use a MySQL database on Google Cloud SQL. In my situation, i'm using the Cloud SQL Proxy, which i can confirm is working fine and the Cloudera Deployment Manager can connect to the to the instance properly via this proxy, although after some digging through the logs on the Director instance, i can see the following error:

rnalDatabaseForClouderaManager - c.c.l.c.ClouderaManagerDatabaseProvider: Moving script to correct location (passwordless sudo expected)
[2017-04-28 12:12:30.965 +0000] INFO  [p-d3227758eed1-DefaultBootstrapDeploymentJob] POST /api/v8/environments/staging/deployments com.cloudera.launchpad.bootstrap.deployment.ConfigureExternalDatabaseForClouderaManager - c.c.l.c.ClouderaManagerDatabaseProvider: Executing command line
[2017-04-28 12:12:31.107 +0000] INFO  [io-thread-241] - - - - ssh:10.142.0.3: JAVA_HOME=/usr/java/jdk1.7.0_67-cloudera
[2017-04-28 12:12:31.708 +0000] INFO  [io-thread-241] - - - - ssh:10.142.0.3: Creating temporary database properties file
[2017-04-28 12:12:31.708 +0000] INFO  [io-thread-241] - - - - ssh:10.142.0.3: Executing:  /usr/java/jdk1.7.0_67-cloudera/bin/java -cp /usr/share/java/mysql-connector-java.jar:/usr/share/java/oracle-connector-java.jar:/usr/share/cmf/lib/* com.cloudera.enterprise.dbutil.DbCommandExecutor /tmp/21161l20.db.properties db.
[2017-04-28 12:12:32.192 +0000] INFO  [io-thread-241] - - - - ssh:10.142.0.3: [                          main] DbCommandExecutor              INFO  Successfully connected to database.
[2017-04-28 12:12:32.192 +0000] INFO  [io-thread-241] - - - - ssh:10.142.0.3: [                          main] DbCommandExecutor              ERROR Unable to create/drop a table.
[2017-04-28 12:12:32.192 +0000] INFO  [io-thread-241] - - - - ssh:10.142.0.3: java.sql.SQLException: Statement violates GTID consistency: CREATE TABLE ... SELECT.
[2017-04-28 12:12:32.192 +0000] INFO  [io-thread-241] - - - - ssh:10.142.0.3: at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1073)[mysql-connector-java-5.1.17.jar:]
[2017-04-28 12:12:32.192 +0000] INFO  [io-thread-241] - - - - ssh:10.142.0.3: at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3597)[mysql-connector-java-5.1.17.jar:]
[2017-04-28 12:12:32.192 +0000] INFO  [io-thread-241] - - - - ssh:10.142.0.3: at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3529)[mysql-connector-java-5.1.17.jar:]
[2017-04-28 12:12:32.192 +0000] INFO  [io-thread-241] - - - - ssh:10.142.0.3: at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1990)[mysql-connector-java-5.1.17.jar:]
[2017-04-28 12:12:32.192 +0000] INFO  [io-thread-241] - - - - ssh:10.142.0.3: at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2151)[mysql-connector-java-5.1.17.jar:]
[2017-04-28 12:12:32.192 +0000] INFO  [io-thread-241] - - - - ssh:10.142.0.3: at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2619)[mysql-connector-java-5.1.17.jar:]
[2017-04-28 12:12:32.192 +0000] INFO  [io-thread-241] - - - - ssh:10.142.0.3: at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1709)[mysql-connector-java-5.1.17.jar:]
[2017-04-28 12:12:32.192 +0000] INFO  [io-thread-241] - - - - ssh:10.142.0.3: at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1628)[mysql-connector-java-5.1.17.jar:]
[2017-04-28 12:12:32.192 +0000] INFO  [io-thread-241] - - - - ssh:10.142.0.3: at com.cloudera.enterprise.dbutil.DbCommandExecutor.runDdlStatementPair(DbCommandExecutor.java:357)[db-common-5.11.0.jar:]
[2017-04-28 12:12:32.192 +0000] INFO  [io-thread-241] - - - - ssh:10.142.0.3: at com.cloudera.enterprise.dbutil.DbCommandExecutor.testIfUserCanCreateTable(DbCommandExecutor.java:333)[db-common-5.11.0.jar:]
[2017-04-28 12:12:32.192 +0000] INFO  [io-thread-241] - - - - ssh:10.142.0.3: at com.cloudera.enterprise.dbutil.DbCommandExecutor.testIfUserCanRunDdl(DbCommandExecutor.java:299)[db-common-5.11.0.jar:]
[2017-04-28 12:12:32.192 +0000] INFO  [io-thread-241] - - - - ssh:10.142.0.3: at com.cloudera.enterprise.dbutil.DbCommandExecutor.testDbConnection(DbCommandExecutor.java:258)[db-common-5.11.0.jar:]
[2017-04-28 12:12:32.192 +0000] INFO  [io-thread-241] - - - - ssh:10.142.0.3: at com.cloudera.enterprise.dbutil.DbCommandExecutor.main(DbCommandExecutor.java:138)[db-common-5.11.0.jar:]
[2017-04-28 12:12:32.192 +0000] INFO  [io-thread-241] - - - - ssh:10.142.0.3: [                          main] DbCommandExecutor              ERROR Exiting with exit code 9
[2017-04-28 12:12:32.192 +0000] INFO  [io-thread-241] - - - - ssh:10.142.0.3: --> Error 9, giving up (use --force if you wish to ignore the error)
[2017-04-28 12:12:32.192 +0000] ERROR [p-d3227758eed1-DefaultBootstrapDeploymentJob] POST /api/v8/environments/staging/deployments com.cloudera.launchpad.bootstrap.deployment.ConfigureExternalDatabaseForClouderaManager - c.c.l.pipeline.util.PipelineRunner: Attempt to execute job failed
java.lang.RuntimeException: com.cloudera.launchpad.model.database.ExternalDatabaseProviderException: Script returned failure exit code 9
	at com.google.common.base.Throwables.propagate(Throwables.java:160)
	at com.cloudera.launchpad.pipeline.PipelineJobProfiler$1.call(PipelineJobProfiler.java:69)
	at com.codahale.metrics.Timer.time(Timer.java:101)
	at com.cloudera.launchpad.pipeline.PipelineJobProfiler.profileJobRun(PipelineJobProfiler.java:63)
	at sun.reflect.GeneratedMethodAccessor188.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:629)
	at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:618)
	at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
	at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:656)
	at com.cloudera.launchpad.bootstrap.deployment.ConfigureExternalDatabaseForClouderaManager$$EnhancerBySpringCGLIB$$61ecc0be.runUnchecked(<generated>)
	at com.cloudera.launchpad.pipeline.util.PipelineRunner$JobCallable.call(PipelineRunner.java:197)
	at com.cloudera.launchpad.pipeline.util.PipelineRunner$JobCallable.call(PipelineRunner.java:168)
	at com.github.rholder.retry.AttemptTimeLimiters$NoAttemptTimeLimit.call(AttemptTimeLimiters.java:78)
	at com.github.rholder.retry.Retryer.call(Retryer.java:160)

Seems like Google switch to GTID replication a while back, at latest in 2016 by the looks of this message someone left on this Stackoverflow post. I've tried using and external datastore on RDS before and I did not have this issue.

@hartfordfive
Copy link
Author

@phunt Any chance this may be looked at over the next month or so?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant