Uploaded image for project: 'Ambari'
  1. Ambari
  2. AMBARI-21711

Seeing SQL errors in ambari server log when installing HDF 3.1

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.5.2
    • Fix Version/s: 2.5.2
    • Component/s: stacks
    • Labels:
      None

      Description

      09 Aug 2017 17:38:17,151 ERROR [alert-event-bus-1] AmbariJpaLocalTxnInterceptor:180 - [DETAILED ERROR] Rollback reason:
      Local Exception Stack:
      Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.2.v20151217-774c696): org.eclipse.persistence.exceptions.DatabaseException
      Internal Exception: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Column 'alert_state' cannot be null
      Error Code: 1048
      Call: INSERT INTO alert_history (alert_id, alert_instance, alert_label, alert_state, alert_text, alert_timestamp, cluster_id, component_name, host_name, service_name, alert_definition_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
              bind => [11 parameters bound]
      Query: InsertObjectQuery(AlertCurrentEntity{alertId=1, name=ambari_agent_disk_usage, state=null, latestTimestamp=1502300296216})
              at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:331)
              at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:902)
              at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeNoSelect(DatabaseAccessor.java:964)
              at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:633)
              at org.eclipse.persistence.internal.databaseaccess.ParameterizedSQLBatchWritingMechanism.executeBatch(ParameterizedSQLBatchWritingMechanism.java:149)
              at org.eclipse.persistence.internal.databaseaccess.ParameterizedSQLBatchWritingMechanism.executeBatchedStatements(ParameterizedSQLBatchWritingMechanism.java:134)
              at org.eclipse.persistence.internal.databaseaccess.ParameterizedSQLBatchWritingMechanism.appendCall(ParameterizedSQLBatchWritingMechanism.java:82)
              at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:605)
              at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:560)
              at org.eclipse.persistence.internal.sessions.AbstractSession.basicExecuteCall(AbstractSession.java:2055)
              at org.eclipse.persistence.sessions.server.ClientSession.executeCall(ClientSession.java:306)
              at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:242)
              at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:228)
              at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.insertObject(DatasourceCallQueryMechanism.java:377)
              at org.eclipse.persistence.internal.queries.StatementQueryMechanism.insertObject(StatementQueryMechanism.java:165)
              at org.eclipse.persistence.internal.queries.StatementQueryMechanism.insertObject(StatementQueryMechanism.java:180)
              at org.eclipse.persistence.internal.queries.DatabaseQueryMechanism.insertObjectForWrite(DatabaseQueryMechanism.java:489)
              at org.eclipse.persistence.queries.InsertObjectQuery.executeCommit(InsertObjectQuery.java:80)
              at org.eclipse.persistence.queries.InsertObjectQuery.executeCommitWithChangeSet(InsertObjectQuery.java:90)
              at org.eclipse.persistence.internal.queries.DatabaseQueryMechanism.executeWriteWithChangeSet(DatabaseQueryMechanism.java:301)
              at org.eclipse.persistence.queries.WriteObjectQuery.executeDatabaseQuery(WriteObjectQuery.java:58)
              at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:904)
              at org.eclipse.persistence.queries.DatabaseQuery.executeInUnitOfWork(DatabaseQuery.java:803)
              at org.eclipse.persistence.queries.ObjectLevelModifyQuery.executeInUnitOfWorkObjectLevelModifyQuery(ObjectLevelModifyQuery.java:108)
              at org.eclipse.persistence.queries.ObjectLevelModifyQuery.executeInUnitOfWork(ObjectLevelModifyQuery.java:85)
              at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2896)
              at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1857)
              at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1839)
              at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1790)
              at org.eclipse.persistence.internal.sessions.CommitManager.commitNewObjectsForClassWithChangeSet(CommitManager.java:227)
              at org.eclipse.persistence.internal.sessions.CommitManager.commitAllObjectsForClassWithChangeSet(CommitManager.java:194)
              at org.eclipse.persistence.internal.sessions.CommitManager.commitAllObjectsWithChangeSet(CommitManager.java:139)
              at org.eclipse.persistence.internal.sessions.AbstractSession.writeAllObjectsWithChangeSet(AbstractSession.java:4263)
              at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitToDatabase(UnitOfWorkImpl.java:1441)
              at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitToDatabaseWithChangeSet(UnitOfWorkImpl.java:1531)
              at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.commitRootUnitOfWork(RepeatableWriteUnitOfWork.java:278)
              at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitAndResume(UnitOfWorkImpl.java:1169)
              at org.eclipse.persistence.internal.jpa.transaction.EntityTransactionImpl.commit(EntityTransactionImpl.java:134)
              at org.apache.ambari.server.orm.AmbariJpaLocalTxnInterceptor.invoke(AmbariJpaLocalTxnInterceptor.java:153)
              at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72)
              at com.google.inject.internal.InterceptorStackCallback.intercept(InterceptorStackCallback.java:52)
              at org.apache.ambari.server.orm.dao.AlertsDAO$$EnhancerByGuice$$d44cac9.create(<generated>)
              at org.apache.ambari.server.events.listeners.alerts.AlertReceivedListener.onAlertEvent(AlertReceivedListener.java:234)
              at org.apache.ambari.server.events.listeners.alerts.AlertReceivedListener$$EnhancerByGuice$$a5b33fe4.CGLIB$onAlertEvent$1(<generated>)
              at org.apache.ambari.server.events.listeners.alerts.AlertReceivedListener$$EnhancerByGuice$$a5b33fe4$$FastClassByGuice$$36fcaba0.invoke(<generated>)
              at com.google.inject.internal.cglib.proxy.$MethodProxy.invokeSuper(MethodProxy.java:228)
              at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72)
              at org.apache.ambari.server.orm.AmbariLocalSessionInterceptor.invoke(AmbariLocalSessionInterceptor.java:43)
              at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72)
              at com.google.inject.internal.InterceptorStackCallback.intercept(InterceptorStackCallback.java:52)
              at org.apache.ambari.server.events.listeners.alerts.AlertReceivedListener$$EnhancerByGuice$$a5b33fe4.onAlertEvent(<generated>)
              at sun.reflect.GeneratedMethodAccessor106.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:498)
              at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
              at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
              at com.google.common.eventbus.AsyncEventBus.access$001(AsyncEventBus.java:34)
              at com.google.common.eventbus.AsyncEventBus$1.run(AsyncEventBus.java:117)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
              at java.lang.Thread.run(Thread.java:748)
      Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Column 'alert_state' cannot be null
              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:971)
              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:2530)
              at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1907)
              at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2141)
              at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2077)
              at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2062)
              at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:384)
              at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:892)
              ... 59 more
      09 Aug 2017 17:38:17,153 ERROR [alert-event-bus-1] AmbariJpaLocalTxnInterceptor:188 - [DETAILED ERROR] Internal exception (1) :
      com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Column 'alert_state' cannot be null
              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:971)
              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:2530)
              at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1907)
              at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2141)
              at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2077)
      

        Attachments

        1. AMBARI-21711.patch
          0.8 kB
          Sumit Mohanty

          Activity

            People

            • Assignee:
              sumitmohanty Sumit Mohanty
              Reporter:
              arpitgupta Arpit Gupta

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment