Uploaded image for project: 'Crowd Data Center'
  1. Crowd Data Center
  2. CWD-3568

Multiple REST calls at the same time has cwd_token race condition.

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Low Low
    • 2.7
    • None
    • Horde, REST
    • None

      If you look at these logs you can see that Crowd has a race condition if multiple REST calls attempt to create multiple tokens at the same time:

      2013-08-28 02:47:14.952800500 2013-08-28 02:47:14,950 TP-Processor7 WARN [engine.jdbc.spi.SqlExceptionHelper] SQL Error: 0, SQLState: 23505
      2013-08-28 02:47:14.952801500 2013-08-28 02:47:14,950 TP-Processor7 ERROR [engine.jdbc.spi.SqlExceptionHelper] Batch entry 0 insert into cwd_token (directory_id, entity_name, random_number, identifier_hash, random_hash, created_date, last_accessed_date, last_accessed_time, duration, id) values ('-1', 'jira', '8655037538040444656', 'hVtW5FElx8qNjHjM06Kw8A00', '9uSHM0TywIF3CK0uhJV5Ow00', '2013-08-28 02:47:14.691000 +00:00:00', '2013-08-28 02:47:14.691000 +00:00:00', '1377658034691', NULL, '491523') was aborted.  Call getNextException to see the cause.
      2013-08-28 02:47:14.952816500 2013-08-28 02:47:14,950 TP-Processor7 WARN [engine.jdbc.spi.SqlExceptionHelper] SQL Error: 0, SQLState: 23505
      2013-08-28 02:47:14.952817500 2013-08-28 02:47:14,950 TP-Processor7 ERROR [engine.jdbc.spi.SqlExceptionHelper] ERROR: duplicate key value violates unique constraint "cwd_token_identifier_hash_key"
      2013-08-28 02:47:14.952818500 2013-08-28 02:47:14,951 TP-Processor7 ERROR [jdbc.batch.internal.BatchingBatch] HHH000315: Exception executing batch [could not perform addBatch]
      2013-08-28 02:47:14.956453500 2013-08-28 02:47:14,952 TP-Processor1 WARN [engine.jdbc.spi.SqlExceptionHelper] SQL Error: 0, SQLState: 23505
      2013-08-28 02:47:14.956455500 2013-08-28 02:47:14,956 TP-Processor1 ERROR [engine.jdbc.spi.SqlExceptionHelper] Batch entry 0 insert into cwd_token (directory_id, entity_name, random_number, identifier_hash, random_hash, created_date, last_accessed_date, last_accessed_time, duration, id) values ('-1', 'jira', '9043271484788623239', 'hVtW5FElx8qNjHjM06Kw8A00', 'oaDMcq1gFxaNbljtKKp0Bg00', '2013-08-28 02:47:14.702000 +00:00:00', '2013-08-28 02:47:14.702000 +00:00:00', '1377658034702', NULL, '491524') was aborted.  Call getNextException to see the cause.
      2013-08-28 02:47:14.956469500 2013-08-28 02:47:14,956 TP-Processor1 WARN [engine.jdbc.spi.SqlExceptionHelper] SQL Error: 0, SQLState: 23505
      2013-08-28 02:47:14.956477500 2013-08-28 02:47:14,956 TP-Processor1 ERROR [engine.jdbc.spi.SqlExceptionHelper] ERROR: duplicate key value violates unique constraint "cwd_token_identifier_hash_key"
      2013-08-28 02:47:14.965455500 2013-08-28 02:47:14,952 TP-Processor2 WARN [engine.jdbc.spi.SqlExceptionHelper] SQL Error: 0, SQLState: 23505
      2013-08-28 02:47:14.965456500 2013-08-28 02:47:14,957 TP-Processor2 ERROR [engine.jdbc.spi.SqlExceptionHelper] Batch entry 0 insert into cwd_token (directory_id, entity_name, random_number, identifier_hash, random_hash, created_date, last_accessed_date, last_accessed_time, duration, id) values ('-1', 'jira', '510701224900085190', 'hVtW5FElx8qNjHjM06Kw8A00', 'imnuLQK84Vunu2kkNXvWwg00', '2013-08-28 02:47:14.719000 +00:00:00', '2013-08-28 02:47:14.719000 +00:00:00', '1377658034719', NULL, '491525') was aborted.  Call getNextException to see the cause.
      2013-08-28 02:47:14.965465500 2013-08-28 02:47:14,957 TP-Processor2 WARN [engine.jdbc.spi.SqlExceptionHelper] SQL Error: 0, SQLState: 23505
      2013-08-28 02:47:14.965466500 2013-08-28 02:47:14,957 TP-Processor2 ERROR [engine.jdbc.spi.SqlExceptionHelper] ERROR: duplicate key value violates unique constraint "cwd_token_identifier_hash_key"
      2013-08-28 02:47:14.965467500 2013-08-28 02:47:14,957 TP-Processor2 ERROR [jdbc.batch.internal.BatchingBatch] HHH000315: Exception executing batch [could not perform addBatch]
      2013-08-28 02:47:14.965470500 Aug 28, 2013 2:47:14 AM org.apache.catalina.core.StandardWrapperValve invoke
      2013-08-28 02:47:14.965470500 SEVERE: Servlet.service() for servlet jersey-servlet threw exception
      2013-08-28 02:47:14.965471500 org.springframework.dao.DataIntegrityViolationException: could not perform addBatch; SQL [insert into cwd_token (directory_id, entity_name, random_number, identifier_hash, random_hash, created_date, last_accessed_date, last_accessed_time, duration, id) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationException: could not perform addBatch
      2013-08-28 02:47:14.965474500 	at org.springframework.orm.hibernate4.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:138)
      2013-08-28 02:47:14.965475500 	at org.springframework.orm.hibernate4.HibernateTransactionManager.convertHibernateAccessException(HibernateTransactionManager.java:680)
      2013-08-28 02:47:14.965476500 	at org.springframework.orm.hibernate4.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:562)
      2013-08-28 02:47:14.965476500 	at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:755)
      2013-08-28 02:47:14.965479500 	at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:724)
      2013-08-28 02:47:14.965480500 	at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:475)
      2013-08-28 02:47:14.965481500 	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:270)
      2013-08-28 02:47:14.965486500 	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94)
      2013-08-28 02:47:14.965486500 	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      2013-08-28 02:47:14.965487500 	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      2013-08-28 02:47:14.965488500 	at $Proxy22.authenticateApplication(Unknown Source)
      2013-08-28 02:47:14.965489500 	at com.atlassian.crowd.plugin.rest.filter.BasicApplicationAuthenticationFilter.authenticate(BasicApplicationAuthenticationFilter.java:132)
      2013-08-28 02:47:14.965489500 	at com.atlassian.crowd.plugin.rest.filter.BasicApplicationAuthenticationFilter.doFilter(BasicApplicationAuthenticationFilter.java:86)
      2013-08-28 02:47:14.965492500 	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343)
      2013-08-28 02:47:14.965493500 	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260)
      2013-08-28 02:47:14.965494500 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      2013-08-28 02:47:14.965495500 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      2013-08-28 02:47:14.965495500 	at com.atlassian.crowd.horde.filters.SysadminPasswordExpiryServletFilter.doFilter(SysadminPasswordExpiryServletFilter.java:42)
      2013-08-28 02:47:14.965496500 	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343)
      2013-08-28 02:47:14.965498500 	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260)
      2013-08-28 02:47:14.965498500 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      2013-08-28 02:47:14.965499500 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      2013-08-28 02:47:14.965499500 	at org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:152)
      2013-08-28 02:47:14.965502500 	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
      2013-08-28 02:47:14.965502500 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      2013-08-28 02:47:14.965503500 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      2013-08-28 02:47:14.965504500 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
      2013-08-28 02:47:14.965505500 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      2013-08-28 02:47:14.965506500 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      2013-08-28 02:47:14.965506500 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      2013-08-28 02:47:14.965507500 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      2013-08-28 02:47:14.965508500 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
      2013-08-28 02:47:14.965508500 	at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
      2013-08-28 02:47:14.965509500 	at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
      2013-08-28 02:47:14.965511500 	at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:776)
      2013-08-28 02:47:14.965512500 	at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:705)
      2013-08-28 02:47:14.965512500 	at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:898)
      2013-08-28 02:47:14.965513500 	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
      2013-08-28 02:47:14.965514500 	at java.lang.Thread.run(Thread.java:662)
      2013-08-28 02:47:14.965514500 Caused by: org.hibernate.exception.ConstraintViolationException: could not perform addBatch
      2013-08-28 02:47:14.965515500 	at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:129)
      2013-08-28 02:47:14.965516500 	at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49)
      2013-08-28 02:47:14.965519500 	at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:125)
      2013-08-28 02:47:14.965519500 	at org.hibernate.engine.jdbc.batch.internal.BatchingBatch.performExecution(BatchingBatch.java:114)
      2013-08-28 02:47:14.965520500 	at org.hibernate.engine.jdbc.batch.internal.BatchingBatch.doExecuteBatch(BatchingBatch.java:101)
      2013-08-28 02:47:14.965520500 	at org.hibernate.engine.jdbc.batch.internal.AbstractBatchImpl.execute(AbstractBatchImpl.java:149)
      2013-08-28 02:47:14.965523500 	at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.executeBatch(JdbcCoordinatorImpl.java:198)
      2013-08-28 02:47:14.965523500 	at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:372)
      2013-08-28 02:47:14.965524500 	at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:286)
      2013-08-28 02:47:14.965524500 	at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:339)
      2013-08-28 02:47:14.965526500 	at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:52)
      2013-08-28 02:47:14.965526500 	at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1234)
      2013-08-28 02:47:14.965527500 	at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:404)
      2013-08-28 02:47:14.965527500 	at org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.beforeTransactionCommit(JdbcTransaction.java:101)
      2013-08-28 02:47:14.965529500 	at org.hibernate.engine.transaction.spi.AbstractTransactionImpl.commit(AbstractTransactionImpl.java:175)
      2013-08-28 02:47:14.965529500 	at org.springframework.orm.hibernate4.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:554)
      2013-08-28 02:47:14.965533500 	... 36 more
      2013-08-28 02:47:14.965533500 Caused by: java.sql.BatchUpdateException: Batch entry 0 insert into cwd_token (directory_id, entity_name, random_number, identifier_hash, random_hash, created_date, last_accessed_date, last_accessed_time, duration, id) values ('-1', 'jira', '510701224900085190', 'hVtW5FElx8qNjHjM06Kw8A00', 'imnuLQK84Vunu2kkNXvWwg00', '2013-08-28 02:47:14.719000 +00:00:00', '2013-08-28 02:47:14.719000 +00:00:00', '1377658034719', NULL, '491525') was aborted.  Call getNextException to see the cause.
      2013-08-28 02:47:14.965536500 	at org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handleError(AbstractJdbc2Statement.java:2586)
      2013-08-28 02:47:14.965537500 	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1811)
      2013-08-28 02:47:14.965538500 	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:407)
      2013-08-28 02:47:14.965539500 	at org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc2Statement.java:2725)
      2013-08-28 02:47:14.965539500 	at org.hibernate.engine.jdbc.batch.internal.BatchingBatch.performExecution(BatchingBatch.java:110)
      2013-08-28 02:47:14.965540500 	... 48 more
      2013-08-28 02:47:14.965541500 Aug 28, 2013 2:47:14 AM org.apache.catalina.core.StandardWrapperValve invoke
      2013-08-28 02:47:14.965543500 SEVERE: Servlet.service() for servlet jersey-servlet threw exception
      2013-08-28 02:47:14.965543500 org.springframework.dao.DataIntegrityViolationException: could not perform addBatch; SQL [insert into cwd_token (directory_id, entity_name, random_number, identifier_hash, random_hash, created_date, last_accessed_date, last_accessed_time, duration, id) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationException: could not perform addBatch
      2013-08-28 02:47:14.965546500 	at org.springframework.orm.hibernate4.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:138)
      2013-08-28 02:47:14.965549500 	at org.springframework.orm.hibernate4.HibernateTransactionManager.convertHibernateAccessException(HibernateTransactionManager.java:680)
      2013-08-28 02:47:14.965550500 	at org.springframework.orm.hibernate4.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:562)
      2013-08-28 02:47:14.965551500 	at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:755)
      2013-08-28 02:47:14.965553500 	at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:724)
      2013-08-28 02:47:14.965554500 	at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:475)
      2013-08-28 02:47:14.965555500 	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:270)
      2013-08-28 02:47:14.965556500 	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94)
      2013-08-28 02:47:14.965557500 	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      2013-08-28 02:47:14.965557500 	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      2013-08-28 02:47:14.965559500 	at $Proxy22.authenticateApplication(Unknown Source)
      2013-08-28 02:47:14.965559500 	at com.atlassian.crowd.plugin.rest.filter.BasicApplicationAuthenticationFilter.authenticate(BasicApplicationAuthenticationFilter.java:132)
      2013-08-28 02:47:14.965560500 	at com.atlassian.crowd.plugin.rest.filter.BasicApplicationAuthenticationFilter.doFilter(BasicApplicationAuthenticationFilter.java:86)
      2013-08-28 02:47:14.965562500 	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343)
      2013-08-28 02:47:14.965563500 	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260)
      2013-08-28 02:47:14.965564500 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      2013-08-28 02:47:14.965565500 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      2013-08-28 02:47:14.965566500 	at com.atlassian.crowd.horde.filters.SysadminPasswordExpiryServletFilter.doFilter(SysadminPasswordExpiryServletFilter.java:42)
      2013-08-28 02:47:14.965566500 	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343)
      2013-08-28 02:47:14.965568500 	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260)
      2013-08-28 02:47:14.965568500 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      2013-08-28 02:47:14.965569500 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      2013-08-28 02:47:14.965569500 	at org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:152)
      2013-08-28 02:47:14.965572500 	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
      2013-08-28 02:47:14.965573500 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      2013-08-28 02:47:14.965574500 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      2013-08-28 02:47:14.965575500 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
      2013-08-28 02:47:14.965575500 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      2013-08-28 02:47:14.965576500 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      2013-08-28 02:47:14.965577500 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      2013-08-28 02:47:14.965578500 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      2013-08-28 02:47:14.965578500 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
      2013-08-28 02:47:14.965579500 	at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
      2013-08-28 02:47:14.965579500 	at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
      2013-08-28 02:47:14.965582500 	at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:776)
      2013-08-28 02:47:14.965584500 	at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:705)
      2013-08-28 02:47:14.965584500 	at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:898)
      2013-08-28 02:47:14.965585500 	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
      2013-08-28 02:47:14.965585500 	at java.lang.Thread.run(Thread.java:662)
      2013-08-28 02:47:14.965586500 Caused by: org.hibernate.exception.ConstraintViolationException: could not perform addBatch
      2013-08-28 02:47:14.965587500 	at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:129)
      2013-08-28 02:47:14.965588500 	at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49)
      2013-08-28 02:47:14.965588500 	at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:125)
      2013-08-28 02:47:14.965589500 	at org.hibernate.engine.jdbc.batch.internal.BatchingBatch.performExecution(BatchingBatch.java:114)
      2013-08-28 02:47:14.965590500 	at org.hibernate.engine.jdbc.batch.internal.BatchingBatch.doExecuteBatch(BatchingBatch.java:101)
      2013-08-28 02:47:14.965591500 	at org.hibernate.engine.jdbc.batch.internal.AbstractBatchImpl.execute(AbstractBatchImpl.java:149)
      2013-08-28 02:47:14.965593500 	at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.executeBatch(JdbcCoordinatorImpl.java:198)
      2013-08-28 02:47:14.965594500 	at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:372)
      2013-08-28 02:47:14.965594500 	at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:286)
      2013-08-28 02:47:14.965595500 	at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:339)
      2013-08-28 02:47:14.965596500 	at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:52)
      2013-08-28 02:47:14.965597500 	at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1234)
      2013-08-28 02:47:14.965597500 	at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:404)
      2013-08-28 02:47:14.965598500 	at org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.beforeTransactionCommit(JdbcTransaction.java:101)
      2013-08-28 02:47:14.965599500 	at org.hibernate.engine.transaction.spi.AbstractTransactionImpl.commit(AbstractTransactionImpl.java:175)
      2013-08-28 02:47:14.965600500 	at org.springframework.orm.hibernate4.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:554)
      2013-08-28 02:47:14.965601500 	... 36 more
      2013-08-28 02:47:14.965601500 Caused by: java.sql.BatchUpdateException: Batch entry 0 insert into cwd_token (directory_id, entity_name, random_number, identifier_hash, random_hash, created_date, last_accessed_date, last_accessed_time, duration, id) values ('-1', 'jira', '8655037538040444656', 'hVtW5FElx8qNjHjM06Kw8A00', '9uSHM0TywIF3CK0uhJV5Ow00', '2013-08-28 02:47:14.691000 +00:00:00', '2013-08-28 02:47:14.691000 +00:00:00', '1377658034691', NULL, '491523') was aborted.  Call getNextException to see the cause.
      2013-08-28 02:47:14.965605500 	at org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handleError(AbstractJdbc2Statement.java:2586)
      2013-08-28 02:47:14.965606500 	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1811)
      2013-08-28 02:47:14.965607500 	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:407)
      2013-08-28 02:47:14.965607500 	at org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc2Statement.java:2725)
      2013-08-28 02:47:14.965608500 	at org.hibernate.engine.jdbc.batch.internal.BatchingBatch.performExecution(BatchingBatch.java:110)
      2013-08-28 02:47:14.965609500 	... 48 more
      2013-08-28 02:47:14.965609500 2013-08-28 02:47:14,956 TP-Processor1 ERROR [jdbc.batch.internal.BatchingBatch] HHH000315: Exception executing batch [could not perform addBatch]
      2013-08-28 02:47:14.968385500 Aug 28, 2013 2:47:14 AM org.apache.catalina.core.StandardWrapperValve invoke
      2013-08-28 02:47:14.968386500 SEVERE: Servlet.service() for servlet jersey-servlet threw exception
      2013-08-28 02:47:14.968387500 org.springframework.dao.DataIntegrityViolationException: could not perform addBatch; SQL [insert into cwd_token (directory_id, entity_name, random_number, identifier_hash, random_hash, created_date, last_accessed_date, last_accessed_time, duration, id) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationException: could not perform addBatch
      2013-08-28 02:47:14.968392500 	at org.springframework.orm.hibernate4.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:138)
      2013-08-28 02:47:14.968393500 	at org.springframework.orm.hibernate4.HibernateTransactionManager.convertHibernateAccessException(HibernateTransactionManager.java:680)
      2013-08-28 02:47:14.968394500 	at org.springframework.orm.hibernate4.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:562)
      2013-08-28 02:47:14.968395500 	at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:755)
      2013-08-28 02:47:14.968397500 	at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:724)
      2013-08-28 02:47:14.968398500 	at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:475)
      2013-08-28 02:47:14.968399500 	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:270)
      2013-08-28 02:47:14.968401500 	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94)
      2013-08-28 02:47:14.968401500 	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      2013-08-28 02:47:14.968402500 	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      2013-08-28 02:47:14.968403500 	at $Proxy22.authenticateApplication(Unknown Source)
      2013-08-28 02:47:14.968404500 	at com.atlassian.crowd.plugin.rest.filter.BasicApplicationAuthenticationFilter.authenticate(BasicApplicationAuthenticationFilter.java:132)
      2013-08-28 02:47:14.968405500 	at com.atlassian.crowd.plugin.rest.filter.BasicApplicationAuthenticationFilter.doFilter(BasicApplicationAuthenticationFilter.java:86)
      2013-08-28 02:47:14.968407500 	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343)
      2013-08-28 02:47:14.968408500 	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260)
      2013-08-28 02:47:14.968408500 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      2013-08-28 02:47:14.968410500 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      2013-08-28 02:47:14.968410500 	at com.atlassian.crowd.horde.filters.SysadminPasswordExpiryServletFilter.doFilter(SysadminPasswordExpiryServletFilter.java:42)
      2013-08-28 02:47:14.968411500 	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343)
      2013-08-28 02:47:14.968412500 	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260)
      2013-08-28 02:47:14.968413500 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      2013-08-28 02:47:14.968414500 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      2013-08-28 02:47:14.968414500 	at org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:152)
      2013-08-28 02:47:14.968417500 	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
      2013-08-28 02:47:14.968417500 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      2013-08-28 02:47:14.968418500 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      2013-08-28 02:47:14.968422500 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
      2013-08-28 02:47:14.968422500 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      2013-08-28 02:47:14.968423500 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      2013-08-28 02:47:14.968423500 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      2013-08-28 02:47:14.968425500 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      2013-08-28 02:47:14.968425500 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
      2013-08-28 02:47:14.968426500 	at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
      2013-08-28 02:47:14.968426500 	at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
      2013-08-28 02:47:14.968429500 	at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:776)
      2013-08-28 02:47:14.968429500 	at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:705)
      2013-08-28 02:47:14.968430500 	at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:898)
      2013-08-28 02:47:14.968430500 	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
      2013-08-28 02:47:14.968432500 	at java.lang.Thread.run(Thread.java:662)
      2013-08-28 02:47:14.968432500 Caused by: org.hibernate.exception.ConstraintViolationException: could not perform addBatch
      2013-08-28 02:47:14.968432500 	at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:129)
      2013-08-28 02:47:14.968433500 	at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49)
      2013-08-28 02:47:14.968434500 	at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:125)
      2013-08-28 02:47:14.968435500 	at org.hibernate.engine.jdbc.batch.internal.BatchingBatch.performExecution(BatchingBatch.java:114)
      2013-08-28 02:47:14.968436500 	at org.hibernate.engine.jdbc.batch.internal.BatchingBatch.doExecuteBatch(BatchingBatch.java:101)
      2013-08-28 02:47:14.968436500 	at org.hibernate.engine.jdbc.batch.internal.AbstractBatchImpl.execute(AbstractBatchImpl.java:149)
      2013-08-28 02:47:14.968438500 	at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.executeBatch(JdbcCoordinatorImpl.java:198)
      2013-08-28 02:47:14.968439500 	at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:372)
      2013-08-28 02:47:14.968440500 	at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:286)
      2013-08-28 02:47:14.968440500 	at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:339)
      2013-08-28 02:47:14.968441500 	at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:52)
      2013-08-28 02:47:14.968442500 	at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1234)
      2013-08-28 02:47:14.968443500 	at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:404)
      2013-08-28 02:47:14.968443500 	at org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.beforeTransactionCommit(JdbcTransaction.java:101)
      2013-08-28 02:47:14.968444500 	at org.hibernate.engine.transaction.spi.AbstractTransactionImpl.commit(AbstractTransactionImpl.java:175)
      2013-08-28 02:47:14.968445500 	at org.springframework.orm.hibernate4.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:554)
      2013-08-28 02:47:14.968446500 	... 36 more
      2013-08-28 02:47:14.968448500 Caused by: java.sql.BatchUpdateException: Batch entry 0 insert into cwd_token (directory_id, entity_name, random_number, identifier_hash, random_hash, created_date, last_accessed_date, last_accessed_time, duration, id) values ('-1', 'jira', '9043271484788623239', 'hVtW5FElx8qNjHjM06Kw8A00', 'oaDMcq1gFxaNbljtKKp0Bg00', '2013-08-28 02:47:14.702000 +00:00:00', '2013-08-28 02:47:14.702000 +00:00:00', '1377658034702', NULL, '491524') was aborted.  Call getNextException to see the cause.
      2013-08-28 02:47:14.968453500 	at org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handleError(AbstractJdbc2Statement.java:2586)
      2013-08-28 02:47:14.968454500 	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1811)
      2013-08-28 02:47:14.968454500 	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:407)
      2013-08-28 02:47:14.968455500 	at org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc2Statement.java:2725)
      2013-08-28 02:47:14.968455500 	at org.hibernate.engine.jdbc.batch.internal.BatchingBatch.performExecution(BatchingBatch.java:110)
      2013-08-28 02:47:14.968457500 	... 48 more
      

      It would be good if this could be resolved soon.

            [CWD-3568] Multiple REST calls at the same time has cwd_token race condition.

            No need to worry; support will reopen this bug (or open a new one, depending on symptoms) if they find it reoccurring.

            Caspar Krieger (Inactive) added a comment - No need to worry; support will reopen this bug (or open a new one, depending on symptoms) if they find it reoccurring.

            intersol_old added a comment -

            Some bug on 2.8.0 check already opened support ticket CWDSUP-9957 – can someone reopen this bug?

            intersol_old added a comment - Some bug on 2.8.0 check already opened support ticket CWDSUP-9957 – can someone reopen this bug?

            thanks will do Joseph

            Deleted Account (Inactive) added a comment - thanks will do Joseph

            joe added a comment -

            praveenn, please get in touch with Atlassian Support. They're the best place to get help with your specific case.

            joe added a comment - praveenn , please get in touch with Atlassian Support . They're the best place to get help with your specific case.

            Thank you Diego will do that, I only copied a snippet of the logs yesterday and forgot the attachment, i have taken the full logs at the time of the crash, Please find that attached, Please let me know if you can find anything from this.

            Otherwise I will do do what you have advised if we get another crowd crash.

            Deleted Account (Inactive) added a comment - Thank you Diego will do that, I only copied a snippet of the logs yesterday and forgot the attachment, i have taken the full logs at the time of the crash, Please find that attached, Please let me know if you can find anything from this. Otherwise I will do do what you have advised if we get another crowd crash.

            Hi praveenn,

            I'm sorry to hear that you're having problems with Crowd. I'm not sure if there's a connection between the "Duplicate entry" errors in the logs and the crash that you experienced. The errors seem to appear in the log regularly, and since Crowd 2.7.2, they should not cause any inconvenience.

            If you experience another crash, please take a threaddump (kill -3) before restarting Crowd, and attach the full logs in a support ticket so we can investigate why Crowd became unresponsive. Thank you.

            Diego Berrueta added a comment - Hi praveenn , I'm sorry to hear that you're having problems with Crowd. I'm not sure if there's a connection between the "Duplicate entry" errors in the logs and the crash that you experienced. The errors seem to appear in the log regularly, and since Crowd 2.7.2, they should not cause any inconvenience. If you experience another crash, please take a threaddump (kill -3) before restarting Crowd, and attach the full logs in a support ticket so we can investigate why Crowd became unresponsive. Thank you.

            HI Diego,

            I had a similar problem last night on our crowd instances when it went down completely, We have to do a complete restart of the system to resolve it, and we are running crowd 2.7.2(Version: 2.7.2 (Build:#626 - 2014-05-13). it has stopped the crowd application, So can you please let us know what to do to avoid this in future? The only thing people were doing was couple of people changed their passwords within that minute.
            Logs are below.

            2014-09-29 08:29:21,814 http-bio-8443-exec-12971 WARN [engine.jdbc.spi.SqlExceptionHelper] SQL Error: 1062, SQLState: 23000
            2014-09-29 08:29:21,814 http-bio-8443-exec-12971 ERROR [engine.jdbc.spi.SqlExceptionHelper] Duplicate entry 'KZdKRJFQnM2NUNg6kGzDhw00' for key 'identifier_hash'
            2014-09-29 08:29:21,814 http-bio-8443-exec-12971 ERROR [jdbc.batch.internal.BatchingBatch] HHH000315: Exception executing batch [could not perform addBatch]
            2014-09-29 12:01:40,399 http-bio-8443-exec-12990 WARN [engine.jdbc.spi.SqlExceptionHelper] SQL Error: 1062, SQLState: 23000
            2014-09-29 12:01:40,400 http-bio-8443-exec-12990 ERROR [engine.jdbc.spi.SqlExceptionHelper] Duplicate entry 'hVtW5FElx8qNjHjM06Kw8A00' for key 'identifier_hash'
            2014-09-29 12:01:40,400 http-bio-8443-exec-12990 ERROR [jdbc.batch.internal.BatchingBatch] HHH000315: Exception executing batch [could not perform addBatch]
            2014-09-29 12:01:40,422 http-bio-8443-exec-13003 WARN [engine.jdbc.spi.SqlExceptionHelper] SQL Error: 1062, SQLState: 23000
            2014-09-29 12:01:40,422 http-bio-8443-exec-13003 ERROR [engine.jdbc.spi.SqlExceptionHelper] Duplicate entry 'hVtW5FElx8qNjHjM06Kw8A00' for key 'identifier_hash'
            2014-09-29 12:01:40,423 http-bio-8443-exec-13003 ERROR [jdbc.batch.internal.BatchingBatch] HHH000315: Exception executing batch [could not perform addBatch]
            2014-09-29 12:01:40,433 http-bio-8443-exec-12995 WARN [engine.jdbc.spi.SqlExceptionHelper] SQL Error: 1062, SQLState: 23000
            2014-09-29 12:01:40,433 http-bio-8443-exec-12995 ERROR [engine.jdbc.spi.SqlExceptionHelper] Duplicate entry 'hVtW5FElx8qNjHjM06Kw8A00' for key 'identifier_hash'
            2014-09-29 12:01:40,433 http-bio-8443-exec-12995 ERROR [jdbc.batch.internal.BatchingBatch] HHH000315: Exception executing batch [could not perform addBatch]
            2014-09-29 12:01:40,440 http-bio-8443-exec-13009 WARN [engine.jdbc.spi.SqlExceptionHelper] SQL Error: 1062, SQLState: 23000
            2014-09-29 12:01:40,441 http-bio-8443-exec-13009 ERROR [engine.jdbc.spi.SqlExceptionHelper] Duplicate entry 'hVtW5FElx8qNjHjM06Kw8A00' for key 'identifier_hash'
            2014-09-29 12:01:40,441 http-bio-8443-exec-13009 ERROR [jdbc.batch.internal.BatchingBatch] HHH000315: Exception executing batch [could not perform addBatch]
            
            2014-09-29 20:03:53,591 http-bio-8443-exec-13036 WARN [engine.jdbc.spi.SqlExceptionHelper] SQL Error: 1062, SQLState: 23000
            2014-09-29 20:03:53,591 http-bio-8443-exec-13036 ERROR [engine.jdbc.spi.SqlExceptionHelper] Duplicate entry 'hVtW5FElx8qNjHjM06Kw8A00' for key 'identifier_hash'
            2014-09-29 20:03:53,591 http-bio-8443-exec-13036 ERROR [jdbc.batch.internal.BatchingBatch] HHH000315: Exception executing batch [could not perform addBatch]
            2014-09-29 20:16:11,242 localhost-startStop-2 INFO [ContainerBase.[Catalina].[localhost].[/crowd]] Destroying Spring FrameworkServlet 'xfire'
            2014-09-29 20:16:11,250 localhost-startStop-2 INFO [ContainerBase.[Catalina].[localhost].[/crowd]] org.tuckey.web.filters.urlrewrite.UrlRewriteFilter INFO: destroy called
            2014-09-29 20:16:11,296 localhost-startStop-2 INFO [ContainerBase.[Catalina].[localhost].[/crowd]] Closing Spring root WebApplicationContext
            2014-09-29 20:16:11,702 localhost-startStop-2 INFO [com.atlassian.crowd.startup] Stopping Crowd
            

            Deleted Account (Inactive) added a comment - - edited HI Diego, I had a similar problem last night on our crowd instances when it went down completely, We have to do a complete restart of the system to resolve it, and we are running crowd 2.7.2(Version: 2.7.2 (Build:#626 - 2014-05-13). it has stopped the crowd application, So can you please let us know what to do to avoid this in future? The only thing people were doing was couple of people changed their passwords within that minute. Logs are below. 2014-09-29 08:29:21,814 http-bio-8443-exec-12971 WARN [engine.jdbc.spi.SqlExceptionHelper] SQL Error: 1062, SQLState: 23000 2014-09-29 08:29:21,814 http-bio-8443-exec-12971 ERROR [engine.jdbc.spi.SqlExceptionHelper] Duplicate entry 'KZdKRJFQnM2NUNg6kGzDhw00' for key 'identifier_hash' 2014-09-29 08:29:21,814 http-bio-8443-exec-12971 ERROR [jdbc.batch.internal.BatchingBatch] HHH000315: Exception executing batch [could not perform addBatch] 2014-09-29 12:01:40,399 http-bio-8443-exec-12990 WARN [engine.jdbc.spi.SqlExceptionHelper] SQL Error: 1062, SQLState: 23000 2014-09-29 12:01:40,400 http-bio-8443-exec-12990 ERROR [engine.jdbc.spi.SqlExceptionHelper] Duplicate entry 'hVtW5FElx8qNjHjM06Kw8A00' for key 'identifier_hash' 2014-09-29 12:01:40,400 http-bio-8443-exec-12990 ERROR [jdbc.batch.internal.BatchingBatch] HHH000315: Exception executing batch [could not perform addBatch] 2014-09-29 12:01:40,422 http-bio-8443-exec-13003 WARN [engine.jdbc.spi.SqlExceptionHelper] SQL Error: 1062, SQLState: 23000 2014-09-29 12:01:40,422 http-bio-8443-exec-13003 ERROR [engine.jdbc.spi.SqlExceptionHelper] Duplicate entry 'hVtW5FElx8qNjHjM06Kw8A00' for key 'identifier_hash' 2014-09-29 12:01:40,423 http-bio-8443-exec-13003 ERROR [jdbc.batch.internal.BatchingBatch] HHH000315: Exception executing batch [could not perform addBatch] 2014-09-29 12:01:40,433 http-bio-8443-exec-12995 WARN [engine.jdbc.spi.SqlExceptionHelper] SQL Error: 1062, SQLState: 23000 2014-09-29 12:01:40,433 http-bio-8443-exec-12995 ERROR [engine.jdbc.spi.SqlExceptionHelper] Duplicate entry 'hVtW5FElx8qNjHjM06Kw8A00' for key 'identifier_hash' 2014-09-29 12:01:40,433 http-bio-8443-exec-12995 ERROR [jdbc.batch.internal.BatchingBatch] HHH000315: Exception executing batch [could not perform addBatch] 2014-09-29 12:01:40,440 http-bio-8443-exec-13009 WARN [engine.jdbc.spi.SqlExceptionHelper] SQL Error: 1062, SQLState: 23000 2014-09-29 12:01:40,441 http-bio-8443-exec-13009 ERROR [engine.jdbc.spi.SqlExceptionHelper] Duplicate entry 'hVtW5FElx8qNjHjM06Kw8A00' for key 'identifier_hash' 2014-09-29 12:01:40,441 http-bio-8443-exec-13009 ERROR [jdbc.batch.internal.BatchingBatch] HHH000315: Exception executing batch [could not perform addBatch] 2014-09-29 20:03:53,591 http-bio-8443-exec-13036 WARN [engine.jdbc.spi.SqlExceptionHelper] SQL Error: 1062, SQLState: 23000 2014-09-29 20:03:53,591 http-bio-8443-exec-13036 ERROR [engine.jdbc.spi.SqlExceptionHelper] Duplicate entry 'hVtW5FElx8qNjHjM06Kw8A00' for key 'identifier_hash' 2014-09-29 20:03:53,591 http-bio-8443-exec-13036 ERROR [jdbc.batch.internal.BatchingBatch] HHH000315: Exception executing batch [could not perform addBatch] 2014-09-29 20:16:11,242 localhost-startStop-2 INFO [ContainerBase.[Catalina].[localhost].[/crowd]] Destroying Spring FrameworkServlet 'xfire' 2014-09-29 20:16:11,250 localhost-startStop-2 INFO [ContainerBase.[Catalina].[localhost].[/crowd]] org.tuckey.web.filters.urlrewrite.UrlRewriteFilter INFO: destroy called 2014-09-29 20:16:11,296 localhost-startStop-2 INFO [ContainerBase.[Catalina].[localhost].[/crowd]] Closing Spring root WebApplicationContext 2014-09-29 20:16:11,702 localhost-startStop-2 INFO [com.atlassian.crowd.startup] Stopping Crowd

            Hi Diego,

            OK, good to know, thank you for your answer.

            Georg Wendt added a comment - Hi Diego, OK, good to know, thank you for your answer.

            Hi dominik.hornung,

            The messages in the log indicate that Crowd is failing to insert a new token in the database. Unfortunately we haven't been able to prevent this situation completely. However, the fixes included in Crowd 2.7.2 make Crowd resilient to these failures. Crowd will detect that an error has occurred and will recover from it. There will be no interruption to the service and all transactions will complete successfully. In short: those messages are no cause for concern.

            Diego Berrueta added a comment - Hi dominik.hornung , The messages in the log indicate that Crowd is failing to insert a new token in the database. Unfortunately we haven't been able to prevent this situation completely. However, the fixes included in Crowd 2.7.2 make Crowd resilient to these failures. Crowd will detect that an error has occurred and will recover from it. There will be no interruption to the service and all transactions will complete successfully. In short: those messages are no cause for concern.

            Hello, I am encountering this problem in Crowd 2.7.2:

            2014-08-04 17:53:52,126 http-bio-8095-exec-15 WARN [engine.jdbc.spi.SqlExceptionHelper] SQL Error: 0, SQLState: 23505
            2014-08-04 17:53:52,126 http-bio-8095-exec-15 ERROR [engine.jdbc.spi.SqlExceptionHelper] Batch-Eintrag 0 insert into cwd_token (directory_id, entity_name, random_number, identifier_hash, random_hash, created_date, last_accessed_date, last_accessed_time, duration, id) values ('-1', 'confluence', '5243809081134885805', 'USST2wTeLIe8kyLtPL5LtA00', 'T6X4zl1xOXJa9j9pLXuBIw00', '2014-08-04 17:53:52.017000 +02:00:00', '2014-08-04 17:53:52.017000 +02:00:00', '1407167632017', '60', '693534') wurde abgebrochen.  Rufen Sie 'getNextException' auf, um die Ursache zu erfahren.
            2014-08-04 17:53:52,126 http-bio-8095-exec-15 WARN [engine.jdbc.spi.SqlExceptionHelper] SQL Error: 0, SQLState: 23505
            2014-08-04 17:53:52,126 http-bio-8095-exec-15 ERROR [engine.jdbc.spi.SqlExceptionHelper] FEHLER: doppelter Schlüsselwert verletzt Unique-Constraint »uk_token_id_hash«
              Detail: Schlüssel »(identifier_hash)=(USST2wTeLIe8kyLtPL5LtA00)« existiert bereits.
            2014-08-04 17:53:52,126 http-bio-8095-exec-15 ERROR [jdbc.batch.internal.BatchingBatch] HHH000315: Exception executing batch [could not perform addBatch]
            
            2014-08-06 12:52:41,323 http-bio-8095-exec-7 WARN [engine.jdbc.spi.SqlExceptionHelper] SQL Error: 0, SQLState: 23505
            2014-08-06 12:52:41,323 http-bio-8095-exec-7 ERROR [engine.jdbc.spi.SqlExceptionHelper] Batch-Eintrag 0 insert into cwd_token (directory_id, entity_name, random_number, identifier_hash, random_hash, created_date, last_accessed_date, last_accessed_time, duration, id) values ('-1', 'confluence', '1745546112336357161', 'USST2wTeLIe8kyLtPL5LtA00', 'Vc1jKzFWpuJ0xj8e077SjA00', '2014-08-06 12:52:41.307000 +02:00:00', '2014-08-06 12:52:41.307000 +02:00:00', '1407322361307', '60', '695049') wurde abgebrochen.  Rufen Sie 'getNextException' auf, um die Ursache zu erfahren.
            2014-08-06 12:52:41,323 http-bio-8095-exec-7 WARN [engine.jdbc.spi.SqlExceptionHelper] SQL Error: 0, SQLState: 23505
            2014-08-06 12:52:41,323 http-bio-8095-exec-7 ERROR [engine.jdbc.spi.SqlExceptionHelper] FEHLER: doppelter Schlüsselwert verletzt Unique-Constraint »uk_token_id_hash«
              Detail: Schlüssel »(identifier_hash)=(USST2wTeLIe8kyLtPL5LtA00)« existiert bereits.
            2014-08-06 12:52:41,323 http-bio-8095-exec-7 ERROR [jdbc.batch.internal.BatchingBatch] HHH000315: Exception executing batch [could not perform addBatch]
            

            Georg Wendt added a comment - Hello, I am encountering this problem in Crowd 2.7.2: 2014-08-04 17:53:52,126 http-bio-8095-exec-15 WARN [engine.jdbc.spi.SqlExceptionHelper] SQL Error: 0, SQLState: 23505 2014-08-04 17:53:52,126 http-bio-8095-exec-15 ERROR [engine.jdbc.spi.SqlExceptionHelper] Batch-Eintrag 0 insert into cwd_token (directory_id, entity_name, random_number, identifier_hash, random_hash, created_date, last_accessed_date, last_accessed_time, duration, id) values ('-1', 'confluence', '5243809081134885805', 'USST2wTeLIe8kyLtPL5LtA00', 'T6X4zl1xOXJa9j9pLXuBIw00', '2014-08-04 17:53:52.017000 +02:00:00', '2014-08-04 17:53:52.017000 +02:00:00', '1407167632017', '60', '693534') wurde abgebrochen. Rufen Sie 'getNextException' auf, um die Ursache zu erfahren. 2014-08-04 17:53:52,126 http-bio-8095-exec-15 WARN [engine.jdbc.spi.SqlExceptionHelper] SQL Error: 0, SQLState: 23505 2014-08-04 17:53:52,126 http-bio-8095-exec-15 ERROR [engine.jdbc.spi.SqlExceptionHelper] FEHLER: doppelter Schlüsselwert verletzt Unique-Constraint »uk_token_id_hash« Detail: Schlüssel »(identifier_hash)=(USST2wTeLIe8kyLtPL5LtA00)« existiert bereits. 2014-08-04 17:53:52,126 http-bio-8095-exec-15 ERROR [jdbc.batch.internal.BatchingBatch] HHH000315: Exception executing batch [could not perform addBatch] 2014-08-06 12:52:41,323 http-bio-8095-exec-7 WARN [engine.jdbc.spi.SqlExceptionHelper] SQL Error: 0, SQLState: 23505 2014-08-06 12:52:41,323 http-bio-8095-exec-7 ERROR [engine.jdbc.spi.SqlExceptionHelper] Batch-Eintrag 0 insert into cwd_token (directory_id, entity_name, random_number, identifier_hash, random_hash, created_date, last_accessed_date, last_accessed_time, duration, id) values ('-1', 'confluence', '1745546112336357161', 'USST2wTeLIe8kyLtPL5LtA00', 'Vc1jKzFWpuJ0xj8e077SjA00', '2014-08-06 12:52:41.307000 +02:00:00', '2014-08-06 12:52:41.307000 +02:00:00', '1407322361307', '60', '695049') wurde abgebrochen. Rufen Sie 'getNextException' auf, um die Ursache zu erfahren. 2014-08-06 12:52:41,323 http-bio-8095-exec-7 WARN [engine.jdbc.spi.SqlExceptionHelper] SQL Error: 0, SQLState: 23505 2014-08-06 12:52:41,323 http-bio-8095-exec-7 ERROR [engine.jdbc.spi.SqlExceptionHelper] FEHLER: doppelter Schlüsselwert verletzt Unique-Constraint »uk_token_id_hash« Detail: Schlüssel »(identifier_hash)=(USST2wTeLIe8kyLtPL5LtA00)« existiert bereits. 2014-08-06 12:52:41,323 http-bio-8095-exec-7 ERROR [jdbc.batch.internal.BatchingBatch] HHH000315: Exception executing batch [could not perform addBatch]

              dberrueta Diego Berrueta
              rmassaioli Robert Massaioli (Atlassian)
              Affected customers:
              0 This affects my team
              Watchers:
              11 Start watching this issue

                Created:
                Updated:
                Resolved: