Jira license update fails after the database migration that is done via AWS Database Migration Service

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Fisheye および Crucible は除く

問題

Jira license update fails after the DB migration that is done via AWS Database Migration Service.

The following errors appear in the atlassian-jira.log

2021-05-01 11:27:22,257+0000 JIRA-EventThread-20 ERROR test@test.com 687x2226x2 1vgtcxl 213.107.67.226,10.1.64.91 /rest/plugins/applications/1.0/installed/jira-servicedesk/license [c.a.s.b.lifecycle.server.ServerPluginLifeCycle] Caught PSQLException for insert into "public"."AO_2C4E5C_MAILRUNAUDIT" ("MAIL_CONNECTION_ID", "MAIL_CHANNEL_NAME", "FAILURE_MESSAGE", "NO_OF_RETRY", "RUN_OUTCOME", "CREATED_TIMESTAMP", "UPDATED_TIMESTAMP") values (?, ?, ?, ?, ?, ?, ?)
com.querydsl.core.QueryException: Caught PSQLException for insert into "public"."AO_2C4E5C_MAILRUNAUDIT" ("MAIL_CONNECTION_ID", "MAIL_CHANNEL_NAME", "FAILURE_MESSAGE", "NO_OF_RETRY", "RUN_OUTCOME", "CREATED_TIMESTAMP", "UPDATED_TIMESTAMP") values (?, ?, ?, ?, ?, ?, ?)
	at com.querydsl.sql.DefaultSQLExceptionTranslator.translate(DefaultSQLExceptionTranslator.java:50)
	at com.querydsl.sql.Configuration.translate(Configuration.java:459)
	at com.querydsl.sql.dml.SQLInsertClause.executeWithKeys(SQLInsertClause.java:408)
	at com.querydsl.sql.dml.SQLInsertClause.executeWithKey(SQLInsertClause.java:201)
	at com.querydsl.sql.dml.SQLInsertClause.executeWithKey(SQLInsertClause.java:182)
	at com.atlassian.jira.internal.mail.processor.querydsl.QueryDslHelper.create(QueryDslHelper.java:79)
	at com.atlassian.jira.internal.mail.processor.querydsl.QueryDslHelper.lambda$create$0(QueryDslHelper.java:100)
	at com.atlassian.pocketknife.internal.querydsl.DatabaseAccessorImpl.lambda$execute$0(DatabaseAccessorImpl.java:69)
	at com.atlassian.sal.core.rdbms.DefaultTransactionalExecutor.executeInternal(DefaultTransactionalExecutor.java:87)
	at com.atlassian.sal.core.rdbms.DefaultTransactionalExecutor.lambda$execute$0(DefaultTransactionalExecutor.java:43)
	at com.atlassian.jira.database.DatabaseAccessorImpl.runInManagedTransaction(DatabaseAccessorImpl.java:131)
	... 2 filtered
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26)
	at com.sun.proxy.$Proxy408.runInManagedTransaction(Unknown Source)
	... 2 filtered
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.atlassian.plugin.osgi.bridge.external.HostComponentFactoryBean$DynamicServiceInvocationHandler.invoke(HostComponentFactoryBean.java:131)
	at com.sun.proxy.$Proxy408.runInManagedTransaction(Unknown Source)
	at com.atlassian.sal.jira.rdbms.JiraHostConnectionAccessor.runInStartedOrExistingTransaction(JiraHostConnectionAccessor.java:130)
	at com.atlassian.sal.jira.rdbms.JiraHostConnectionAccessor.execute(JiraHostConnectionAccessor.java:60)
	at com.atlassian.sal.core.rdbms.DefaultTransactionalExecutor.execute(DefaultTransactionalExecutor.java:40)
	at com.atlassian.pocketknife.internal.querydsl.DatabaseAccessorImpl.execute(DatabaseAccessorImpl.java:67)
	at com.atlassian.pocketknife.internal.querydsl.DatabaseAccessorImpl.runInTransaction(DatabaseAccessorImpl.java:43)
	at com.atlassian.pocketknife.api.querydsl.DatabaseAccessor.runInTransaction(DatabaseAccessor.java:134)
	at com.atlassian.jira.internal.mail.processor.querydsl.QueryDslHelper.create(QueryDslHelper.java:99)
	at com.atlassian.jira.internal.mail.processor.feature.audit.mailrun.MailRunAuditStore.createMailRunAudit(MailRunAuditStore.java:63)
	at com.atlassian.jira.internal.mail.processor.feature.audit.mailrun.MailRunAuditManager.createMailRunAudit(MailRunAuditManager.java:125)
	at com.atlassian.jira.internal.mail.processor.feature.audit.mailrun.MailRunAuditManager.saveMailRunAudit(MailRunAuditManager.java:59)
	at com.atlassian.jira.internal.mail.processor.feature.channel.MailChannelManager.updateConfiguration(MailChannelManager.java:317)
	at com.atlassian.jira.internal.mail.processor.feature.channel.MailChannelManager.updateChannelDefinitionInTransaction(MailChannelManager.java:282)
	at com.atlassian.jira.internal.mail.processor.feature.channel.MailChannelManager.lambda$updateChannelDefinition$4(MailChannelManager.java:267)
	at com.atlassian.jira.internal.mail.processor.util.db.JeppTransactionExecutorImpl.lambda$executeInTransaction$0(JeppTransactionExecutorImpl.java:28)
	at com.atlassian.pocketknife.internal.querydsl.DatabaseAccessorImpl.lambda$execute$0(DatabaseAccessorImpl.java:69)
	at com.atlassian.sal.core.rdbms.DefaultTransactionalExecutor.executeInternal(DefaultTransactionalExecutor.java:87)
	at com.atlassian.sal.core.rdbms.DefaultTransactionalExecutor.lambda$execute$0(DefaultTransactionalExecutor.java:43)
	at com.atlassian.sal.jira.rdbms.JiraHostConnectionAccessor.lambda$borrowConnectionAndExecute$0(JiraHostConnectionAccessor.java:95)
	at com.atlassian.jira.database.DatabaseAccessorImpl.executeQuery(DatabaseAccessorImpl.java:74)
	... 2 filtered
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26)
	at com.sun.proxy.$Proxy408.executeQuery(Unknown Source)
	... 2 filtered
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.atlassian.plugin.osgi.bridge.external.HostComponentFactoryBean$DynamicServiceInvocationHandler.invoke(HostComponentFactoryBean.java:131)
	at com.sun.proxy.$Proxy408.executeQuery(Unknown Source)
	at com.atlassian.sal.jira.rdbms.JiraHostConnectionAccessor.borrowConnectionAndExecute(JiraHostConnectionAccessor.java:84)
	at com.atlassian.sal.jira.rdbms.JiraHostConnectionAccessor.execute(JiraHostConnectionAccessor.java:48)
	at com.atlassian.sal.core.rdbms.DefaultTransactionalExecutor.execute(DefaultTransactionalExecutor.java:40)
	at com.atlassian.pocketknife.internal.querydsl.DatabaseAccessorImpl.execute(DatabaseAccessorImpl.java:67)
	at com.atlassian.pocketknife.internal.querydsl.DatabaseAccessorImpl.runInNewTransaction(DatabaseAccessorImpl.java:38)
	at com.atlassian.pocketknife.api.querydsl.DatabaseAccessor.runInNewTransaction(DatabaseAccessor.java:54)
	at com.atlassian.jira.internal.mail.processor.util.db.JeppTransactionExecutorImpl.executeInTransaction(JeppTransactionExecutorImpl.java:27)
	at com.atlassian.jira.internal.mail.processor.feature.channel.MailChannelManager.updateChannelDefinition(MailChannelManager.java:266)
	at com.atlassian.jira.internal.mail.processor.feature.channel.DefaultChannelManager.update(DefaultChannelManager.java:72)
	... 3 filtered
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)
	at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56)
	at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)
	at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:136)
	at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:124)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)
	at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70)
	at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)
	at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)
	at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:136)
	at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:124)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)
	at com.sun.proxy.$Proxy8198.update(Unknown Source)
	at com.atlassian.servicedesk.bootstrap.lifecycle.SDMailChannelInitializer.lambda$null$6(SDMailChannelInitializer.java:189)
	at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
	at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
	at java.util.Iterator.forEachRemaining(Iterator.java:116)
	at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
	at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:580)
	at java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:270)
	at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382)
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
	at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
	at com.atlassian.servicedesk.bootstrap.lifecycle.SDMailChannelInitializer.lambda$updateSDMailChannels$7(SDMailChannelInitializer.java:187)
	at io.atlassian.util.concurrent.ManagedLocks$ManagedLockImpl.withLock(ManagedLocks.java:302)
	at com.atlassian.servicedesk.bootstrap.lifecycle.SDMailChannelInitializer.updateSDMailChannels(SDMailChannelInitializer.java:182)
	at com.atlassian.servicedesk.bootstrap.lifecycle.SDMailChannelInitializer.enableSDMailChannelsOnStartup(SDMailChannelInitializer.java:87)
	at com.atlassian.servicedesk.bootstrap.lifecycle.server.ServerPluginLifeCycle.initializeLicenseDependentItems(ServerPluginLifeCycle.java:287)
	at com.atlassian.servicedesk.bootstrap.lifecycle.server.ServerPluginLifeCycle.start(ServerPluginLifeCycle.java:207)
	at com.atlassian.servicedesk.bootstrap.lifecycle.server.ServerPluginLifeCycle.lambda$restartPlugin$2(ServerPluginLifeCycle.java:344)
	at com.atlassian.servicedesk.bootstrap.lifecycle.LifecycleLock.writeImpl(LifecycleLock.java:96)
	at com.atlassian.servicedesk.bootstrap.lifecycle.LifecycleLock.runOnStartup(LifecycleLock.java:74)
	at com.atlassian.servicedesk.bootstrap.lifecycle.server.ServerPluginLifeCycle.restartPlugin(ServerPluginLifeCycle.java:342)
	at com.atlassian.servicedesk.internal.util.SafeRunner.runAlways(SafeRunner.java:58)
	at com.atlassian.servicedesk.bootstrap.lifecycle.server.ServerPluginLifeCycle.handleEvent(ServerPluginLifeCycle.java:184)
	... 3 filtered
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:42)
	at com.atlassian.event.internal.AsynchronousAbleEventDispatcher.lambda$null$0(AsynchronousAbleEventDispatcher.java:37)
	at com.atlassian.jira.event.JiraEventExecutorFactory$1.lambda$execute$0(JiraEventExecutorFactory.java:47)
	at com.atlassian.jira.util.thread.JiraThreadLocalUtils.lambda$wrap$1(JiraThreadLocalUtils.java:156)
	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: org.postgresql.util.PSQLException: ERROR: null value in column "ID" violates not-null constraint
  Detail: Failing row contains (1619868442253, Channel is enabled, null, test@test.com, 1, 0, ENABLED, 1619868442253).
	at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2468)
	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2211)
	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:309)
	at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:446)
	at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:149)
	at org.postgresql.jdbc.PgPreparedStatement.executeUpdate(PgPreparedStatement.java:124)
	at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:98)
	at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:98)
	at com.atlassian.jira.ofbiz.sql.PreparedStatementWrapper.executeUpdate(PreparedStatementWrapper.java:47)
	at com.atlassian.jira.diagnostic.connection.DiagnosticPreparedStatement.lambda$executeUpdate$7(DiagnosticPreparedStatement.java:69)
	at com.atlassian.diagnostics.internal.platform.monitor.db.DefaultDatabaseDiagnosticsCollector.recordExecutionTime(DefaultDatabaseDiagnosticsCollector.java:69)
	at com.atlassian.jira.diagnostic.connection.DatabaseDiagnosticsCollectorDelegate.recordExecutionTime(DatabaseDiagnosticsCollectorDelegate.java:55)
	at com.atlassian.jira.diagnostic.connection.DiagnosticPreparedStatement.executeUpdate(DiagnosticPreparedStatement.java:69)
	at com.querydsl.sql.dml.SQLInsertClause.executeWithKeys(SQLInsertClause.java:368)
	... 114 more
