qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Keith Wall (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (QPID-7675) [Java Broker] Runtime exception can be thrown by REST API on failure to create BDB HA Virtual Host Node
Date Tue, 07 Mar 2017 16:22:38 GMT

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

Keith Wall updated QPID-7675:
-----------------------------
    Description: 
RuntimeException is occasionally thrown on creation of BDB HA Virtual Host using REST API
when validation of existing node in group fails. The stack trace is provided below:

{noformat}
java.lang.RuntimeException: Cannot retrieve state for node 'myNode' (localhost:5000) from
group 'myGroup'
	at org.apache.qpid.server.store.berkeleydb.replication.ReplicatedEnvironmentFacade.connectToHelperNodeAndCheckPermittedHosts(ReplicatedEnvironmentFacade.java:1858)
~[qpid-bdbstore-6.1.1.jar:6.1.1]
	at org.apache.qpid.server.virtualhostnode.berkeleydb.BDBHAVirtualHostNodeImpl.getPermittedNodesFromHelper(BDBHAVirtualHostNodeImpl.java:564)
~[qpid-bdbstore-6.1.1.jar:6.1.1]
	at org.apache.qpid.server.virtualhostnode.berkeleydb.BDBHAVirtualHostNodeImpl.validateOnCreate(BDBHAVirtualHostNodeImpl.java:544)
~[qpid-bdbstore-6.1.1.jar:6.1.1]
	at org.apache.qpid.server.model.AbstractConfiguredObject$6.execute(AbstractConfiguredObject.java:847)
~[qpid-broker-core-6.1.1.jar:6.1.1]
	at org.apache.qpid.server.model.AbstractConfiguredObject$6.execute(AbstractConfiguredObject.java:834)
~[qpid-broker-core-6.1.1.jar:6.1.1]
	at org.apache.qpid.server.model.AbstractConfiguredObject$2.execute(AbstractConfiguredObject.java:632)
~[qpid-broker-core-6.1.1.jar:6.1.1]
	at org.apache.qpid.server.model.AbstractConfiguredObject$2.execute(AbstractConfiguredObject.java:625)
~[qpid-broker-core-6.1.1.jar:6.1.1]
	at org.apache.qpid.server.configuration.updater.TaskExecutorImpl$TaskLoggingWrapper.execute(TaskExecutorImpl.java:240)
~[qpid-broker-core-6.1.1.jar:6.1.1]
	at org.apache.qpid.server.configuration.updater.TaskExecutorImpl.submitWrappedTask(TaskExecutorImpl.java:157)
~[qpid-broker-core-6.1.1.jar:6.1.1]
	at org.apache.qpid.server.configuration.updater.TaskExecutorImpl.submit(TaskExecutorImpl.java:145)
~[qpid-broker-core-6.1.1.jar:6.1.1]
	at org.apache.qpid.server.model.AbstractConfiguredObject.doOnConfigThread(AbstractConfiguredObject.java:624)
~[qpid-broker-core-6.1.1.jar:6.1.1]
	at org.apache.qpid.server.model.AbstractConfiguredObject.createAsync(AbstractConfiguredObject.java:833)
~[qpid-broker-core-6.1.1.jar:6.1.1]
	at org.apache.qpid.server.model.AbstractConfiguredObjectTypeFactory.createAsync(AbstractConfiguredObjectTypeFactory.java:76)
~[qpid-broker-core-6.1.1.jar:6.1.1]
	at org.apache.qpid.server.model.ConfiguredObjectFactoryImpl.createAsync(ConfiguredObjectFactoryImpl.java:125)
~[qpid-broker-core-6.1.1.jar:6.1.1]
	at org.apache.qpid.server.model.BrokerImpl.createVirtualHostNodeAsync(BrokerImpl.java:601)
~[qpid-broker-core-6.1.1.jar:6.1.1]
	at org.apache.qpid.server.model.BrokerImpl.addChildAsync(BrokerImpl.java:655) ~[qpid-broker-core-6.1.1.jar:6.1.1]
	at org.apache.qpid.server.model.AbstractConfiguredObject$17.execute(AbstractConfiguredObject.java:2066)
~[qpid-broker-core-6.1.1.jar:6.1.1]
	at org.apache.qpid.server.model.AbstractConfiguredObject$17.execute(AbstractConfiguredObject.java:2061)
~[qpid-broker-core-6.1.1.jar:6.1.1]
	at org.apache.qpid.server.model.AbstractConfiguredObject$2.execute(AbstractConfiguredObject.java:632)
~[qpid-broker-core-6.1.1.jar:6.1.1]
	at org.apache.qpid.server.model.AbstractConfiguredObject$2.execute(AbstractConfiguredObject.java:625)
~[qpid-broker-core-6.1.1.jar:6.1.1]
	at org.apache.qpid.server.configuration.updater.TaskExecutorImpl$TaskLoggingWrapper.execute(TaskExecutorImpl.java:240)
~[qpid-broker-core-6.1.1.jar:6.1.1]
	at org.apache.qpid.server.configuration.updater.TaskExecutorImpl$CallableWrapper$1.run(TaskExecutorImpl.java:312)
~[qpid-broker-core-6.1.1.jar:6.1.1]
	at java.security.AccessController.doPrivileged(Native Method) ~[na:1.8.0_92]
	at javax.security.auth.Subject.doAs(Subject.java:360) ~[na:1.8.0_92]
	at org.apache.qpid.server.configuration.updater.TaskExecutorImpl$CallableWrapper.call(TaskExecutorImpl.java:305)
~[qpid-broker-core-6.1.1.jar:6.1.1]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_92]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[na:1.8.0_92]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[na:1.8.0_92]
	at java.lang.Thread.run(Thread.java:745) [na:1.8.0_92]
Caused by: com.sleepycat.je.rep.utilint.BinaryProtocol$ProtocolException: Expected message
type: class com.sleepycat.je.rep.impl.BinaryNodeStateProtocol$BinaryNodeStateResponse but
found: class com.sleepycat.je.rep.utilint.BinaryProtocol$ProtocolError
	at com.sleepycat.je.rep.utilint.BinaryProtocol.read(BinaryProtocol.java:516) ~[je-5.0.104.jar:5.0.104]
	at com.sleepycat.je.rep.util.DbPing.getNodeState(DbPing.java:203) ~[je-5.0.104.jar:5.0.104]
	at org.apache.qpid.server.store.berkeleydb.replication.ReplicatedEnvironmentFacade.getRemoteNodeState(ReplicatedEnvironmentFacade.java:1805)
~[qpid-bdbstore-6.1.1.jar:6.1.1]
	at org.apache.qpid.server.store.berkeleydb.replication.ReplicatedEnvironmentFacade.connectToHelperNodeAndCheckPermittedHosts(ReplicatedEnvironmentFacade.java:1844)
~[qpid-bdbstore-6.1.1.jar:6.1.1]
	... 28 common frames omitted
{noformat}

The RuntimeException is reported using html response having 500 status code. --The REST API
should not report validation failure in such way. The response code should be either 400 or
422 and response in json format should be generated in this case.--

  was:
RuntimeException is occasionally thrown on creation of BDB HA Virtual Host using REST API
when validation of existing node in group fails. The stack trace is provided below:

{noformat}
java.lang.RuntimeException: Cannot retrieve state for node 'myNode' (localhost:5000) from
group 'myGroup'
	at org.apache.qpid.server.store.berkeleydb.replication.ReplicatedEnvironmentFacade.connectToHelperNodeAndCheckPermittedHosts(ReplicatedEnvironmentFacade.java:1858)
~[qpid-bdbstore-6.1.1.jar:6.1.1]
	at org.apache.qpid.server.virtualhostnode.berkeleydb.BDBHAVirtualHostNodeImpl.getPermittedNodesFromHelper(BDBHAVirtualHostNodeImpl.java:564)
~[qpid-bdbstore-6.1.1.jar:6.1.1]
	at org.apache.qpid.server.virtualhostnode.berkeleydb.BDBHAVirtualHostNodeImpl.validateOnCreate(BDBHAVirtualHostNodeImpl.java:544)
~[qpid-bdbstore-6.1.1.jar:6.1.1]
	at org.apache.qpid.server.model.AbstractConfiguredObject$6.execute(AbstractConfiguredObject.java:847)
~[qpid-broker-core-6.1.1.jar:6.1.1]
	at org.apache.qpid.server.model.AbstractConfiguredObject$6.execute(AbstractConfiguredObject.java:834)
~[qpid-broker-core-6.1.1.jar:6.1.1]
	at org.apache.qpid.server.model.AbstractConfiguredObject$2.execute(AbstractConfiguredObject.java:632)
