[jira] [Commented] (AMQ-7452) java.lang.IllegalStateException: Timer already cancelled.

2020-12-02 Thread Maciej Miklas (Jira)


[ 
https://issues.apache.org/jira/browse/AMQ-7452?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17242330#comment-17242330
 ] 

Maciej Miklas commented on AMQ-7452:


How could I disable it?

> java.lang.IllegalStateException: Timer already cancelled.
> -
>
> Key: AMQ-7452
> URL: https://issues.apache.org/jira/browse/AMQ-7452
> Project: ActiveMQ
>  Issue Type: Bug
>  Components: Broker
>Affects Versions: 5.15.3
>Reporter: wangxiaoqing
>Assignee: Jean-Baptiste Onofré
>Priority: Blocker
> Attachments: activemq.xml, docker-mq.yaml
>
>
> 2020-03-24 12:54:47,990 | ERROR | Could not accept connection from 
> tcp://10.0.1.5:41212 : {} | org.apache.activemq.broker.TransportConnector | 
> ActiveMQ BrokerService[localhost] Task-174422020-03-24 12:54:47,990 | ERROR | 
> Could not accept connection from tcp://10.0.1.5:41212 : {} | 
> org.apache.activemq.broker.TransportConnector | ActiveMQ 
> BrokerService[localhost] Task-17442java.lang.IllegalStateException: Timer 
> already cancelled. at java.util.Timer.sched(Timer.java:397)[:1.8.0_191] at 
> java.util.Timer.schedule(Timer.java:193)[:1.8.0_191] at 
> org.apache.activemq.transport.AbstractInactivityMonitor.startConnectCheckTask(AbstractInactivityMonitor.java:425)[activemq-client-5.15.3.jar:5.15.3]
>  at 
> org.apache.activemq.transport.AbstractInactivityMonitor.startConnectCheckTask(AbstractInactivityMonitor.java:400)[activemq-client-5.15.3.jar:5.15.3]
>  at 
> org.apache.activemq.transport.InactivityMonitor.start(InactivityMonitor.java:50)[activemq-client-5.15.3.jar:5.15.3]
>  at 
> org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:64)[activemq-client-5.15.3.jar:5.15.3]
>  at 
> org.apache.activemq.transport.WireFormatNegotiator.start(WireFormatNegotiator.java:72)[activemq-client-5.15.3.jar:5.15.3]
>  at 
> org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:64)[activemq-client-5.15.3.jar:5.15.3]
>  at 
> org.apache.activemq.broker.TransportConnection.start(TransportConnection.java:1066)[activemq-broker-5.15.3.jar:5.15.3]
>  at 
> org.apache.activemq.broker.TransportConnector$1$1.run(TransportConnector.java:218)[activemq-broker-5.15.3.jar:5.15.3]
>  at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)[:1.8.0_191]
>  at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)[:1.8.0_191]
>  at java.lang.Thread.run(Thread.java:748)[:1.8.0_191]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (AMQ-7452) java.lang.IllegalStateException: Timer already cancelled.

2020-12-02 Thread Maciej Miklas (Jira)


[ 
https://issues.apache.org/jira/browse/AMQ-7452?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17242312#comment-17242312
 ] 

Maciej Miklas commented on AMQ-7452:


I've never tried it, I not sure what side effect it would have..

> java.lang.IllegalStateException: Timer already cancelled.
> -
>
> Key: AMQ-7452
> URL: https://issues.apache.org/jira/browse/AMQ-7452
> Project: ActiveMQ
>  Issue Type: Bug
>  Components: Broker
>Affects Versions: 5.15.3
>Reporter: wangxiaoqing
>Assignee: Jean-Baptiste Onofré
>Priority: Blocker
> Attachments: activemq.xml, docker-mq.yaml
>
>
> 2020-03-24 12:54:47,990 | ERROR | Could not accept connection from 
> tcp://10.0.1.5:41212 : {} | org.apache.activemq.broker.TransportConnector | 
> ActiveMQ BrokerService[localhost] Task-174422020-03-24 12:54:47,990 | ERROR | 
> Could not accept connection from tcp://10.0.1.5:41212 : {} | 
> org.apache.activemq.broker.TransportConnector | ActiveMQ 
> BrokerService[localhost] Task-17442java.lang.IllegalStateException: Timer 
> already cancelled. at java.util.Timer.sched(Timer.java:397)[:1.8.0_191] at 
> java.util.Timer.schedule(Timer.java:193)[:1.8.0_191] at 
> org.apache.activemq.transport.AbstractInactivityMonitor.startConnectCheckTask(AbstractInactivityMonitor.java:425)[activemq-client-5.15.3.jar:5.15.3]
>  at 
> org.apache.activemq.transport.AbstractInactivityMonitor.startConnectCheckTask(AbstractInactivityMonitor.java:400)[activemq-client-5.15.3.jar:5.15.3]
>  at 
> org.apache.activemq.transport.InactivityMonitor.start(InactivityMonitor.java:50)[activemq-client-5.15.3.jar:5.15.3]
>  at 
> org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:64)[activemq-client-5.15.3.jar:5.15.3]
>  at 
> org.apache.activemq.transport.WireFormatNegotiator.start(WireFormatNegotiator.java:72)[activemq-client-5.15.3.jar:5.15.3]
>  at 
> org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:64)[activemq-client-5.15.3.jar:5.15.3]
>  at 
> org.apache.activemq.broker.TransportConnection.start(TransportConnection.java:1066)[activemq-broker-5.15.3.jar:5.15.3]
>  at 
> org.apache.activemq.broker.TransportConnector$1$1.run(TransportConnector.java:218)[activemq-broker-5.15.3.jar:5.15.3]
>  at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)[:1.8.0_191]
>  at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)[:1.8.0_191]
>  at java.lang.Thread.run(Thread.java:748)[:1.8.0_191]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (AMQ-7452) java.lang.IllegalStateException: Timer already cancelled.

2020-12-02 Thread Maciej Miklas (Jira)


[ 
https://issues.apache.org/jira/browse/AMQ-7452?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17242256#comment-17242256
 ] 

Maciej Miklas commented on AMQ-7452:


In my case yes

> java.lang.IllegalStateException: Timer already cancelled.
> -
>
> Key: AMQ-7452
> URL: https://issues.apache.org/jira/browse/AMQ-7452
> Project: ActiveMQ
>  Issue Type: Bug
>  Components: Broker
>Affects Versions: 5.15.3
>Reporter: wangxiaoqing
>Assignee: Jean-Baptiste Onofré
>Priority: Blocker
> Attachments: activemq.xml, docker-mq.yaml
>
>
> 2020-03-24 12:54:47,990 | ERROR | Could not accept connection from 
> tcp://10.0.1.5:41212 : {} | org.apache.activemq.broker.TransportConnector | 
> ActiveMQ BrokerService[localhost] Task-174422020-03-24 12:54:47,990 | ERROR | 
> Could not accept connection from tcp://10.0.1.5:41212 : {} | 
> org.apache.activemq.broker.TransportConnector | ActiveMQ 
> BrokerService[localhost] Task-17442java.lang.IllegalStateException: Timer 
> already cancelled. at java.util.Timer.sched(Timer.java:397)[:1.8.0_191] at 
> java.util.Timer.schedule(Timer.java:193)[:1.8.0_191] at 
> org.apache.activemq.transport.AbstractInactivityMonitor.startConnectCheckTask(AbstractInactivityMonitor.java:425)[activemq-client-5.15.3.jar:5.15.3]
>  at 
> org.apache.activemq.transport.AbstractInactivityMonitor.startConnectCheckTask(AbstractInactivityMonitor.java:400)[activemq-client-5.15.3.jar:5.15.3]
>  at 
> org.apache.activemq.transport.InactivityMonitor.start(InactivityMonitor.java:50)[activemq-client-5.15.3.jar:5.15.3]
>  at 
> org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:64)[activemq-client-5.15.3.jar:5.15.3]
>  at 
> org.apache.activemq.transport.WireFormatNegotiator.start(WireFormatNegotiator.java:72)[activemq-client-5.15.3.jar:5.15.3]
>  at 
> org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:64)[activemq-client-5.15.3.jar:5.15.3]
>  at 
> org.apache.activemq.broker.TransportConnection.start(TransportConnection.java:1066)[activemq-broker-5.15.3.jar:5.15.3]
>  at 
> org.apache.activemq.broker.TransportConnector$1$1.run(TransportConnector.java:218)[activemq-broker-5.15.3.jar:5.15.3]
>  at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)[:1.8.0_191]
>  at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)[:1.8.0_191]
>  at java.lang.Thread.run(Thread.java:748)[:1.8.0_191]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (AMQ-7452) java.lang.IllegalStateException: Timer already cancelled.

2020-09-24 Thread Maciej Miklas (Jira)


[ 
https://issues.apache.org/jira/browse/AMQ-7452?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17201471#comment-17201471
 ] 

Maciej Miklas commented on AMQ-7452:


I'm on 5.16.0 and getting it also sometimes - on client and on ActiveMQ as well.

{code}
Caused by: java.lang.IllegalStateException: Timer already cancelled.
at java.util.Timer.sched(Timer.java:397)
at java.util.Timer.schedule(Timer.java:248)
at 
org.apache.activemq.thread.Scheduler.executePeriodically(Scheduler.java:49)
at org.apache.activemq.broker.region.Topic.start(Topic.java:621)
at 
org.apache.activemq.broker.region.DestinationFilter.start(DestinationFilter.java:143)
at 
org.apache.activemq.broker.region.AbstractRegion.addDestination(AbstractRegion.java:161)
at 
org.apache.activemq.broker.region.RegionBroker.addDestination(RegionBroker.java:339)
at 
org.apache.activemq.broker.BrokerFilter.addDestination(BrokerFilter.java:174)
at 
org.apache.activemq.advisory.AdvisoryBroker.addDestination(AdvisoryBroker.java:244)
{code}

> java.lang.IllegalStateException: Timer already cancelled.
> -
>
> Key: AMQ-7452
> URL: https://issues.apache.org/jira/browse/AMQ-7452
> Project: ActiveMQ
>  Issue Type: Bug
>  Components: Broker
>Affects Versions: 5.15.3
>Reporter: wangxiaoqing
>Priority: Blocker
> Attachments: activemq.xml, docker-mq.yaml
>
>
> 2020-03-24 12:54:47,990 | ERROR | Could not accept connection from 
> tcp://10.0.1.5:41212 : {} | org.apache.activemq.broker.TransportConnector | 
> ActiveMQ BrokerService[localhost] Task-174422020-03-24 12:54:47,990 | ERROR | 
> Could not accept connection from tcp://10.0.1.5:41212 : {} | 
> org.apache.activemq.broker.TransportConnector | ActiveMQ 
> BrokerService[localhost] Task-17442java.lang.IllegalStateException: Timer 
> already cancelled. at java.util.Timer.sched(Timer.java:397)[:1.8.0_191] at 
> java.util.Timer.schedule(Timer.java:193)[:1.8.0_191] at 
> org.apache.activemq.transport.AbstractInactivityMonitor.startConnectCheckTask(AbstractInactivityMonitor.java:425)[activemq-client-5.15.3.jar:5.15.3]
>  at 
> org.apache.activemq.transport.AbstractInactivityMonitor.startConnectCheckTask(AbstractInactivityMonitor.java:400)[activemq-client-5.15.3.jar:5.15.3]
>  at 
> org.apache.activemq.transport.InactivityMonitor.start(InactivityMonitor.java:50)[activemq-client-5.15.3.jar:5.15.3]
>  at 
> org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:64)[activemq-client-5.15.3.jar:5.15.3]
>  at 
> org.apache.activemq.transport.WireFormatNegotiator.start(WireFormatNegotiator.java:72)[activemq-client-5.15.3.jar:5.15.3]
>  at 
> org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:64)[activemq-client-5.15.3.jar:5.15.3]
>  at 
> org.apache.activemq.broker.TransportConnection.start(TransportConnection.java:1066)[activemq-broker-5.15.3.jar:5.15.3]
>  at 
> org.apache.activemq.broker.TransportConnector$1$1.run(TransportConnector.java:218)[activemq-broker-5.15.3.jar:5.15.3]
>  at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)[:1.8.0_191]
>  at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)[:1.8.0_191]
>  at java.lang.Thread.run(Thread.java:748)[:1.8.0_191]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Closed] (AMQ-6911) Constraint violation on failover (Postgresql)

2018-03-08 Thread Maciej Miklas (JIRA)

 [ 
https://issues.apache.org/jira/browse/AMQ-6911?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Maciej Miklas closed AMQ-6911.
--
Resolution: Not A Bug

Out JDBC configuration was incorrect - autocommit was set to false, and in 
result messages were propagated in DB with delay.

> Constraint violation on failover (Postgresql)
> -
>
> Key: AMQ-6911
> URL: https://issues.apache.org/jira/browse/AMQ-6911
> Project: ActiveMQ
>  Issue Type: Bug
>  Components: JDBC
>Affects Versions: 5.15.2
>Reporter: Maciej Miklas
>Priority: Major
>
> We have ActiveMq 5.15.2 in following configuration:
>  * PostgreSQL for persistance
>  * two nodes, one in standby
>  * JDBC master slave with shared database
>  * static cluster discovery
> Everything seams to be fine, failover works as expected, but sometimes during 
> failover we are observing following exception:
> {code:java}
>  28.02.2018 09:28:54,207 WARN  [ActiveMQ NIO Worker 6] 
> org.apache.activemq.transaction.LocalTransaction  - Store COMMIT 
> FAILED:java.io.IOException: Batch entry 2 INSERT INTO ACTIVEMQ_MSGS(ID, 
> MSGID_PROD, MSGID_SEQ, CONTAINER, EXPIRATION, PRIORITY, MSG, XID) VALUES 
> (7095330, 'xxx-1-1519303952070-3:862:8:1', 15, 'queue://abc', 1520411334073, 
> 4, ?, NULL) was aborted: FEHLER: doppelter Schl▒sselwert verletzt 
> Unique-Constraint ▒activemq_msgs_pkey▒  Detail: Schl▒ssel ▒(id)=(7095330)▒ 
> existiert bereits.  Call getNextException to see other errors in the batch.   
>  at 
> org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:46)
>     at 
> org.apache.activemq.store.jdbc.TransactionContext.commit(TransactionContext.java:209)
>     at 
> org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.commitTransaction(JDBCPersistenceAdapter.java:516)
>     at 
> org.apache.activemq.store.memory.MemoryTransactionStore$Tx.commit(MemoryTransactionStore.java:113)
>     at 
> org.apache.activemq.store.memory.MemoryTransactionStore.commit(MemoryTransactionStore.java:270){code}
> ActiveMQ propagates this exception directly to the client.
> I am assuming, that due to a failover some clients did not get acknowledgment 
> and message has been resent to a new node.
> If I am correct ActiveMq should just ignore duplicated message, or both 
> messages should be stored in database. But latest it's not possible, because  
> ACTIVEMQ_MSGS#ID is a PK
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (AMQ-6911) Constraint violation on failover (Postgresql)

2018-03-07 Thread Maciej Miklas (JIRA)

 [ 
https://issues.apache.org/jira/browse/AMQ-6911?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Maciej Miklas updated AMQ-6911:
---
Description: 
We have ActiveMq 5.15.2 in following configuration:
 * PostgreSQL for persistance
 * two nodes, one in standby
 * JDBC master slave with shared database
 * static cluster discovery

Everything seams to be fine, failover works as expected, but sometimes during 
failover we are observing following exception:
{code:java}
 28.02.2018 09:28:54,207 WARN  [ActiveMQ NIO Worker 6] 
org.apache.activemq.transaction.LocalTransaction  - Store COMMIT 
FAILED:java.io.IOException: Batch entry 2 INSERT INTO ACTIVEMQ_MSGS(ID, 
MSGID_PROD, MSGID_SEQ, CONTAINER, EXPIRATION, PRIORITY, MSG, XID) VALUES 
(7095330, 'xxx-1-1519303952070-3:862:8:1', 15, 'queue://abc', 1520411334073, 4, 
?, NULL) was aborted: FEHLER: doppelter Schl▒sselwert verletzt 
Unique-Constraint ▒activemq_msgs_pkey▒  Detail: Schl▒ssel ▒(id)=(7095330)▒ 
existiert bereits.  Call getNextException to see other errors in the batch. 
   at 
org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:46)  
      at 
org.apache.activemq.store.jdbc.TransactionContext.commit(TransactionContext.java:209)
    at 
org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.commitTransaction(JDBCPersistenceAdapter.java:516)
    at 
org.apache.activemq.store.memory.MemoryTransactionStore$Tx.commit(MemoryTransactionStore.java:113)
    at 
org.apache.activemq.store.memory.MemoryTransactionStore.commit(MemoryTransactionStore.java:270){code}
ActiveMQ propagates this exception directly to the client.

I am assuming, that due to a failover some clients did not get acknowledgment 
and message has been resent to a new node.

If I am correct ActiveMq should just ignore duplicated message, or both 
messages should be stored in database. But latest it's not possible, because  
ACTIVEMQ_MSGS#ID is a PK

 

  was:
We have ActiveMq 5.15.2 in following configuration:
 * PostgreSQL for persistance
 * two Nodes, one in Standby
 * JDBC Master Slave with shared Database
 * static cluster discovery

Everything seams to be fine, failover works as expected, but sometimes during 
failover we are observing following exception:
{code:java}
 28.02.2018 09:28:54,207 WARN  [ActiveMQ NIO Worker 6] 
org.apache.activemq.transaction.LocalTransaction  - Store COMMIT 
FAILED:java.io.IOException: Batch entry 2 INSERT INTO ACTIVEMQ_MSGS(ID, 
MSGID_PROD, MSGID_SEQ, CONTAINER, EXPIRATION, PRIORITY, MSG, XID) VALUES 
(7095330, 'xxx-1-1519303952070-3:862:8:1', 15, 'queue://abc', 1520411334073, 4, 
?, NULL) was aborted: FEHLER: doppelter Schl▒sselwert verletzt 
Unique-Constraint ▒activemq_msgs_pkey▒  Detail: Schl▒ssel ▒(id)=(7095330)▒ 
existiert bereits.  Call getNextException to see other errors in the batch. 
   at 
org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:46)  
      at 
org.apache.activemq.store.jdbc.TransactionContext.commit(TransactionContext.java:209)
    at 
org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.commitTransaction(JDBCPersistenceAdapter.java:516)
    at 
org.apache.activemq.store.memory.MemoryTransactionStore$Tx.commit(MemoryTransactionStore.java:113)
    at 
org.apache.activemq.store.memory.MemoryTransactionStore.commit(MemoryTransactionStore.java:270){code}
ActiveMQ propagates this exception directly to the client.

I am assuming, that due to a failover some clients did not get acknowledgment 
and message has been resent to a new node.

If I am correct ActiveMq should just ignore duplicated message, or both 
messages should be stored in database. But latest it's not possible, because  
ACTIVEMQ_MSGS#ID is a PK

 


> Constraint violation on failover (Postgresql)
> -
>
> Key: AMQ-6911
> URL: https://issues.apache.org/jira/browse/AMQ-6911
> Project: ActiveMQ
>  Issue Type: Bug
>  Components: JDBC
>Affects Versions: 5.15.2
>Reporter: Maciej Miklas
>Priority: Major
>
> We have ActiveMq 5.15.2 in following configuration:
>  * PostgreSQL for persistance
>  * two nodes, one in standby
>  * JDBC master slave with shared database
>  * static cluster discovery
> Everything seams to be fine, failover works as expected, but sometimes during 
> failover we are observing following exception:
> {code:java}
>  28.02.2018 09:28:54,207 WARN  [ActiveMQ NIO Worker 6] 
> org.apache.activemq.transaction.LocalTransaction  - Store COMMIT 
> FAILED:java.io.IOException: Batch entry 2 INSERT INTO ACTIVEMQ_MSGS(ID, 
> MSGID_PROD, MSGID_SEQ, CONTAINER, EXPIRATION, PRIORITY, MSG, XID) VALUES 
> (7095330, 'xxx-1-1519303952070-3:862:8:1', 15, 'queue://abc', 1520411334073, 
> 4, ?, NULL) was aborted: FEHLER: doppelter Schl▒sselwert verletzt 
> Unique-Constraint ▒activemq_msgs_pkey▒  Detail: Schl▒ssel 

[jira] [Updated] (AMQ-6911) Constraint violation on failover (Postgresql)

2018-03-07 Thread Maciej Miklas (JIRA)

 [ 
https://issues.apache.org/jira/browse/AMQ-6911?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Maciej Miklas updated AMQ-6911:
---
Affects Version/s: (was: 5.15.3)
   5.15.2

> Constraint violation on failover (Postgresql)
> -
>
> Key: AMQ-6911
> URL: https://issues.apache.org/jira/browse/AMQ-6911
> Project: ActiveMQ
>  Issue Type: Bug
>  Components: JDBC
>Affects Versions: 5.15.2
>Reporter: Maciej Miklas
>Priority: Major
>
> We have ActiveMq 5.15.2 in following configuration:
>  * PostgreSQL for persistance
>  * two Nodes, one in Standby
>  * JDBC Master Slave with shared Database
>  * static cluster discovery
> Everything seams to be fine, failover works as expected, but sometimes during 
> failover we are observing following exception:
> {code:java}
>  28.02.2018 09:28:54,207 WARN  [ActiveMQ NIO Worker 6] 
> org.apache.activemq.transaction.LocalTransaction  - Store COMMIT 
> FAILED:java.io.IOException: Batch entry 2 INSERT INTO ACTIVEMQ_MSGS(ID, 
> MSGID_PROD, MSGID_SEQ, CONTAINER, EXPIRATION, PRIORITY, MSG, XID) VALUES 
> (7095330, 'xxx-1-1519303952070-3:862:8:1', 15, 'queue://abc', 1520411334073, 
> 4, ?, NULL) was aborted: FEHLER: doppelter Schl▒sselwert verletzt 
> Unique-Constraint ▒activemq_msgs_pkey▒  Detail: Schl▒ssel ▒(id)=(7095330)▒ 
> existiert bereits.  Call getNextException to see other errors in the batch.   
>  at 
> org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:46)
>     at 
> org.apache.activemq.store.jdbc.TransactionContext.commit(TransactionContext.java:209)
>     at 
> org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.commitTransaction(JDBCPersistenceAdapter.java:516)
>     at 
> org.apache.activemq.store.memory.MemoryTransactionStore$Tx.commit(MemoryTransactionStore.java:113)
>     at 
> org.apache.activemq.store.memory.MemoryTransactionStore.commit(MemoryTransactionStore.java:270){code}
> ActiveMQ propagates this exception directly to the client.
> I am assuming, that due to a failover some clients did not get acknowledgment 
> and message has been resent to a new node.
> If I am correct ActiveMq should just ignore duplicated message, or both 
> messages should be stored in database. But latest it's not possible, because  
> ACTIVEMQ_MSGS#ID is a PK
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (AMQ-6911) Constraint violation on failover (Postgresql)

2018-03-07 Thread Maciej Miklas (JIRA)

[ 
https://issues.apache.org/jira/browse/AMQ-6911?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16389741#comment-16389741
 ] 

Maciej Miklas commented on AMQ-6911:


sorry - that was typo - we have 5.15.2

> Constraint violation on failover (Postgresql)
> -
>
> Key: AMQ-6911
> URL: https://issues.apache.org/jira/browse/AMQ-6911
> Project: ActiveMQ
>  Issue Type: Bug
>  Components: JDBC
>Affects Versions: 5.15.3
>Reporter: Maciej Miklas
>Priority: Major
>
> We have ActiveMq 5.12 in following configuration:
>  * PostgreSQL for persistance
>  * two Nodes, one in Standby
>  * JDBC Master Slave with shared Database
>  * static cluster discovery
> Everything seams to be fine, failover works as expected, but sometimes during 
> failover we are observing following exception:
> {code:java}
>  28.02.2018 09:28:54,207 WARN  [ActiveMQ NIO Worker 6] 
> org.apache.activemq.transaction.LocalTransaction  - Store COMMIT 
> FAILED:java.io.IOException: Batch entry 2 INSERT INTO ACTIVEMQ_MSGS(ID, 
> MSGID_PROD, MSGID_SEQ, CONTAINER, EXPIRATION, PRIORITY, MSG, XID) VALUES 
> (7095330, 'xxx-1-1519303952070-3:862:8:1', 15, 'queue://abc', 1520411334073, 
> 4, ?, NULL) was aborted: FEHLER: doppelter Schl▒sselwert verletzt 
> Unique-Constraint ▒activemq_msgs_pkey▒  Detail: Schl▒ssel ▒(id)=(7095330)▒ 
> existiert bereits.  Call getNextException to see other errors in the batch.   
>  at 
> org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:46)
>     at 
> org.apache.activemq.store.jdbc.TransactionContext.commit(TransactionContext.java:209)
>     at 
> org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.commitTransaction(JDBCPersistenceAdapter.java:516)
>     at 
> org.apache.activemq.store.memory.MemoryTransactionStore$Tx.commit(MemoryTransactionStore.java:113)
>     at 
> org.apache.activemq.store.memory.MemoryTransactionStore.commit(MemoryTransactionStore.java:270){code}
> ActiveMQ propagates this exception directly to the client.
> I am assuming, that due to a failover some clients did not get acknowledgment 
> and message has been resent to a new node.
> If I am correct ActiveMq should just ignore duplicated message, or both 
> messages should be stored in database. But latest it's not possible, because  
> ACTIVEMQ_MSGS#ID is a PK
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (AMQ-6911) Constraint violation on failover (Postgresql)

2018-03-07 Thread Maciej Miklas (JIRA)

 [ 
https://issues.apache.org/jira/browse/AMQ-6911?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Maciej Miklas updated AMQ-6911:
---
Description: 
We have ActiveMq 5.15.2 in following configuration:
 * PostgreSQL for persistance
 * two Nodes, one in Standby
 * JDBC Master Slave with shared Database
 * static cluster discovery

Everything seams to be fine, failover works as expected, but sometimes during 
failover we are observing following exception:
{code:java}
 28.02.2018 09:28:54,207 WARN  [ActiveMQ NIO Worker 6] 
org.apache.activemq.transaction.LocalTransaction  - Store COMMIT 
FAILED:java.io.IOException: Batch entry 2 INSERT INTO ACTIVEMQ_MSGS(ID, 
MSGID_PROD, MSGID_SEQ, CONTAINER, EXPIRATION, PRIORITY, MSG, XID) VALUES 
(7095330, 'xxx-1-1519303952070-3:862:8:1', 15, 'queue://abc', 1520411334073, 4, 
?, NULL) was aborted: FEHLER: doppelter Schl▒sselwert verletzt 
Unique-Constraint ▒activemq_msgs_pkey▒  Detail: Schl▒ssel ▒(id)=(7095330)▒ 
existiert bereits.  Call getNextException to see other errors in the batch. 
   at 
org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:46)  
      at 
org.apache.activemq.store.jdbc.TransactionContext.commit(TransactionContext.java:209)
    at 
org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.commitTransaction(JDBCPersistenceAdapter.java:516)
    at 
org.apache.activemq.store.memory.MemoryTransactionStore$Tx.commit(MemoryTransactionStore.java:113)
    at 
org.apache.activemq.store.memory.MemoryTransactionStore.commit(MemoryTransactionStore.java:270){code}
ActiveMQ propagates this exception directly to the client.

I am assuming, that due to a failover some clients did not get acknowledgment 
and message has been resent to a new node.

If I am correct ActiveMq should just ignore duplicated message, or both 
messages should be stored in database. But latest it's not possible, because  
ACTIVEMQ_MSGS#ID is a PK

 

  was:
We have ActiveMq 5.12 in following configuration:
 * PostgreSQL for persistance
 * two Nodes, one in Standby
 * JDBC Master Slave with shared Database
 * static cluster discovery

Everything seams to be fine, failover works as expected, but sometimes during 
failover we are observing following exception:
{code:java}
 28.02.2018 09:28:54,207 WARN  [ActiveMQ NIO Worker 6] 
org.apache.activemq.transaction.LocalTransaction  - Store COMMIT 
FAILED:java.io.IOException: Batch entry 2 INSERT INTO ACTIVEMQ_MSGS(ID, 
MSGID_PROD, MSGID_SEQ, CONTAINER, EXPIRATION, PRIORITY, MSG, XID) VALUES 
(7095330, 'xxx-1-1519303952070-3:862:8:1', 15, 'queue://abc', 1520411334073, 4, 
?, NULL) was aborted: FEHLER: doppelter Schl▒sselwert verletzt 
Unique-Constraint ▒activemq_msgs_pkey▒  Detail: Schl▒ssel ▒(id)=(7095330)▒ 
existiert bereits.  Call getNextException to see other errors in the batch. 
   at 
org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:46)  
      at 
org.apache.activemq.store.jdbc.TransactionContext.commit(TransactionContext.java:209)
    at 
org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.commitTransaction(JDBCPersistenceAdapter.java:516)
    at 
org.apache.activemq.store.memory.MemoryTransactionStore$Tx.commit(MemoryTransactionStore.java:113)
    at 
org.apache.activemq.store.memory.MemoryTransactionStore.commit(MemoryTransactionStore.java:270){code}
ActiveMQ propagates this exception directly to the client.

I am assuming, that due to a failover some clients did not get acknowledgment 
and message has been resent to a new node.

If I am correct ActiveMq should just ignore duplicated message, or both 
messages should be stored in database. But latest it's not possible, because  
ACTIVEMQ_MSGS#ID is a PK

 


> Constraint violation on failover (Postgresql)
> -
>
> Key: AMQ-6911
> URL: https://issues.apache.org/jira/browse/AMQ-6911
> Project: ActiveMQ
>  Issue Type: Bug
>  Components: JDBC
>Affects Versions: 5.15.3
>Reporter: Maciej Miklas
>Priority: Major
>
> We have ActiveMq 5.15.2 in following configuration:
>  * PostgreSQL for persistance
>  * two Nodes, one in Standby
>  * JDBC Master Slave with shared Database
>  * static cluster discovery
> Everything seams to be fine, failover works as expected, but sometimes during 
> failover we are observing following exception:
> {code:java}
>  28.02.2018 09:28:54,207 WARN  [ActiveMQ NIO Worker 6] 
> org.apache.activemq.transaction.LocalTransaction  - Store COMMIT 
> FAILED:java.io.IOException: Batch entry 2 INSERT INTO ACTIVEMQ_MSGS(ID, 
> MSGID_PROD, MSGID_SEQ, CONTAINER, EXPIRATION, PRIORITY, MSG, XID) VALUES 
> (7095330, 'xxx-1-1519303952070-3:862:8:1', 15, 'queue://abc', 1520411334073, 
> 4, ?, NULL) was aborted: FEHLER: doppelter Schl▒sselwert verletzt 
> Unique-Constraint ▒activemq_msgs_pkey▒  Detail: Schl▒ssel ▒(id)=(7095330)▒ 

[jira] [Created] (AMQ-6911) Constraint violation on failover (Postgresql)

2018-03-07 Thread Maciej Miklas (JIRA)
Maciej Miklas created AMQ-6911:
--

 Summary: Constraint violation on failover (Postgresql)
 Key: AMQ-6911
 URL: https://issues.apache.org/jira/browse/AMQ-6911
 Project: ActiveMQ
  Issue Type: Bug
  Components: JDBC
Affects Versions: 5.15.3
Reporter: Maciej Miklas


We have ActiveMq 5.12 in following configuration:
 * PostgreSQL for persistance
 * two Nodes, one in Standby
 * JDBC Master Slave with shared Database
 * static cluster discovery

Everything seams to be fine, failover works as expected, but sometimes during 
failover we are observing following exception:
{code:java}
 28.02.2018 09:28:54,207 WARN  [ActiveMQ NIO Worker 6] 
org.apache.activemq.transaction.LocalTransaction  - Store COMMIT 
FAILED:java.io.IOException: Batch entry 2 INSERT INTO ACTIVEMQ_MSGS(ID, 
MSGID_PROD, MSGID_SEQ, CONTAINER, EXPIRATION, PRIORITY, MSG, XID) VALUES 
(7095330, 'xxx-1-1519303952070-3:862:8:1', 15, 'queue://abc', 1520411334073, 4, 
?, NULL) was aborted: FEHLER: doppelter Schl▒sselwert verletzt 
Unique-Constraint ▒activemq_msgs_pkey▒  Detail: Schl▒ssel ▒(id)=(7095330)▒ 
existiert bereits.  Call getNextException to see other errors in the batch. 
   at 
org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:46)  
      at 
org.apache.activemq.store.jdbc.TransactionContext.commit(TransactionContext.java:209)
    at 
org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.commitTransaction(JDBCPersistenceAdapter.java:516)
    at 
org.apache.activemq.store.memory.MemoryTransactionStore$Tx.commit(MemoryTransactionStore.java:113)
    at 
org.apache.activemq.store.memory.MemoryTransactionStore.commit(MemoryTransactionStore.java:270){code}
ActiveMQ propagates this exception directly to the client.

I am assuming, that due to a failover some clients did not get acknowledgment 
and message has been resent to a new node.

If I am correct ActiveMq should just ignore duplicated message, or both 
messages should be stored in database. But latest it's not possible, because  
ACTIVEMQ_MSGS#ID is a PK

 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)