2021-05-01 11:27:22,259+0000 JIRA-EventThread-20 INFO test@test.com 687x2226x2 1vgtcxl 213.107.67.226,10.1.64.91 /rest/plugins/applications/1.0/installed/jira-servicedesk/license [atlassian.servicedesk.lifecycle] We are now in an indeterminable state.
2021-05-01 11:31:20,853+0000 https-jsse-nio-8443-exec-38 ERROR test@test.com 691x2492x1 1vgtcxl 213.107.67.226,10.1.64.91 /rest/troubleshooting/latest/support-zip/cluster [c.a.t.stp.persistence.ActiveObjectsTaskMonitorRepository] Failed to persist task monitor with taskId=1883a93e-dd73-48e9-a21a-ea6c676655e7 into the database
com.atlassian.activeobjects.internal.ActiveObjectsSqlException: There was a SQL exception thrown by the Active Objects library:
Database:
	- name:PostgreSQL
	- version:9.6.19
	- minor version:6
	- major version:9
Driver:
	- name:PostgreSQL JDBC Driver
	- version:42.2.6
org.postgresql.util.PSQLException: ERROR: relation "public.AO_4789DD_TASK_MONITOR_ID_seq" does not exist
  Position: 16
	at com.atlassian.activeobjects.internal.EntityManagedActiveObjects.create(EntityManagedActiveObjects.java:94)
	at com.atlassian.activeobjects.osgi.TenantAwareActiveObjects.create(TenantAwareActiveObjects.java:266)
	... 3 filtered
	at java.lang.reflect.Method.invoke(Method.java:498)

原因

The problem happens after the DB migration that is done via AWS Database Migration Service and if the database sequences are not migrated.

ソリューション

Perform the migration once again and ensure that the sequences are migrated.


説明
製品
最終更新日: 2021 年 10 月 13 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.