~[qpid-broker-core-6.1.1.jar:6.1.1]
	at org.apache.qpid.server.model.AbstractConfiguredObject$2.execute(AbstractConfiguredObject.java:625)
~[qpid-broker-core-6.1.1.jar:6.1.1]
	at org.apache.qpid.server.configuration.updater.TaskExecutorImpl$TaskLoggingWrapper.execute(TaskExecutorImpl.java:240)
~[qpid-broker-core-6.1.1.jar:6.1.1]
	at org.apache.qpid.server.configuration.updater.TaskExecutorImpl.submitWrappedTask(TaskExecutorImpl.java:157)
~[qpid-broker-core-6.1.1.jar:6.1.1]
	at org.apache.qpid.server.configuration.updater.TaskExecutorImpl.submit(TaskExecutorImpl.java:145)
~[qpid-broker-core-6.1.1.jar:6.1.1]
	at org.apache.qpid.server.model.AbstractConfiguredObject.doOnConfigThread(AbstractConfiguredObject.java:624)
~[qpid-broker-core-6.1.1.jar:6.1.1]
	at org.apache.qpid.server.model.AbstractConfiguredObject.createAsync(AbstractConfiguredObject.java:833)
~[qpid-broker-core-6.1.1.jar:6.1.1]
	at org.apache.qpid.server.model.AbstractConfiguredObjectTypeFactory.createAsync(AbstractConfiguredObjectTypeFactory.java:76)
~[qpid-broker-core-6.1.1.jar:6.1.1]
	at org.apache.qpid.server.model.ConfiguredObjectFactoryImpl.createAsync(ConfiguredObjectFactoryImpl.java:125)
~[qpid-broker-core-6.1.1.jar:6.1.1]
	at org.apache.qpid.server.model.BrokerImpl.createVirtualHostNodeAsync(BrokerImpl.java:601)
~[qpid-broker-core-6.1.1.jar:6.1.1]
	at org.apache.qpid.server.model.BrokerImpl.addChildAsync(BrokerImpl.java:655) ~[qpid-broker-core-6.1.1.jar:6.1.1]
	at org.apache.qpid.server.model.AbstractConfiguredObject$17.execute(AbstractConfiguredObject.java:2066)
~[qpid-broker-core-6.1.1.jar:6.1.1]
	at org.apache.qpid.server.model.AbstractConfiguredObject$17.execute(AbstractConfiguredObject.java:2061)
~[qpid-broker-core-6.1.1.jar:6.1.1]
	at org.apache.qpid.server.model.AbstractConfiguredObject$2.execute(AbstractConfiguredObject.java:632)
~[qpid-broker-core-6.1.1.jar:6.1.1]
	at org.apache.qpid.server.model.AbstractConfiguredObject$2.execute(AbstractConfiguredObject.java:625)
~[qpid-broker-core-6.1.1.jar:6.1.1]
	at org.apache.qpid.server.configuration.updater.TaskExecutorImpl$TaskLoggingWrapper.execute(TaskExecutorImpl.java:240)
~[qpid-broker-core-6.1.1.jar:6.1.1]
	at org.apache.qpid.server.configuration.updater.TaskExecutorImpl$CallableWrapper$1.run(TaskExecutorImpl.java:312)
~[qpid-broker-core-6.1.1.jar:6.1.1]
	at java.security.AccessController.doPrivileged(Native Method) ~[na:1.8.0_92]
	at javax.security.auth.Subject.doAs(Subject.java:360) ~[na:1.8.0_92]
	at org.apache.qpid.server.configuration.updater.TaskExecutorImpl$CallableWrapper.call(TaskExecutorImpl.java:305)
~[qpid-broker-core-6.1.1.jar:6.1.1]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_92]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[na:1.8.0_92]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[na:1.8.0_92]
	at java.lang.Thread.run(Thread.java:745) [na:1.8.0_92]
Caused by: com.sleepycat.je.rep.utilint.BinaryProtocol$ProtocolException: Expected message
type: class com.sleepycat.je.rep.impl.BinaryNodeStateProtocol$BinaryNodeStateResponse but
found: class com.sleepycat.je.rep.utilint.BinaryProtocol$ProtocolError
	at com.sleepycat.je.rep.utilint.BinaryProtocol.read(BinaryProtocol.java:516) ~[je-5.0.104.jar:5.0.104]
	at com.sleepycat.je.rep.util.DbPing.getNodeState(DbPing.java:203) ~[je-5.0.104.jar:5.0.104]
	at org.apache.qpid.server.store.berkeleydb.replication.ReplicatedEnvironmentFacade.getRemoteNodeState(ReplicatedEnvironmentFacade.java:1805)
