Step 5 of BDA Upgrade Fails with "MySQLSyntaxErrorException: Duplicate column name 'EXTERNAL_ACCOUNT_ID'" (Doc ID 2275585.1)

Last updated on JUNE 10, 2017

Applies to:

Big Data Appliance Integrated Software - Version 4.5.0 and later
Miracle Linux x86-64

Symptoms

 
Step 5 of a Mammoth upgrade fails with "MySQLSyntaxErrorException: Duplicate column name 'EXTERNAL_ACCOUNT_ID'". And Cloudera Manager will not start.

In the case here the upgrade was from BDA V4.5 to BDA V4.7.

1. The Mammoth upgrade fails with:

INFO: Step 5: Installing Hadoop Parcel
INFO: Making sure all puppet agents can be accessed.
INFO: Pinging puppet agents
INFO: Starting Cloudera Manager server/agents. This will take some time ...
...
INFO: Installing Hadoop Parcel. This will take some time ...
...
INFO: Creating environment.pp file ...
ERROR: Step 5 failed
ERROR: Cannot continue with operation
INFO: Time spent in step 5 InstallHadoop is 1513 seconds.
INFO: Running bdadiagcluster...

2. The associated log shows the error to be:

2017-06-10 02:00:17,625 INFO main:com.cloudera.enterprise.dbutil.DbUtil: Current database schema version: 5900
2017-06-10 02:00:17,731 FATAL main:org.hsqldb.cmdline.SqlFile: SQL Error at 'UTF-8' line 1:
"alter table AUDITS add column EXTERNAL_ACCOUNT_ID bigint"
Duplicate column name 'EXTERNAL_ACCOUNT_ID'
2017-06-10 02:00:17,731 ERROR main:com.cloudera.enterprise.dbutil.SqlFileRunner: Exception while executing ddl scripts.
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Duplicate column name 'EXTERNAL_ACCOUNT_ID'
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:377)
at com.mysql.jdbc.Util.getInstance(Util.java:360)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:978)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3887)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3823)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2435)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2582)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2526)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2484)

at com.cloudera.server.cmf.Main.bootstrapSpringContext(Main.java:387)
at com.cloudera.server.cmf.Main.<init>(Main.java:242)
at com.cloudera.server.cmf.Main.main(Main.java:216)
2017-06-10 02:00:17,735 ERROR main:com.cloudera.server.cmf.bootstrap.EntityManagerFactoryBean: Unable to upgrade schema to latest version.
java.lang.RuntimeException: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Duplicate column name 'EXTERNAL_ACCOUNT_ID'
at com.cloudera.enterprise.dbutil.SqlFileRunner.runSqlFile(SqlFileRunner.java:86)
at com.cloudera.enterprise.dbutil.SqlScriptRunnerFactory$SqlStringRunner.run(SqlScriptRunnerFactory.java:211)
at com.cloudera.enterprise.dbutil.SqlScriptRunnerFactory$SqlScriptRunnerComposite.run(SqlScriptRunnerFactory.java:139)
at com.cloudera.enterprise.dbutil.SqlScriptRunnerFactory$SqlScriptRunnerComposite.run(SqlScriptRunnerFactory.java:139)
at com.cloudera.enterprise.dbutil.DbUtil.runScripts(DbUtil.java:423)

 

 

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms