[jira] [Created] (QPID-6997) [Java Broker, BDBStore] HA JE Transaction commit might end up in NullPointerException when commit is invoked when majority is lost

2016-01-14 Thread Alex Rudyy (JIRA)
Alex Rudyy created QPID-6997:


 Summary: [Java Broker, BDBStore] HA JE Transaction commit might 
end up in NullPointerException when commit is invoked when majority is lost
 Key: QPID-6997
 URL: https://issues.apache.org/jira/browse/QPID-6997
 Project: Qpid
  Issue Type: Bug
  Components: Java Broker
Affects Versions: qpid-java-6.0
Reporter: Alex Rudyy


On running some tests for BDB HA  with default settings 
(ReplicaAckPolicy=SIMPLE_MAJORITY) involving publishing messages in parallel 
from multiple connections and disconnecting replica nodes in the middle of 
publishing transactions, in some rare circumstances the publishing transaction 
JE commit failed with NPE thrown from JE code as below:
{noformat}

#
# Unhandled Exception java.lang.NullPointerException in Thread 
IO-/127.0.0.1:35408
#
# Exiting
#

java.lang.NullPointerException
 at com.sleepycat.je.rep.stream.FeederTxns.awaitReplicaAcks(FeederTxns.java:130)
 at com.sleepycat.je.rep.impl.RepImpl.postLogCommitHook(RepImpl.java:1130)
 at com.sleepycat.je.rep.txn.MasterTxn.postLogCommitHook(MasterTxn.java:191)
 at com.sleepycat.je.txn.Txn.commit(Txn.java:756)
 at com.sleepycat.je.Transaction.doCommit(Transaction.java:609)
 at com.sleepycat.je.Transaction.commit(Transaction.java:410)
 at 
org.apache.qpid.server.store.berkeleydb.replication.ReplicatedEnvironmentFacade.commitAsync(ReplicatedEnvironmentFacade.java:302)
 at 
org.apache.qpid.server.store.berkeleydb.AbstractBDBMessageStore.commitTranAsyncImpl(AbstractBDBMessageStore.java:794)
 at 
org.apache.qpid.server.store.berkeleydb.AbstractBDBMessageStore.access$1200(AbstractBDBMessageStore.java:74)
 at 
org.apache.qpid.server.store.berkeleydb.AbstractBDBMessageStore$BDBTransaction.commitTranAsync(AbstractBDBMessageStore.java:1364)
 at 
org.apache.qpid.server.txn.LocalTransaction.commitAsync(LocalTransaction.java:399)
 at org.apache.qpid.server.protocol.v0_8.AMQChannel.commit(AMQChannel.java:1220)
 at 
org.apache.qpid.server.protocol.v0_8.AMQChannel.receiveTxCommit(AMQChannel.java:3622)
 at org.apache.qpid.codec.ServerDecoder.processMethod(ServerDecoder.java:228)
 at org.apache.qpid.codec.AMQDecoder.processFrame(AMQDecoder.java:191)
 at 
org.apache.qpid.server.protocol.v0_8.BrokerDecoder.doProcessFrame(BrokerDecoder.java:114)
 at 
org.apache.qpid.server.protocol.v0_8.BrokerDecoder.access$000(BrokerDecoder.java:36)
 at 
org.apache.qpid.server.protocol.v0_8.BrokerDecoder$1.run(BrokerDecoder.java:78)
 at 
org.apache.qpid.server.protocol.v0_8.BrokerDecoder$1.run(BrokerDecoder.java:74)
 at java.security.AccessController.doPrivileged(Native Method)
 at 
org.apache.qpid.server.protocol.v0_8.BrokerDecoder.processFrame(BrokerDecoder.java:73)
 at org.apache.qpid.codec.AMQDecoder.processInput(AMQDecoder.java:173)
 at org.apache.qpid.codec.AMQDecoder.decode(AMQDecoder.java:114)
 at org.apache.qpid.codec.ServerDecoder.decodeBuffer(ServerDecoder.java:43)
 at 
org.apache.qpid.server.protocol.v0_8.AMQPConnection_0_8$1.run(AMQPConnection_0_8.java:266)
 at 
org.apache.qpid.server.protocol.v0_8.AMQPConnection_0_8$1.run(AMQPConnection_0_8.java:258)
 at java.security.AccessController.doPrivileged(Native Method)
 at 
org.apache.qpid.server.protocol.v0_8.AMQPConnection_0_8.received(AMQPConnection_0_8.java:257)
 at 
org.apache.qpid.server.transport.MultiVersionProtocolEngine.received(MultiVersionProtocolEngine.java:142)
 at 
org.apache.qpid.server.transport.NonBlockingConnection.processAmqpData(NonBlockingConnection.java:547)
 at 
org.apache.qpid.server.transport.NonBlockingConnectionPlainDelegate.processData(NonBlockingConnectionPlainDelegate.java:58)
 at 
org.apache.qpid.server.transport.NonBlockingConnection.doRead(NonBlockingConnection.java:446)
 at 
org.apache.qpid.server.transport.NonBlockingConnection.doWork(NonBlockingConnection.java:253)
 at 
org.apache.qpid.server.transport.NetworkConnectionScheduler.processConnection(NetworkConnectionScheduler.java:108)
 at 
org.apache.qpid.server.transport.SelectorThread$ConnectionProcessor.processConnection(SelectorThread.java:499)
 at 
org.apache.qpid.server.transport.SelectorThread$SelectionTask.performSelect(SelectorThread.java:337)
 at 
org.apache.qpid.server.transport.SelectorThread$SelectionTask.run(SelectorThread.java:86)
 at org.apache.qpid.server.transport.SelectorThread.run(SelectorThread.java:457)
 at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
 at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
 at java.lang.Thread.run(Thread.java:745)
{noformat}

It seems that majority was lost in the middle of transaction. Qpid HA logic 
detected that and restarted the environment, however, the transaction was not 
aborted.

On closing of the environment 

[jira] [Commented] (QPID-6972) BDB HA: Node may remain detached from group following loss of quorum

2016-01-14 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-6972?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15097990#comment-15097990
 ] 

ASF subversion and git services commented on QPID-6972:
---

Commit 1724582 from oru...@apache.org in branch 'java/trunk'
[ https://svn.apache.org/r1724582 ]

QPID-6972: Delegate exception handling decisions on flushLog failures to 
EnvironmentFacade

> BDB HA: Node may remain detached from group following loss of quorum
> 
>
> Key: QPID-6972
> URL: https://issues.apache.org/jira/browse/QPID-6972
> Project: Qpid
>  Issue Type: Bug
>  Components: Java Broker
>Affects Versions: 0.30, 0.32, qpid-java-6.0
>Reporter: Keith Wall
>  Labels: bdbstore, high-availability
>
> If a master detects that it has lost quorum (which may occur owing to a user 
> generated transaction, or an internally generated 'ping' transaction, failing 
> to see the required number of replica acknowledgements), the underlying JE 
> environment {{ReplicatedEnvironment}} is automatically restarted (the old one 
> closed and a new one created to replace it).   This approach ensures that 
> clients reconnect to a new master in a timely way.
> There is a coding error in the CoalescingCommitter that means that the JE 
> environment restart may not complete properly.  If quorum disappears whilst 
> there are jobs on the CoalescingCommitter's job queue, the  
> CoalescingCommitter's error handling will cause the BDB EnvironmentFacade to 
> be closed.   This is okay for the BDB non-HA case as such an exception is 
> always fatal, but for HA, calling {{ReplicatedEnvironmentFacade#close()}} 
> prevents the environment from being recreated.
> This effect of this defect is that a node may disappear from the group every 
> time quorum is temporarily lost.  This will keep occuring until quorum no 
> longer remains, at which point the business will stop.  Bouncing the affected 
> brokers (or restarting the VHNs) will restore the service, without message 
> loss.
>   



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (QPID-6979) AttributeValueConverter's Certificate handling code assumes unix line endings

2016-01-14 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-6979?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15098095#comment-15098095
 ] 

ASF subversion and git services commented on QPID-6979:
---

Commit 1724603 from [~godfrer] in branch 'java/trunk'
[ https://svn.apache.org/r1724603 ]

QPID-6979 : use CertificateFactory to parse PEM file style certificates

> AttributeValueConverter's Certificate handling code assumes unix line endings
> -
>
> Key: QPID-6979
> URL: https://issues.apache.org/jira/browse/QPID-6979
> Project: Qpid
>  Issue Type: Bug
>  Components: Java Broker
>Reporter: Keith Wall
>Assignee: Keith Wall
>Priority: Minor
> Fix For: qpid-java-6.0.1, qpid-java-6.1
>
>
> The generic code {{AttributeValueConverter}} is used to instantiate model 
> attributes/model operation parameters of type Certificate.   It has the 
> ability to convert from a PEM format representation to a Certificate, but 
> this has a defect.
> It assumes that unix line endings will be used.  If windows line endings were 
> used, the subsequent call to the certificate factory will fail.
> The following model operation is affected by this problem:
> ManagedPeerCertificateTrustStore#addCertificate()
> The workaround is to convert the input to unix line endings.
> The BEGIN/END certificate parsing code should also be enhanced to fail early 
> if it encounters a BEGIN without a corresponding END.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Closed] (QPID-6944) High CPU use sending message using SSL

2016-01-14 Thread Keith Wall (JIRA)

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

Keith Wall closed QPID-6944.

   Resolution: Fixed
Fix Version/s: qpid-java-6.0.1

> High CPU use sending message using SSL
> --
>
> Key: QPID-6944
> URL: https://issues.apache.org/jira/browse/QPID-6944
> Project: Qpid
>  Issue Type: Bug
>  Components: Java Broker
>Affects Versions: qpid-java-6.0
> Environment: Red Hat Enterprise Linux Server release 6.7 (Santiago)
> OpenJDK Runtime Environment (build 1.8.0_65-b17)
> OpenJDK 64-Bit Server VM (build 25.65-b01, mixed mode)
>Reporter: Mark Soderquist
>Assignee: Keith Wall
> Fix For: qpid-java-6.0.1
>
> Attachments: SelectorThread.patch, broker.acl, config.json, 
> config.json, default.json, enabledebug.png, qpid.0.32.png, qpid.6.0.png, 
> qpid.cpu.png, qpid.cpu.png, qpid.cpu.png, qpid.log.zip, qpid.log.zip, 
> qpid.zip, qpid6944.zip, threaddump-1449856663270.tdump, virtualhosts.xml
>
>
> Qpid is experiencing high CPU use when a message is sent. While the 
> application still functions it causes the CPU to run at nearly 100%. This has 
> been narrowed down to enabling SSL on the AMQP port. With SSL disabled there 
> is normal CPU use, but with it enable the CPU use spike when messages are 
> received or consumed.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (QPID-6975) NonBlockingConnectionTLSDelegate won't read to stream end if SSLEngine is closed

2016-01-14 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-6975?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15098090#comment-15098090
 ] 

ASF subversion and git services commented on QPID-6975:
---

Commit 1724601 from [~k-wall] in branch 'java/branches/6.0.x'
[ https://svn.apache.org/r1724601 ]

QPID-6975: Prevent an open connection spinning on the selector after an SSL 
close_notify

Merge to 6.0.x branch.

> NonBlockingConnectionTLSDelegate won't read to stream end if SSLEngine is 
> closed
> 
>
> Key: QPID-6975
> URL: https://issues.apache.org/jira/browse/QPID-6975
> Project: Qpid
>  Issue Type: Bug
>  Components: Java Broker
>Affects Versions: qpid-java-6.0
>Reporter: Keith Wall
> Fix For: qpid-java-6.0.1, qpid-java-6.1
>
> Attachments: 
> 0001-QPID-6975-Prevent-an-open-connection-spinning-on-the.patch
>
>
> If an AMQP peer using TLS closes the connection gracefully, a "SSL close 
> notify" is sent as part if the SSL goodnight from peer to Broker. 
> The {{SSLEngine}} within {{NonBlockingConnectionTLSDelegate}} on receipt of 
> the "close notify" will put itself into a {{SSLEngineResult.Status.CLOSED}} 
> state.
> However, {{NonBlockingConnectionDelegate#readyForRead}} considers 
> SSLEngineResult.Status.CLOSED as meaning the channel is not ready for 
> reading.  This prevents NonBlockingConnection from ever reading the channel 
> again, so -1 is never encountered, and the connection does not immediately 
> get marked as closed.  The action of the {{ConnectionClosingTicker}} masks 
> the problem, as it intervenes after ten seconds, and closes the connection 
> anyway.
> The effect of this defect is to cause a tight loop involving the selector 
> thread.  The selector thread believes the channel is ready, the connection 
> gets scheduled, the channel is *not* read, and the channel gets reregistered 
> back on the selector, and so forth.  The tight loop continues for a 10 second 
> burst until the CCT intervenes.  If you have may connections being opened and 
> closed all the time, it may appear to be a continual tight infinite loop.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (QPID-6975) NonBlockingConnectionTLSDelegate won't read to stream end if SSLEngine is closed

2016-01-14 Thread Keith Wall (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-6975?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15098091#comment-15098091
 ] 

Keith Wall commented on QPID-6975:
--

Merged to 6.0.x branch, closing jira.

> NonBlockingConnectionTLSDelegate won't read to stream end if SSLEngine is 
> closed
> 
>
> Key: QPID-6975
> URL: https://issues.apache.org/jira/browse/QPID-6975
> Project: Qpid
>  Issue Type: Bug
>  Components: Java Broker
>Affects Versions: qpid-java-6.0
>Reporter: Keith Wall
> Fix For: qpid-java-6.0.1, qpid-java-6.1
>
> Attachments: 
> 0001-QPID-6975-Prevent-an-open-connection-spinning-on-the.patch
>
>
> If an AMQP peer using TLS closes the connection gracefully, a "SSL close 
> notify" is sent as part if the SSL goodnight from peer to Broker. 
> The {{SSLEngine}} within {{NonBlockingConnectionTLSDelegate}} on receipt of 
> the "close notify" will put itself into a {{SSLEngineResult.Status.CLOSED}} 
> state.
> However, {{NonBlockingConnectionDelegate#readyForRead}} considers 
> SSLEngineResult.Status.CLOSED as meaning the channel is not ready for 
> reading.  This prevents NonBlockingConnection from ever reading the channel 
> again, so -1 is never encountered, and the connection does not immediately 
> get marked as closed.  The action of the {{ConnectionClosingTicker}} masks 
> the problem, as it intervenes after ten seconds, and closes the connection 
> anyway.
> The effect of this defect is to cause a tight loop involving the selector 
> thread.  The selector thread believes the channel is ready, the connection 
> gets scheduled, the channel is *not* read, and the channel gets reregistered 
> back on the selector, and so forth.  The tight loop continues for a 10 second 
> burst until the CCT intervenes.  If you have may connections being opened and 
> closed all the time, it may appear to be a continual tight infinite loop.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (QPID-6944) High CPU use sending message using SSL

2016-01-14 Thread Keith Wall (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-6944?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15098093#comment-15098093
 ] 

Keith Wall commented on QPID-6944:
--

Thanks for the confirmation.   

> High CPU use sending message using SSL
> --
>
> Key: QPID-6944
> URL: https://issues.apache.org/jira/browse/QPID-6944
> Project: Qpid
>  Issue Type: Bug
>  Components: Java Broker
>Affects Versions: qpid-java-6.0
> Environment: Red Hat Enterprise Linux Server release 6.7 (Santiago)
> OpenJDK Runtime Environment (build 1.8.0_65-b17)
> OpenJDK 64-Bit Server VM (build 25.65-b01, mixed mode)
>Reporter: Mark Soderquist
>Assignee: Keith Wall
> Attachments: SelectorThread.patch, broker.acl, config.json, 
> config.json, default.json, enabledebug.png, qpid.0.32.png, qpid.6.0.png, 
> qpid.cpu.png, qpid.cpu.png, qpid.cpu.png, qpid.log.zip, qpid.log.zip, 
> qpid.zip, qpid6944.zip, threaddump-1449856663270.tdump, virtualhosts.xml
>
>
> Qpid is experiencing high CPU use when a message is sent. While the 
> application still functions it causes the CPU to run at nearly 100%. This has 
> been narrowed down to enabling SSL on the AMQP port. With SSL disabled there 
> is normal CPU use, but with it enable the CPU use spike when messages are 
> received or consumed.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (QPID-6979) AttributeValueConverter's Certificate handling code assumes unix line endings

2016-01-14 Thread Keith Wall (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-6979?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15098055#comment-15098055
 ] 

Keith Wall commented on QPID-6979:
--

Hi Rob,

Couple of comments

# As java.security.cert.CertificateFactory#generateCertificate supports Base64 
certificates in printable format (with the BEGIN/END headers), why can't 
AttributeValueConverter#CERTIFICATE_CONVERTER simply feed the interpolated 
string value directly into it, thus avoiding the need for our own 
BEGIN/END/line ending manipulations at all.
# I'm not sure the return null on AVC#196 is going to help a user that submits 
a illegal format file.  Should this throw a meaningful exception?
# If we need to do more the delegate to #generateCertificate, I think 
AttributeValueConverterTest should be extended to include happy/unhappy path.



> AttributeValueConverter's Certificate handling code assumes unix line endings
> -
>
> Key: QPID-6979
> URL: https://issues.apache.org/jira/browse/QPID-6979
> Project: Qpid
>  Issue Type: Bug
>  Components: Java Broker
>Reporter: Keith Wall
>Assignee: Keith Wall
>Priority: Minor
> Fix For: qpid-java-6.0.1, qpid-java-6.1
>
>
> The generic code {{AttributeValueConverter}} is used to instantiate model 
> attributes/model operation parameters of type Certificate.   It has the 
> ability to convert from a PEM format representation to a Certificate, but 
> this has a defect.
> It assumes that unix line endings will be used.  If windows line endings were 
> used, the subsequent call to the certificate factory will fail.
> The following model operation is affected by this problem:
> ManagedPeerCertificateTrustStore#addCertificate()
> The workaround is to convert the input to unix line endings.
> The BEGIN/END certificate parsing code should also be enhanced to fail early 
> if it encounters a BEGIN without a corresponding END.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Closed] (QPID-6975) NonBlockingConnectionTLSDelegate won't read to stream end if SSLEngine is closed

2016-01-14 Thread Keith Wall (JIRA)

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

Keith Wall closed QPID-6975.

Resolution: Fixed

> NonBlockingConnectionTLSDelegate won't read to stream end if SSLEngine is 
> closed
> 
>
> Key: QPID-6975
> URL: https://issues.apache.org/jira/browse/QPID-6975
> Project: Qpid
>  Issue Type: Bug
>  Components: Java Broker
>Affects Versions: qpid-java-6.0
>Reporter: Keith Wall
> Fix For: qpid-java-6.0.1, qpid-java-6.1
>
> Attachments: 
> 0001-QPID-6975-Prevent-an-open-connection-spinning-on-the.patch
>
>
> If an AMQP peer using TLS closes the connection gracefully, a "SSL close 
> notify" is sent as part if the SSL goodnight from peer to Broker. 
> The {{SSLEngine}} within {{NonBlockingConnectionTLSDelegate}} on receipt of 
> the "close notify" will put itself into a {{SSLEngineResult.Status.CLOSED}} 
> state.
> However, {{NonBlockingConnectionDelegate#readyForRead}} considers 
> SSLEngineResult.Status.CLOSED as meaning the channel is not ready for 
> reading.  This prevents NonBlockingConnection from ever reading the channel 
> again, so -1 is never encountered, and the connection does not immediately 
> get marked as closed.  The action of the {{ConnectionClosingTicker}} masks 
> the problem, as it intervenes after ten seconds, and closes the connection 
> anyway.
> The effect of this defect is to cause a tight loop involving the selector 
> thread.  The selector thread believes the channel is ready, the connection 
> gets scheduled, the channel is *not* read, and the channel gets reregistered 
> back on the selector, and so forth.  The tight loop continues for a 10 second 
> burst until the CCT intervenes.  If you have may connections being opened and 
> closed all the time, it may appear to be a continual tight infinite loop.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Closed] (QPID-6950) [Java Broker] Starting embedded broker with http-management plugin using Broker#startup(BrokerOptions) requires Thread.UncaughtExceptionHandler to be set

2016-01-14 Thread Keith Wall (JIRA)

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

Keith Wall closed QPID-6950.


> [Java Broker] Starting embedded broker with http-management plugin using 
> Broker#startup(BrokerOptions)  requires Thread.UncaughtExceptionHandler to be 
> set
> --
>
> Key: QPID-6950
> URL: https://issues.apache.org/jira/browse/QPID-6950
> Project: Qpid
>  Issue Type: Bug
>  Components: Java Broker
>Affects Versions: qpid-java-6.0
>Reporter: Alex Rudyy
>Assignee: Lorenz Quack
> Fix For: qpid-java-6.0.1, qpid-java-6.1
>
>
> Starting embedded broker programmatically using
> {code}
> ...
> import org.apache.qpid.server.Broker;
> import org.apache.qpid.server.BrokerOptions;
>  
> ...
> BrokerOptions options = new BrokerOptions();
> ...
> Broker broker = new Broker();
> broker.startup(options);
> {code}
> with http-managment plugin requires setting of 
> Thread.UncaughtExceptionHandler.
> Otherwise http management plugin throws an Exception on start-up about not 
> set UncaughtExceptionHandler
> {noformat}
> Caused by: org.apache.qpid.server.util.ServerScopedRuntimeException: Failed 
> to start HTTP management on ports : [HttpPortImpl 
> [id=eebcd33d-a536-40ed-b696-24a50d04e419, name=HTTP, p
> ort=8080]]
> at 
> org.apache.qpid.server.management.plugin.HttpManagement.doStart(HttpManagement.java:155)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at 
> org.apache.qpid.server.model.AbstractConfiguredObject.attainState(AbstractConfiguredObject.java:951)
> at 
> org.apache.qpid.server.model.AbstractConfiguredObject.doAttainState(AbstractConfiguredObject.java:650)
> at 
> org.apache.qpid.server.model.AbstractConfiguredObject.access$400(AbstractConfiguredObject.java:83)
> at 
> org.apache.qpid.server.model.AbstractConfiguredObject$2.performAction(AbstractConfiguredObject.java:640)
> at 
> org.apache.qpid.server.model.AbstractConfiguredObject$2.performAction(AbstractConfiguredObject.java:629)
> at 
> org.apache.qpid.server.model.AbstractConfiguredObject.applyToChildren(AbstractConfiguredObject.java:777)
> at 
> org.apache.qpid.server.model.AbstractConfiguredObject.doAttainState(AbstractConfiguredObject.java:628)
> at 
> org.apache.qpid.server.model.AbstractConfiguredObject.open(AbstractConfiguredObject.java:464)
> at 
> org.apache.qpid.server.model.AbstractSystemConfig.activate(AbstractSystemConfig.java:238)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at 
> org.apache.qpid.server.model.AbstractConfiguredObject.attainState(AbstractConfiguredObject.java:951)
> at 
> org.apache.qpid.server.model.AbstractConfiguredObject.doAttainState(AbstractConfiguredObject.java:650)
> at 
> org.apache.qpid.server.model.AbstractConfiguredObject.open(AbstractConfiguredObject.java:464)
> at org.apache.qpid.server.Broker.startupImpl(Broker.java:199)
> at org.apache.qpid.server.Broker.access$000(Broker.java:57)
> at org.apache.qpid.server.Broker$1.run(Broker.java:143)
> at java.security.AccessController.doPrivileged(Native Method)
> at javax.security.auth.Subject.doAs(Subject.java:415)
> at org.apache.qpid.server.Broker.startup(Broker.java:138)
> at 
> com.jpmorgan.qpid.mavenexample.BrokerAndClientRunner.main(BrokerAndClientRunner.java:95)
> ... 6 more
> Caused by: java.lang.IllegalStateException: no uncaught exception handler set
> at 
> org.apache.qpid.server.management.plugin.filter.ExceptionHandlingFilter.init(ExceptionHandlingFilter.java:49)
> at 
> org.eclipse.jetty.servlet.FilterHolder.doStart(FilterHolder.java:118)
> at 
> org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
> at 
> org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:768)
> at 
> org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:265)
> at 
> org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:717)
> at 
> 

[jira] [Resolved] (QPID-6950) [Java Broker] Starting embedded broker with http-management plugin using Broker#startup(BrokerOptions) requires Thread.UncaughtExceptionHandler to be set

2016-01-14 Thread Keith Wall (JIRA)

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

Keith Wall resolved QPID-6950.
--
Resolution: Fixed

> [Java Broker] Starting embedded broker with http-management plugin using 
> Broker#startup(BrokerOptions)  requires Thread.UncaughtExceptionHandler to be 
> set
> --
>
> Key: QPID-6950
> URL: https://issues.apache.org/jira/browse/QPID-6950
> Project: Qpid
>  Issue Type: Bug
>  Components: Java Broker
>Affects Versions: qpid-java-6.0
>Reporter: Alex Rudyy
>Assignee: Lorenz Quack
>
> Starting embedded broker programmatically using
> {code}
> ...
> import org.apache.qpid.server.Broker;
> import org.apache.qpid.server.BrokerOptions;
>  
> ...
> BrokerOptions options = new BrokerOptions();
> ...
> Broker broker = new Broker();
> broker.startup(options);
> {code}
> with http-managment plugin requires setting of 
> Thread.UncaughtExceptionHandler.
> Otherwise http management plugin throws an Exception on start-up about not 
> set UncaughtExceptionHandler
> {noformat}
> Caused by: org.apache.qpid.server.util.ServerScopedRuntimeException: Failed 
> to start HTTP management on ports : [HttpPortImpl 
> [id=eebcd33d-a536-40ed-b696-24a50d04e419, name=HTTP, p
> ort=8080]]
> at 
> org.apache.qpid.server.management.plugin.HttpManagement.doStart(HttpManagement.java:155)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at 
> org.apache.qpid.server.model.AbstractConfiguredObject.attainState(AbstractConfiguredObject.java:951)
> at 
> org.apache.qpid.server.model.AbstractConfiguredObject.doAttainState(AbstractConfiguredObject.java:650)
> at 
> org.apache.qpid.server.model.AbstractConfiguredObject.access$400(AbstractConfiguredObject.java:83)
> at 
> org.apache.qpid.server.model.AbstractConfiguredObject$2.performAction(AbstractConfiguredObject.java:640)
> at 
> org.apache.qpid.server.model.AbstractConfiguredObject$2.performAction(AbstractConfiguredObject.java:629)
> at 
> org.apache.qpid.server.model.AbstractConfiguredObject.applyToChildren(AbstractConfiguredObject.java:777)
> at 
> org.apache.qpid.server.model.AbstractConfiguredObject.doAttainState(AbstractConfiguredObject.java:628)
> at 
> org.apache.qpid.server.model.AbstractConfiguredObject.open(AbstractConfiguredObject.java:464)
> at 
> org.apache.qpid.server.model.AbstractSystemConfig.activate(AbstractSystemConfig.java:238)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at 
> org.apache.qpid.server.model.AbstractConfiguredObject.attainState(AbstractConfiguredObject.java:951)
> at 
> org.apache.qpid.server.model.AbstractConfiguredObject.doAttainState(AbstractConfiguredObject.java:650)
> at 
> org.apache.qpid.server.model.AbstractConfiguredObject.open(AbstractConfiguredObject.java:464)
> at org.apache.qpid.server.Broker.startupImpl(Broker.java:199)
> at org.apache.qpid.server.Broker.access$000(Broker.java:57)
> at org.apache.qpid.server.Broker$1.run(Broker.java:143)
> at java.security.AccessController.doPrivileged(Native Method)
> at javax.security.auth.Subject.doAs(Subject.java:415)
> at org.apache.qpid.server.Broker.startup(Broker.java:138)
> at 
> com.jpmorgan.qpid.mavenexample.BrokerAndClientRunner.main(BrokerAndClientRunner.java:95)
> ... 6 more
> Caused by: java.lang.IllegalStateException: no uncaught exception handler set
> at 
> org.apache.qpid.server.management.plugin.filter.ExceptionHandlingFilter.init(ExceptionHandlingFilter.java:49)
> at 
> org.eclipse.jetty.servlet.FilterHolder.doStart(FilterHolder.java:118)
> at 
> org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
> at 
> org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:768)
> at 
> org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:265)
> at 
> org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:717)
> at 
> 

[jira] [Commented] (QPID-6979) AttributeValueConverter's Certificate handling code assumes unix line endings

2016-01-14 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-6979?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15098096#comment-15098096
 ] 

ASF subversion and git services commented on QPID-6979:
---

Commit 1724604 from [~godfrer] in branch 'java/branches/6.0.x'
[ https://svn.apache.org/r1724604 ]

QPID-6979 : merge to 6.0.x

> AttributeValueConverter's Certificate handling code assumes unix line endings
> -
>
> Key: QPID-6979
> URL: https://issues.apache.org/jira/browse/QPID-6979
> Project: Qpid
>  Issue Type: Bug
>  Components: Java Broker
>Reporter: Keith Wall
>Assignee: Keith Wall
>Priority: Minor
> Fix For: qpid-java-6.0.1, qpid-java-6.1
>
>
> The generic code {{AttributeValueConverter}} is used to instantiate model 
> attributes/model operation parameters of type Certificate.   It has the 
> ability to convert from a PEM format representation to a Certificate, but 
> this has a defect.
> It assumes that unix line endings will be used.  If windows line endings were 
> used, the subsequent call to the certificate factory will fail.
> The following model operation is affected by this problem:
> ManagedPeerCertificateTrustStore#addCertificate()
> The workaround is to convert the input to unix line endings.
> The BEGIN/END certificate parsing code should also be enhanced to fail early 
> if it encounters a BEGIN without a corresponding END.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Updated] (QPID-6950) [Java Broker] Starting embedded broker with http-management plugin using Broker#startup(BrokerOptions) requires Thread.UncaughtExceptionHandler to be set

2016-01-14 Thread Keith Wall (JIRA)

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

Keith Wall updated QPID-6950:
-
Fix Version/s: qpid-java-6.1
   qpid-java-6.0.1

> [Java Broker] Starting embedded broker with http-management plugin using 
> Broker#startup(BrokerOptions)  requires Thread.UncaughtExceptionHandler to be 
> set
> --
>
> Key: QPID-6950
> URL: https://issues.apache.org/jira/browse/QPID-6950
> Project: Qpid
>  Issue Type: Bug
>  Components: Java Broker
>Affects Versions: qpid-java-6.0
>Reporter: Alex Rudyy
>Assignee: Lorenz Quack
> Fix For: qpid-java-6.0.1, qpid-java-6.1
>
>
> Starting embedded broker programmatically using
> {code}
> ...
> import org.apache.qpid.server.Broker;
> import org.apache.qpid.server.BrokerOptions;
>  
> ...
> BrokerOptions options = new BrokerOptions();
> ...
> Broker broker = new Broker();
> broker.startup(options);
> {code}
> with http-managment plugin requires setting of 
> Thread.UncaughtExceptionHandler.
> Otherwise http management plugin throws an Exception on start-up about not 
> set UncaughtExceptionHandler
> {noformat}
> Caused by: org.apache.qpid.server.util.ServerScopedRuntimeException: Failed 
> to start HTTP management on ports : [HttpPortImpl 
> [id=eebcd33d-a536-40ed-b696-24a50d04e419, name=HTTP, p
> ort=8080]]
> at 
> org.apache.qpid.server.management.plugin.HttpManagement.doStart(HttpManagement.java:155)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at 
> org.apache.qpid.server.model.AbstractConfiguredObject.attainState(AbstractConfiguredObject.java:951)
> at 
> org.apache.qpid.server.model.AbstractConfiguredObject.doAttainState(AbstractConfiguredObject.java:650)
> at 
> org.apache.qpid.server.model.AbstractConfiguredObject.access$400(AbstractConfiguredObject.java:83)
> at 
> org.apache.qpid.server.model.AbstractConfiguredObject$2.performAction(AbstractConfiguredObject.java:640)
> at 
> org.apache.qpid.server.model.AbstractConfiguredObject$2.performAction(AbstractConfiguredObject.java:629)
> at 
> org.apache.qpid.server.model.AbstractConfiguredObject.applyToChildren(AbstractConfiguredObject.java:777)
> at 
> org.apache.qpid.server.model.AbstractConfiguredObject.doAttainState(AbstractConfiguredObject.java:628)
> at 
> org.apache.qpid.server.model.AbstractConfiguredObject.open(AbstractConfiguredObject.java:464)
> at 
> org.apache.qpid.server.model.AbstractSystemConfig.activate(AbstractSystemConfig.java:238)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at 
> org.apache.qpid.server.model.AbstractConfiguredObject.attainState(AbstractConfiguredObject.java:951)
> at 
> org.apache.qpid.server.model.AbstractConfiguredObject.doAttainState(AbstractConfiguredObject.java:650)
> at 
> org.apache.qpid.server.model.AbstractConfiguredObject.open(AbstractConfiguredObject.java:464)
> at org.apache.qpid.server.Broker.startupImpl(Broker.java:199)
> at org.apache.qpid.server.Broker.access$000(Broker.java:57)
> at org.apache.qpid.server.Broker$1.run(Broker.java:143)
> at java.security.AccessController.doPrivileged(Native Method)
> at javax.security.auth.Subject.doAs(Subject.java:415)
> at org.apache.qpid.server.Broker.startup(Broker.java:138)
> at 
> com.jpmorgan.qpid.mavenexample.BrokerAndClientRunner.main(BrokerAndClientRunner.java:95)
> ... 6 more
> Caused by: java.lang.IllegalStateException: no uncaught exception handler set
> at 
> org.apache.qpid.server.management.plugin.filter.ExceptionHandlingFilter.init(ExceptionHandlingFilter.java:49)
> at 
> org.eclipse.jetty.servlet.FilterHolder.doStart(FilterHolder.java:118)
> at 
> org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
> at 
> org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:768)
> at 
> org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:265)
> at 
> 

[jira] [Commented] (QPID-6959) [Java Broker] Cannot mutate BDB HA environment and modify such settings like priority, designating primary, etc when environment is in restarting state

2016-01-14 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-6959?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15098124#comment-15098124
 ] 

ASF subversion and git services commented on QPID-6959:
---

Commit 1724613 from oru...@apache.org in branch 'java/branches/6.0.x'
[ https://svn.apache.org/r1724613 ]

QPID-6959: Restore environment mutating operations on BDB HA VHN when 
environment is restarting

   merged from trunk
   svn merge -c 1722246 https://svn.apache.org/repos/asf/qpid/java/trunk
   svn merge -c 1723194 https://svn.apache.org/repos/asf/qpid/java/trunk
   svn merge -c 1723563 https://svn.apache.org/repos/asf/qpid/java/trunk

> [Java Broker] Cannot mutate BDB HA environment and modify such settings like 
> priority, designating primary, etc when environment is in restarting state
> ---
>
> Key: QPID-6959
> URL: https://issues.apache.org/jira/browse/QPID-6959
> Project: Qpid
>  Issue Type: Bug
>  Components: Java Broker
>Affects Versions: qpid-java-6.0
>Reporter: Alex Rudyy
>Assignee: Keith Wall
>Priority: Critical
> Fix For: qpid-java-6.1
>
>
> When cluster majority is lost, the available nodes in the cluster cannot be 
> mutated and their settings cannot be modified due to 
> ReplicationEnvironmentFacade being put into RESTARTING state. As result, any 
> environment mutating operation ends up in exception:
> {noformat}
> 2015-12-23 11:02:12,225 WARN  [HttpManagement-23] (servlet.ServletHandler) - 
> /api/latest/virtualhostnode/node1
> org.apache.qpid.server.util.ConnectionScopedRuntimeException: Failed to set 
> designated primary to value true on BDBHAVirtualHostNodeImpl 
> [id=90edcdaf-a836-4309-8157-0d375860cb58, name=node1, 
> storePath=/fast/home/qpidfast/f391718/qpid-broker/5.1.7/work/node1/config, 
> groupName=ha, address=fastdevl0400.svr.emea.jpmchase.net:5000, state=ACTIVE, 
> priority=1, designatedPrimary=true, quorumOverride=0, role=WAITING]
> at 
> org.apache.qpid.server.virtualhostnode.berkeleydb.BDBHAVirtualHostNodeImpl.resolveFuture(BDBHAVirtualHostNodeImpl.java:860)
> at 
> org.apache.qpid.server.virtualhostnode.berkeleydb.BDBHAVirtualHostNodeImpl.postSetDesignatedPrimary(BDBHAVirtualHostNodeImpl.java:791)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at 
> org.apache.qpid.server.model.AbstractConfiguredObject.automatedSetValue(AbstractConfiguredObject.java:420)
> at 
> org.apache.qpid.server.model.AbstractConfiguredObject.changeAttribute(AbstractConfiguredObject.java:1290)
> at 
> org.apache.qpid.server.model.AbstractConfiguredObject.changeAttributes(AbstractConfiguredObject.java:1724)
> at 
> org.apache.qpid.server.model.AbstractConfiguredObject$12.execute(AbstractConfiguredObject.java:1651)
> at 
> org.apache.qpid.server.configuration.updater.TaskExecutorImpl$2.execute(TaskExecutorImpl.java:149)
> at 
> org.apache.qpid.server.configuration.updater.TaskExecutorImpl$2.execute(TaskExecutorImpl.java:145)
> at 
> org.apache.qpid.server.configuration.updater.TaskExecutorImpl.executeTask(TaskExecutorImpl.java:299)
> at 
> org.apache.qpid.server.configuration.updater.TaskExecutorImpl.access$400(TaskExecutorImpl.java:43)
> at 
> org.apache.qpid.server.configuration.updater.TaskExecutorImpl$CallableWrapper$1.run(TaskExecutorImpl.java:327)
> at java.security.AccessController.doPrivileged(Native Method)
> at javax.security.auth.Subject.doAs(Subject.java:356)
> at 
> org.apache.qpid.server.configuration.updater.TaskExecutorImpl$CallableWrapper.call(TaskExecutorImpl.java:322)
> at java.util.concurrent.FutureTask.run(FutureTask.java:262)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> at java.lang.Thread.run(Thread.java:745)
> Caused by: org.apache.qpid.server.util.ConnectionScopedRuntimeException: 
> Environment is restarting
> at 
> org.apache.qpid.server.store.berkeleydb.replication.ReplicatedEnvironmentFacade.getEnvironment(ReplicatedEnvironmentFacade.java:984)
> at 
> org.apache.qpid.server.store.berkeleydb.replication.ReplicatedEnvironmentFacade.setDesignatedPrimaryInternal(ReplicatedEnvironmentFacade.java:771)
> {noformat}



--
This message was sent by 

[jira] [Commented] (QPID-6972) BDB HA: Node may remain detached from group following loss of quorum

2016-01-14 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-6972?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15098130#comment-15098130
 ] 

ASF subversion and git services commented on QPID-6972:
---

Commit 1724616 from oru...@apache.org in branch 'java/branches/6.0.x'
[ https://svn.apache.org/r1724616 ]

QPID-6972: Delegate exception handling decisions on flushLog failures to 
EnvironmentFacade

   merged from trunk
   svn merge -c 1724582 https://svn.apache.org/repos/asf/qpid/java/trunk

> BDB HA: Node may remain detached from group following loss of quorum
> 
>
> Key: QPID-6972
> URL: https://issues.apache.org/jira/browse/QPID-6972
> Project: Qpid
>  Issue Type: Bug
>  Components: Java Broker
>Affects Versions: 0.30, 0.32, qpid-java-6.0
>Reporter: Keith Wall
>  Labels: bdbstore, high-availability
>
> If a master detects that it has lost quorum (which may occur owing to a user 
> generated transaction, or an internally generated 'ping' transaction, failing 
> to see the required number of replica acknowledgements), the underlying JE 
> environment {{ReplicatedEnvironment}} is automatically restarted (the old one 
> closed and a new one created to replace it).   This approach ensures that 
> clients reconnect to a new master in a timely way.
> There is a coding error in the CoalescingCommitter that means that the JE 
> environment restart may not complete properly.  If quorum disappears whilst 
> there are jobs on the CoalescingCommitter's job queue, the  
> CoalescingCommitter's error handling will cause the BDB EnvironmentFacade to 
> be closed.   This is okay for the BDB non-HA case as such an exception is 
> always fatal, but for HA, calling {{ReplicatedEnvironmentFacade#close()}} 
> prevents the environment from being recreated.
> This effect of this defect is that a node may disappear from the group every 
> time quorum is temporarily lost.  This will keep occuring until quorum no 
> longer remains, at which point the business will stop.  Bouncing the affected 
> brokers (or restarting the VHNs) will restore the service, without message 
> loss.
>   



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Updated] (QPID-6972) BDB HA: Node may remain detached from group following loss of quorum

2016-01-14 Thread Alex Rudyy (JIRA)

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

Alex Rudyy updated QPID-6972:
-
Attachment: 0001-WIP-Add-system-test.patch

Added patch with a system test testing flushLog failure

> BDB HA: Node may remain detached from group following loss of quorum
> 
>
> Key: QPID-6972
> URL: https://issues.apache.org/jira/browse/QPID-6972
> Project: Qpid
>  Issue Type: Bug
>  Components: Java Broker
>Affects Versions: 0.30, 0.32, qpid-java-6.0
>Reporter: Keith Wall
>  Labels: bdbstore, high-availability
> Attachments: 0001-WIP-Add-system-test.patch
>
>
> If a master detects that it has lost quorum (which may occur owing to a user 
> generated transaction, or an internally generated 'ping' transaction, failing 
> to see the required number of replica acknowledgements), the underlying JE 
> environment {{ReplicatedEnvironment}} is automatically restarted (the old one 
> closed and a new one created to replace it).   This approach ensures that 
> clients reconnect to a new master in a timely way.
> There is a coding error in the CoalescingCommitter that means that the JE 
> environment restart may not complete properly.  If quorum disappears whilst 
> there are jobs on the CoalescingCommitter's job queue, the  
> CoalescingCommitter's error handling will cause the BDB EnvironmentFacade to 
> be closed.   This is okay for the BDB non-HA case as such an exception is 
> always fatal, but for HA, calling {{ReplicatedEnvironmentFacade#close()}} 
> prevents the environment from being recreated.
> This effect of this defect is that a node may disappear from the group every 
> time quorum is temporarily lost.  This will keep occuring until quorum no 
> longer remains, at which point the business will stop.  Bouncing the affected 
> brokers (or restarting the VHNs) will restore the service, without message 
> loss.
>   



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Updated] (QPID-6996) Can't make a node master twice (during a single Broker lifetime)

2016-01-14 Thread Alex Rudyy (JIRA)

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

Alex Rudyy updated QPID-6996:
-
Attachment: roleChangePatch2.diff

> Can't make a node master twice (during a single Broker lifetime)
> 
>
> Key: QPID-6996
> URL: https://issues.apache.org/jira/browse/QPID-6996
> Project: Qpid
>  Issue Type: Bug
>  Components: Java Broker
>Affects Versions: 0.30, 0.32, qpid-java-6.0
>Reporter: Keith Wall
>Priority: Minor
> Attachments: roleChangePatch.diff, roleChangePatch2.diff
>
>
> The Java Broker's BDB HA implementation permits the mastership to be 
> transferred around the group.  To initiate this change, a user mutates the 
> model attribute "role" on object {{BDBHAVHN}} or {{BDBHARRN}} to have the 
> value {{MASTER}} through a management interface.
> If I make this change once, the change is effective.  If later the mastership 
> moves again (as a result of a failure and subsequent election or a transfer 
> master elsewhere in the group), the attempt to move the mastership back to 
> this node is ignored (defect).
> The issue is that ACO#changeAttributes blocks the subsequent change because 
> it does not know that attribute's value is anything other than {{MASTER}}.  
> This is because BDBHAVHN#setRole (happens asynchronously as the mastership 
> changes) updates only the CO view of the attribute (#_role), leaving 
> ACO#_attributes.get(ROLE) with a stale value {{MASTER}}.  The Broker 
> containing the node needs to be bounce to correct the state problem.
> The main use-case for transfer master is to restore the master to its 
> business as usual position following a device failure.  This use-case is not 
> affected by this defect.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Created] (QPID-7001) [Java Broker] NullPointerException can be thrown from Port IO Thread

2016-01-14 Thread Alex Rudyy (JIRA)
Alex Rudyy created QPID-7001:


 Summary: [Java Broker] NullPointerException can be thrown from 
Port IO Thread
 Key: QPID-7001
 URL: https://issues.apache.org/jira/browse/QPID-7001
 Project: Qpid
  Issue Type: Bug
  Components: Java Broker
Affects Versions: qpid-java-6.0, qpid-java-6.1
Reporter: Alex Rudyy


I run into the following issue in my tests:
{noformat}

#
# Unhandled Exception java.lang.NullPointerException in Thread 
IO-pool-Port-amqp-1
#
# Exiting
#

java.lang.NullPointerException
 at 
org.apache.qpid.server.transport.SelectorThread$SelectionTask$1.run(SelectorThread.java:190)
 at org.apache.qpid.server.transport.SelectorThread.run(SelectorThread.java:457)
 at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
 at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
{noformat}





--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Created] (QPID-7000) [Java Broker] Add synthetic VirtualHost which allows management of whole broker

2016-01-14 Thread Rob Godfrey (JIRA)
Rob Godfrey created QPID-7000:
-

 Summary: [Java Broker] Add synthetic VirtualHost which allows 
management of whole broker
 Key: QPID-7000
 URL: https://issues.apache.org/jira/browse/QPID-7000
 Project: Qpid
  Issue Type: Improvement
  Components: Java Broker
Reporter: Rob Godfrey
Assignee: Rob Godfrey


Add a synthetic virtualhost / node which allows only access to $management to 
allow for management of the whole broker. The $management node in other virtual 
hosts should allow management only of the objects within the given virtual host



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Updated] (QPID-7001) [Java Broker] NullPointerException can be thrown from Port IO Thread

2016-01-14 Thread Alex Rudyy (JIRA)

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

Alex Rudyy updated QPID-7001:
-
Attachment: test.log.tar.gz

> [Java Broker] NullPointerException can be thrown from Port IO Thread
> 
>
> Key: QPID-7001
> URL: https://issues.apache.org/jira/browse/QPID-7001
> Project: Qpid
>  Issue Type: Bug
>  Components: Java Broker
>Affects Versions: qpid-java-6.0, qpid-java-6.1
>Reporter: Alex Rudyy
> Attachments: test.log.tar.gz
>
>
> I run into the following issue in my tests:
> {noformat}
> 
> #
> # Unhandled Exception java.lang.NullPointerException in Thread 
> IO-pool-Port-amqp-1
> #
> # Exiting
> #
> 
> java.lang.NullPointerException
>  at 
> org.apache.qpid.server.transport.SelectorThread$SelectionTask$1.run(SelectorThread.java:190)
>  at 
> org.apache.qpid.server.transport.SelectorThread.run(SelectorThread.java:457)
>  at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>  at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (QPID-6979) AttributeValueConverter's Certificate handling code assumes unix line endings

2016-01-14 Thread Keith Wall (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-6979?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15098211#comment-15098211
 ] 

Keith Wall commented on QPID-6979:
--

Change looks reasonable to me.

> AttributeValueConverter's Certificate handling code assumes unix line endings
> -
>
> Key: QPID-6979
> URL: https://issues.apache.org/jira/browse/QPID-6979
> Project: Qpid
>  Issue Type: Bug
>  Components: Java Broker
>Reporter: Keith Wall
>Assignee: Keith Wall
>Priority: Minor
> Fix For: qpid-java-6.0.1, qpid-java-6.1
>
>
> The generic code {{AttributeValueConverter}} is used to instantiate model 
> attributes/model operation parameters of type Certificate.   It has the 
> ability to convert from a PEM format representation to a Certificate, but 
> this has a defect.
> It assumes that unix line endings will be used.  If windows line endings were 
> used, the subsequent call to the certificate factory will fail.
> The following model operation is affected by this problem:
> ManagedPeerCertificateTrustStore#addCertificate()
> The workaround is to convert the input to unix line endings.
> The BEGIN/END certificate parsing code should also be enhanced to fail early 
> if it encounters a BEGIN without a corresponding END.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Resolved] (QPID-6979) AttributeValueConverter's Certificate handling code assumes unix line endings

2016-01-14 Thread Keith Wall (JIRA)

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

Keith Wall resolved QPID-6979.
--
Resolution: Fixed

> AttributeValueConverter's Certificate handling code assumes unix line endings
> -
>
> Key: QPID-6979
> URL: https://issues.apache.org/jira/browse/QPID-6979
> Project: Qpid
>  Issue Type: Bug
>  Components: Java Broker
>Reporter: Keith Wall
>Assignee: Keith Wall
>Priority: Minor
> Fix For: qpid-java-6.0.1, qpid-java-6.1
>
>
> The generic code {{AttributeValueConverter}} is used to instantiate model 
> attributes/model operation parameters of type Certificate.   It has the 
> ability to convert from a PEM format representation to a Certificate, but 
> this has a defect.
> It assumes that unix line endings will be used.  If windows line endings were 
> used, the subsequent call to the certificate factory will fail.
> The following model operation is affected by this problem:
> ManagedPeerCertificateTrustStore#addCertificate()
> The workaround is to convert the input to unix line endings.
> The BEGIN/END certificate parsing code should also be enhanced to fail early 
> if it encounters a BEGIN without a corresponding END.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Closed] (QPID-6979) AttributeValueConverter's Certificate handling code assumes unix line endings

2016-01-14 Thread Keith Wall (JIRA)

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

Keith Wall closed QPID-6979.


> AttributeValueConverter's Certificate handling code assumes unix line endings
> -
>
> Key: QPID-6979
> URL: https://issues.apache.org/jira/browse/QPID-6979
> Project: Qpid
>  Issue Type: Bug
>  Components: Java Broker
>Reporter: Keith Wall
>Assignee: Keith Wall
>Priority: Minor
> Fix For: qpid-java-6.0.1, qpid-java-6.1
>
>
> The generic code {{AttributeValueConverter}} is used to instantiate model 
> attributes/model operation parameters of type Certificate.   It has the 
> ability to convert from a PEM format representation to a Certificate, but 
> this has a defect.
> It assumes that unix line endings will be used.  If windows line endings were 
> used, the subsequent call to the certificate factory will fail.
> The following model operation is affected by this problem:
> ManagedPeerCertificateTrustStore#addCertificate()
> The workaround is to convert the input to unix line endings.
> The BEGIN/END certificate parsing code should also be enhanced to fail early 
> if it encounters a BEGIN without a corresponding END.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Created] (QPID-6998) [Java Broker, BDBStore, HA] After HA Environment transition from MASTER into DETACHED/WAITING/UNKNOWN and back into MASTER the calls to Database instance created whilst E

2016-01-14 Thread Alex Rudyy (JIRA)
Alex Rudyy created QPID-6998:


 Summary: [Java Broker, BDBStore, HA] After HA Environment 
transition from MASTER into DETACHED/WAITING/UNKNOWN  and back into MASTER the 
calls to Database instance created whilst Environment was Master result in 
IllegalStateException
 Key: QPID-6998
 URL: https://issues.apache.org/jira/browse/QPID-6998
 Project: Qpid
  Issue Type: Bug
  Components: Java Broker
Affects Versions: qpid-java-6.0, 0.32, qpid-java-6.1
Reporter: Alex Rudyy


After HA Environment transition from MASTER into DETACHED/WAITING state and 
back into MASTER the calls to Database instance created whilst Environment was 
Master result in IllegalStateException followed by immediate Broker shutdown

The following was reported in the broker logs:
{noformat}

#
# Unhandled Exception org.apache.qpid.server.store.StoreException: Error 
getting AMQMessage with id 11 to database: Attempt to use non-open 
Environment object(). in Thread IO-/127.0.0.1:38948
#
# Exiting
#

org.apache.qpid.server.store.StoreException: Error getting AMQMessage with id 
11 to database: Attempt to use non-open Environment object().
 at 
org.apache.qpid.server.store.berkeleydb.replication.ReplicatedEnvironmentFacade.handleDatabaseException(ReplicatedEnvironmentFacade.java:457)
 at 
org.apache.qpid.server.store.berkeleydb.AbstractBDBMessageStore.getAllContent(AbstractBDBMessageStore.java:407)
 at 
org.apache.qpid.server.store.berkeleydb.AbstractBDBMessageStore$StoredBDBMessage.getContentAsByteBuffer(AbstractBDBMessageStore.java:1115)
 at 
org.apache.qpid.server.store.berkeleydb.AbstractBDBMessageStore$StoredBDBMessage.getContent(AbstractBDBMessageStore.java:1130)
 at 
org.apache.qpid.server.message.AbstractServerMessageImpl.getContent(AbstractServerMessageImpl.java:177)
 at 
org.apache.qpid.server.protocol.v0_8.ProtocolOutputConverterImpl$MessageContentSourceBody.writePayload(ProtocolOutputConverterImpl.java:261)
 at org.apache.qpid.framing.AMQFrame.writePayload(AMQFrame.java:69)
 at 
org.apache.qpid.server.protocol.v0_8.ProtocolOutputConverterImpl$CompositeAMQBodyBlock.writePayload(ProtocolOutputConverterImpl.java:459)
 at 
org.apache.qpid.server.protocol.v0_8.AMQPConnection_0_8.writeFrame(AMQPConnection_0_8.java:395)
 at 
org.apache.qpid.server.protocol.v0_8.ProtocolOutputConverterImpl.writeFrame(ProtocolOutputConverterImpl.java:416)
 at 
org.apache.qpid.server.protocol.v0_8.ProtocolOutputConverterImpl.writeMessageDeliveryUnchanged(ProtocolOutputConverterImpl.java:215)
 at 
org.apache.qpid.server.protocol.v0_8.ProtocolOutputConverterImpl.writeMessageDelivery(ProtocolOutputConverterImpl.java:138)
 at 
org.apache.qpid.server.protocol.v0_8.ProtocolOutputConverterImpl.writeMessageDelivery(ProtocolOutputConverterImpl.java:95)
 at 
org.apache.qpid.server.protocol.v0_8.ProtocolOutputConverterImpl.writeDeliver(ProtocolOutputConverterImpl.java:72)
 at 
org.apache.qpid.server.protocol.v0_8.AMQPConnection_0_8$WriteDeliverMethod.deliverToClient(AMQPConnection_0_8.java:1366)
 at 
org.apache.qpid.server.protocol.v0_8.ConsumerTarget_0_8.sendToClient(ConsumerTarget_0_8.java:449)
 at 
org.apache.qpid.server.protocol.v0_8.ConsumerTarget_0_8$AckConsumer.doSend(ConsumerTarget_0_8.java:275)
ERROR [IO-/127.0.0.1:38948] o.a.q.s.u.ServerScopedRuntimeException Error 
getting AMQMessage with id 11 to database: Attempt to use non-open 
Environment object().
java.lang.IllegalStateException: Attempt to use non-open Environment object().
at 
com.sleepycat.je.Environment.checkHandleIsValid(Environment.java:2193) 
~[je-5.0.104.jar:5.0.104]
at com.sleepycat.je.Database.checkEnv(Database.java:2148) 
~[je-5.0.104.jar:5.0.104]
at com.sleepycat.je.Database.get(Database.java:1266) 
~[je-5.0.104.jar:5.0.104]
at 
org.apache.qpid.server.store.berkeleydb.AbstractBDBMessageStore.getAllContent(AbstractBDBMessageStore.java:382)
 ~[qpid-bdbstore-6.1.0-SNAPSHOT.jar:6.1.0-SNAPSHOT]
at 
org.apache.qpid.server.store.berkeleydb.AbstractBDBMessageStore$StoredBDBMessage.getContentAsByteBuffer(AbstractBDBMessageStore.java:1115)
 [qpid-bdbstore-6.1.0-SNAPSHOT.jar:6.1.0-SNAPSHOT]
at 
org.apache.qpid.server.store.berkeleydb.AbstractBDBMessageStore$StoredBDBMessage.getContent(AbstractBDBMessageStore.java:1130)
 [qpid-bdbstore-6.1.0-SNAPSHOT.jar:6.1.0-SNAPSHOT]
at 
org.apache.qpid.server.message.AbstractServerMessageImpl.getContent(AbstractServerMessageImpl.java:177)
 [qpid-broker-core-6.1.0-SNAPSHOT.jar:6.1.0-SNAPSHOT]
at 
org.apache.qpid.server.protocol.v0_8.ProtocolOutputConverterImpl$MessageContentSourceBody.writePayload(ProtocolOutputConverterImpl.java:261)
 [qpid-broker-plugins-amqp-0-8-protocol-6.1.0-SNAPSHOT.jar:6.1.0-SNAPSHOT]
at 

[jira] [Updated] (QPID-6997) [Java Broker, BDBStore] HA JE Transaction commit might end up in NullPointerException when commit is invoked when majority is lost

2016-01-14 Thread Alex Rudyy (JIRA)

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

Alex Rudyy updated QPID-6997:
-
Attachment: 
TEST-org.apache.qpid.server.store.berkeleydb.replication.MultiNodeTest.testTransferMasterWhilstTransactionsInFlight.txt.NPE

> [Java Broker, BDBStore] HA JE Transaction commit might end up in 
> NullPointerException when commit is invoked when majority is lost
> --
>
> Key: QPID-6997
> URL: https://issues.apache.org/jira/browse/QPID-6997
> Project: Qpid
>  Issue Type: Bug
>  Components: Java Broker
>Affects Versions: qpid-java-6.0
>Reporter: Alex Rudyy
> Attachments: 
> TEST-org.apache.qpid.server.store.berkeleydb.replication.MultiNodeTest.testTransferMasterWhilstTransactionsInFlight.txt.NPE
>
>
> On running some tests for BDB HA  with default settings 
> (ReplicaAckPolicy=SIMPLE_MAJORITY) involving publishing messages in parallel 
> from multiple connections and disconnecting replica nodes in the middle of 
> publishing transactions, in some rare circumstances the publishing 
> transaction JE commit failed with NPE thrown from JE code as below:
> {noformat}
> 
> #
> # Unhandled Exception java.lang.NullPointerException in Thread 
> IO-/127.0.0.1:35408
> #
> # Exiting
> #
> 
> java.lang.NullPointerException
>  at 
> com.sleepycat.je.rep.stream.FeederTxns.awaitReplicaAcks(FeederTxns.java:130)
>  at com.sleepycat.je.rep.impl.RepImpl.postLogCommitHook(RepImpl.java:1130)
>  at com.sleepycat.je.rep.txn.MasterTxn.postLogCommitHook(MasterTxn.java:191)
>  at com.sleepycat.je.txn.Txn.commit(Txn.java:756)
>  at com.sleepycat.je.Transaction.doCommit(Transaction.java:609)
>  at com.sleepycat.je.Transaction.commit(Transaction.java:410)
>  at 
> org.apache.qpid.server.store.berkeleydb.replication.ReplicatedEnvironmentFacade.commitAsync(ReplicatedEnvironmentFacade.java:302)
>  at 
> org.apache.qpid.server.store.berkeleydb.AbstractBDBMessageStore.commitTranAsyncImpl(AbstractBDBMessageStore.java:794)
>  at 
> org.apache.qpid.server.store.berkeleydb.AbstractBDBMessageStore.access$1200(AbstractBDBMessageStore.java:74)
>  at 
> org.apache.qpid.server.store.berkeleydb.AbstractBDBMessageStore$BDBTransaction.commitTranAsync(AbstractBDBMessageStore.java:1364)
>  at 
> org.apache.qpid.server.txn.LocalTransaction.commitAsync(LocalTransaction.java:399)
>  at 
> org.apache.qpid.server.protocol.v0_8.AMQChannel.commit(AMQChannel.java:1220)
>  at 
> org.apache.qpid.server.protocol.v0_8.AMQChannel.receiveTxCommit(AMQChannel.java:3622)
>  at org.apache.qpid.codec.ServerDecoder.processMethod(ServerDecoder.java:228)
>  at org.apache.qpid.codec.AMQDecoder.processFrame(AMQDecoder.java:191)
>  at 
> org.apache.qpid.server.protocol.v0_8.BrokerDecoder.doProcessFrame(BrokerDecoder.java:114)
>  at 
> org.apache.qpid.server.protocol.v0_8.BrokerDecoder.access$000(BrokerDecoder.java:36)
>  at 
> org.apache.qpid.server.protocol.v0_8.BrokerDecoder$1.run(BrokerDecoder.java:78)
>  at 
> org.apache.qpid.server.protocol.v0_8.BrokerDecoder$1.run(BrokerDecoder.java:74)
>  at java.security.AccessController.doPrivileged(Native Method)
>  at 
> org.apache.qpid.server.protocol.v0_8.BrokerDecoder.processFrame(BrokerDecoder.java:73)
>  at org.apache.qpid.codec.AMQDecoder.processInput(AMQDecoder.java:173)
>  at org.apache.qpid.codec.AMQDecoder.decode(AMQDecoder.java:114)
>  at org.apache.qpid.codec.ServerDecoder.decodeBuffer(ServerDecoder.java:43)
>  at 
> org.apache.qpid.server.protocol.v0_8.AMQPConnection_0_8$1.run(AMQPConnection_0_8.java:266)
>  at 
> org.apache.qpid.server.protocol.v0_8.AMQPConnection_0_8$1.run(AMQPConnection_0_8.java:258)
>  at java.security.AccessController.doPrivileged(Native Method)
>  at 
> org.apache.qpid.server.protocol.v0_8.AMQPConnection_0_8.received(AMQPConnection_0_8.java:257)
>  at 
> org.apache.qpid.server.transport.MultiVersionProtocolEngine.received(MultiVersionProtocolEngine.java:142)
>  at 
> org.apache.qpid.server.transport.NonBlockingConnection.processAmqpData(NonBlockingConnection.java:547)
>  at 
> org.apache.qpid.server.transport.NonBlockingConnectionPlainDelegate.processData(NonBlockingConnectionPlainDelegate.java:58)
>  at 
> org.apache.qpid.server.transport.NonBlockingConnection.doRead(NonBlockingConnection.java:446)
>  at 
> org.apache.qpid.server.transport.NonBlockingConnection.doWork(NonBlockingConnection.java:253)
>  at 
> org.apache.qpid.server.transport.NetworkConnectionScheduler.processConnection(NetworkConnectionScheduler.java:108)
>  at 
> org.apache.qpid.server.transport.SelectorThread$ConnectionProcessor.processConnection(SelectorThread.java:499)
>  at 
> 

[jira] [Updated] (QPID-6998) [Java Broker, BDBStore, HA] After HA Environment transition from MASTER into DETACHED/WAITING/UNKNOWN and back into MASTER the calls to Database instance created whilst E

2016-01-14 Thread Alex Rudyy (JIRA)

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

Alex Rudyy updated QPID-6998:
-
Attachment: 
TEST-org.apache.qpid.server.store.berkeleydb.replication.MultiNodeTest.testInFlightTransactionsWhilstMajorityIsLost.txt.STALE_DB

> [Java Broker, BDBStore, HA] After HA Environment transition from MASTER into 
> DETACHED/WAITING/UNKNOWN  and back into MASTER the calls to Database instance 
> created whilst Environment was Master result in IllegalStateException
> 
>
> Key: QPID-6998
> URL: https://issues.apache.org/jira/browse/QPID-6998
> Project: Qpid
>  Issue Type: Bug
>  Components: Java Broker
>Affects Versions: 0.32, qpid-java-6.0, qpid-java-6.1
>Reporter: Alex Rudyy
> Attachments: 
> TEST-org.apache.qpid.server.store.berkeleydb.replication.MultiNodeTest.testInFlightTransactionsWhilstMajorityIsLost.txt.STALE_DB
>
>
> After HA Environment transition from MASTER into DETACHED/WAITING state and 
> back into MASTER the calls to Database instance created whilst Environment 
> was Master result in IllegalStateException followed by immediate Broker 
> shutdown
> The following was reported in the broker logs:
> {noformat}
> 
> #
> # Unhandled Exception org.apache.qpid.server.store.StoreException: Error 
> getting AMQMessage with id 11 to database: Attempt to use non-open 
> Environment object(). in Thread IO-/127.0.0.1:38948
> #
> # Exiting
> #
> 
> org.apache.qpid.server.store.StoreException: Error getting AMQMessage with id 
> 11 to database: Attempt to use non-open Environment object().
>  at 
> org.apache.qpid.server.store.berkeleydb.replication.ReplicatedEnvironmentFacade.handleDatabaseException(ReplicatedEnvironmentFacade.java:457)
>  at 
> org.apache.qpid.server.store.berkeleydb.AbstractBDBMessageStore.getAllContent(AbstractBDBMessageStore.java:407)
>  at 
> org.apache.qpid.server.store.berkeleydb.AbstractBDBMessageStore$StoredBDBMessage.getContentAsByteBuffer(AbstractBDBMessageStore.java:1115)
>  at 
> org.apache.qpid.server.store.berkeleydb.AbstractBDBMessageStore$StoredBDBMessage.getContent(AbstractBDBMessageStore.java:1130)
>  at 
> org.apache.qpid.server.message.AbstractServerMessageImpl.getContent(AbstractServerMessageImpl.java:177)
>  at 
> org.apache.qpid.server.protocol.v0_8.ProtocolOutputConverterImpl$MessageContentSourceBody.writePayload(ProtocolOutputConverterImpl.java:261)
>  at org.apache.qpid.framing.AMQFrame.writePayload(AMQFrame.java:69)
>  at 
> org.apache.qpid.server.protocol.v0_8.ProtocolOutputConverterImpl$CompositeAMQBodyBlock.writePayload(ProtocolOutputConverterImpl.java:459)
>  at 
> org.apache.qpid.server.protocol.v0_8.AMQPConnection_0_8.writeFrame(AMQPConnection_0_8.java:395)
>  at 
> org.apache.qpid.server.protocol.v0_8.ProtocolOutputConverterImpl.writeFrame(ProtocolOutputConverterImpl.java:416)
>  at 
> org.apache.qpid.server.protocol.v0_8.ProtocolOutputConverterImpl.writeMessageDeliveryUnchanged(ProtocolOutputConverterImpl.java:215)
>  at 
> org.apache.qpid.server.protocol.v0_8.ProtocolOutputConverterImpl.writeMessageDelivery(ProtocolOutputConverterImpl.java:138)
>  at 
> org.apache.qpid.server.protocol.v0_8.ProtocolOutputConverterImpl.writeMessageDelivery(ProtocolOutputConverterImpl.java:95)
>  at 
> org.apache.qpid.server.protocol.v0_8.ProtocolOutputConverterImpl.writeDeliver(ProtocolOutputConverterImpl.java:72)
>  at 
> org.apache.qpid.server.protocol.v0_8.AMQPConnection_0_8$WriteDeliverMethod.deliverToClient(AMQPConnection_0_8.java:1366)
>  at 
> org.apache.qpid.server.protocol.v0_8.ConsumerTarget_0_8.sendToClient(ConsumerTarget_0_8.java:449)
>  at 
> org.apache.qpid.server.protocol.v0_8.ConsumerTarget_0_8$AckConsumer.doSend(ConsumerTarget_0_8.java:275)
> ERROR [IO-/127.0.0.1:38948] o.a.q.s.u.ServerScopedRuntimeException Error 
> getting AMQMessage with id 11 to database: Attempt to use non-open 
> Environment object().
> java.lang.IllegalStateException: Attempt to use non-open Environment object().
> at 
> com.sleepycat.je.Environment.checkHandleIsValid(Environment.java:2193) 
> ~[je-5.0.104.jar:5.0.104]
> at com.sleepycat.je.Database.checkEnv(Database.java:2148) 
> ~[je-5.0.104.jar:5.0.104]
> at com.sleepycat.je.Database.get(Database.java:1266) 
> ~[je-5.0.104.jar:5.0.104]
> at 
> org.apache.qpid.server.store.berkeleydb.AbstractBDBMessageStore.getAllContent(AbstractBDBMessageStore.java:382)
>  ~[qpid-bdbstore-6.1.0-SNAPSHOT.jar:6.1.0-SNAPSHOT]
> at 
>