~[qpid-bdbstore-6.1.1.jar:6.1.1]
	at org.apache.qpid.server.store.berkeleydb.replication.ReplicatedEnvironmentFacade.connectToHelperNodeAndCheckPermittedHosts(ReplicatedEnvironmentFacade.java:1844)
~[qpid-bdbstore-6.1.1.jar:6.1.1]
	... 28 common frames omitted
{noformat}

The RuntimeException is reported using html response having 500 status code. The REST API
should not report validation failure in such way. The response code should be either 400 or
422 and response in json format should be generated in this case.


> [Java Broker] Runtime exception can be thrown by REST API on failure to create BDB HA
Virtual Host Node
> -------------------------------------------------------------------------------------------------------
>
>                 Key: QPID-7675
>                 URL: https://issues.apache.org/jira/browse/QPID-7675
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Broker
>    Affects Versions: 0.32, qpid-java-6.0, qpid-java-6.0.1, qpid-java-6.0.2, qpid-java-6.0.3,
qpid-java-6.0.4, qpid-java-6.0.5, qpid-java-6.1, qpid-java-6.0.6, qpid-java-6.1.1
>            Reporter: Alex Rudyy
>            Assignee: Keith Wall
>            Priority: Minor
>             Fix For: qpid-java-7.0, qpid-java-6.1.2, qpid-java-6.0.7
>
>         Attachments: 0001-QPID-7675-Java-Broker-Improve-handling-and-reporting.patch
>
>
> RuntimeException is occasionally thrown on creation of BDB HA Virtual Host using REST
API when validation of existing node in group fails. The stack trace is provided below:
> {noformat}
> java.lang.RuntimeException: Cannot retrieve state for node 'myNode' (localhost:5000)
from group 'myGroup'
> 	at org.apache.qpid.server.store.berkeleydb.replication.ReplicatedEnvironmentFacade.connectToHelperNodeAndCheckPermittedHosts(ReplicatedEnvironmentFacade.java:1858)
~[qpid-bdbstore-6.1.1.jar:6.1.1]
> 	at org.apache.qpid.server.virtualhostnode.berkeleydb.BDBHAVirtualHostNodeImpl.getPermittedNodesFromHelper(BDBHAVirtualHostNodeImpl.java:564)
~[qpid-bdbstore-6.1.1.jar:6.1.1]
> 	at org.apache.qpid.server.virtualhostnode.berkeleydb.BDBHAVirtualHostNodeImpl.validateOnCreate(BDBHAVirtualHostNodeImpl.java:544)
~[qpid-bdbstore-6.1.1.jar:6.1.1]
> 	at org.apache.qpid.server.model.AbstractConfiguredObject$6.execute(AbstractConfiguredObject.java:847)
~[qpid-broker-core-6.1.1.jar:6.1.1]
> 	at org.apache.qpid.server.model.AbstractConfiguredObject$6.execute(AbstractConfiguredObject.java:834)
~[qpid-broker-core-6.1.1.jar:6.1.1]
> 	at org.apache.qpid.server.model.AbstractConfiguredObject$2.execute(AbstractConfiguredObject.java:632)
~[qpid-broker-core-6.1.1.jar:6.1.1]
> 	at org.apache.qpid.server.model.AbstractConfiguredObject$2.execute(AbstractConfiguredObject.java:625)
~[qpid-broker-core-6.1.1.jar:6.1.1]
> 	at org.apache.qpid.server.configuration.updater.TaskExecutorImpl$TaskLoggingWrapper.execute(TaskExecutorImpl.java:240)
~[qpid-broker-core-6.1.1.jar:6.1.1]
> 	at org.apache.qpid.server.configuration.updater.TaskExecutorImpl.submitWrappedTask(TaskExecutorImpl.java:157)
~[qpid-broker-core-6.1.1.jar:6.1.1]
> 	at org.apache.qpid.server.configuration.updater.TaskExecutorImpl.submit(TaskExecutorImpl.java:145)
~[qpid-broker-core-6.1.1.jar:6.1.1]
> 	at org.apache.qpid.server.model.AbstractConfiguredObject.doOnConfigThread(AbstractConfiguredObject.java:624)
~[qpid-broker-core-6.1.1.jar:6.1.1]
> 	at org.apache.qpid.server.model.AbstractConfiguredObject.createAsync(AbstractConfiguredObject.java:833)
~[qpid-broker-core-6.1.1.jar:6.1.1]
> 	at org.apache.qpid.server.model.AbstractConfiguredObjectTypeFactory.createAsync(AbstractConfiguredObjectTypeFactory.java:76)
~[qpid-broker-core-6.1.1.jar:6.1.1]
> 	at org.apache.qpid.server.model.ConfiguredObjectFactoryImpl.createAsync(ConfiguredObjectFactoryImpl.java:125)
~[qpid-broker-core-6.1.1.jar:6.1.1]
> 	at org.apache.qpid.server.model.BrokerImpl.createVirtualHostNodeAsync(BrokerImpl.java:601)
~[qpid-broker-core-6.1.1.jar:6.1.1]
> 	at org.apache.qpid.server.model.BrokerImpl.addChildAsync(BrokerImpl.java:655) ~[qpid-broker-core-6.1.1.jar:6.1.1]
> 	at org.apache.qpid.server.model.AbstractConfiguredObject$17.execute(AbstractConfiguredObject.java:2066)
~[qpid-broker-core-6.1.1.jar:6.1.1]
> 	at org.apache.qpid.server.model.AbstractConfiguredObject$17.execute(AbstractConfiguredObject.java:2061)
~[qpid-broker-core-6.1.1.jar:6.1.1]
> 	at org.apache.qpid.server.model.AbstractConfiguredObject$2.execute(AbstractConfiguredObject.java:632)
~[qpid-broker-core-6.1.1.jar:6.1.1]
> 	at org.apache.qpid.server.model.AbstractConfiguredObject$2.execute(AbstractConfiguredObject.java:625)
~[qpid-broker-core-6.1.1.jar:6.1.1]
> 	at org.apache.qpid.server.configuration.updater.TaskExecutorImpl$TaskLoggingWrapper.execute(TaskExecutorImpl.java:240)
~[qpid-broker-core-6.1.1.jar:6.1.1]
> 	at org.apache.qpid.server.configuration.updater.TaskExecutorImpl$CallableWrapper$1.run(TaskExecutorImpl.java:312)
~[qpid-broker-core-6.1.1.jar:6.1.1]
> 	at java.security.AccessController.doPrivileged(Native Method) ~[na:1.8.0_92]
> 	at javax.security.auth.Subject.doAs(Subject.java:360) ~[na:1.8.0_92]
> 	at org.apache.qpid.server.configuration.updater.TaskExecutorImpl$CallableWrapper.call(TaskExecutorImpl.java:305)
~[qpid-broker-core-6.1.1.jar:6.1.1]
> 	at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_92]
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[na:1.8.0_92]
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[na:1.8.0_92]
> 	at java.lang.Thread.run(Thread.java:745) [na:1.8.0_92]
> Caused by: com.sleepycat.je.rep.utilint.BinaryProtocol$ProtocolException: Expected message
type: class com.sleepycat.je.rep.impl.BinaryNodeStateProtocol$BinaryNodeStateResponse but
found: class com.sleepycat.je.rep.utilint.BinaryProtocol$ProtocolError
> 	at com.sleepycat.je.rep.utilint.BinaryProtocol.read(BinaryProtocol.java:516) ~[je-5.0.104.jar:5.0.104]
> 	at com.sleepycat.je.rep.util.DbPing.getNodeState(DbPing.java:203) ~[je-5.0.104.jar:5.0.104]
> 	at org.apache.qpid.server.store.berkeleydb.replication.ReplicatedEnvironmentFacade.getRemoteNodeState(ReplicatedEnvironmentFacade.java:1805)
~[qpid-bdbstore-6.1.1.jar:6.1.1]
> 	at org.apache.qpid.server.store.berkeleydb.replication.ReplicatedEnvironmentFacade.connectToHelperNodeAndCheckPermittedHosts(ReplicatedEnvironmentFacade.java:1844)
~[qpid-bdbstore-6.1.1.jar:6.1.1]
> 	... 28 common frames omitted
> {noformat}
> The RuntimeException is reported using html response having 500 status code. --The REST
API should not report validation failure in such way. The response code should be either 400
or 422 and response in json format should be generated in this case.--



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

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


Mime
View raw message