[jboss-jira] [JBoss JIRA] (WFLY-4866) messaging-activemq: NPE when http-acceptor and https-acceptor configured

Miroslav Novak (JIRA) issues at jboss.org
Wed Oct 7 10:44:00 EDT 2015


    [ https://issues.jboss.org/browse/WFLY-4866?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13116022#comment-13116022 ] 

Miroslav Novak edited comment on WFLY-4866 at 10/7/15 10:43 AM:
----------------------------------------------------------------

I've hit this problem in one of the failover tests with EAP 7.0.0.DR11/Wildfly 10 CR2 (Artemis 1.1.0). It happens in failover scenario with dedicated shared store.

1. Start 2 EAP 7 DR11/Widlfy 10 CR2 servers with Artemis in dedicated topology with shared store. There is queue testQueue0 deployed.
-- 1st server is configured as live, 2nd server is backup
2. Start 3 producers and 1 consumer connected to live 
3. Kill live so backup activates and clients failover to it

Once live is killed in step 3. and backup activates then NPEs are thrown in log of backup server:
{code}
10:18:04,103 ERROR [org.xnio.listener] (default I/O-10) XNIO001007: A channel event listener threw an exception: java.lang.NullPointerException
        at org.wildfly.extension.messaging.activemq.HTTPUpgradeService$2.handleEvent(HTTPUpgradeService.java:154)
        at org.wildfly.extension.messaging.activemq.HTTPUpgradeService$2.handleEvent(HTTPUpgradeService.java:146)
        at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92) [xnio-api-3.3.2.Final.jar:3.3.2.Final]
        at io.undertow.server.handlers.ChannelUpgradeHandler$1.handleUpgrade(ChannelUpgradeHandler.java:149)
        at io.undertow.server.protocol.http.HttpReadListener.exchangeComplete(HttpReadListener.java:350)
        at io.undertow.server.protocol.http.HttpServerConnection.exchangeComplete(HttpServerConnection.java:225)
        at io.undertow.server.HttpServerExchange.invokeExchangeCompleteListeners(HttpServerExchange.java:1202)
        at io.undertow.server.HttpServerExchange.terminateResponse(HttpServerExchange.java:1479)
        at io.undertow.server.Connectors.terminateResponse(Connectors.java:99)
        at io.undertow.server.protocol.http.HttpTransferEncoding$3.handleEvent(HttpTransferEncoding.java:197)
        at io.undertow.server.protocol.http.HttpTransferEncoding$3.handleEvent(HttpTransferEncoding.java:195)
        at io.undertow.conduits.HeadStreamSinkConduit.exitFlush(HeadStreamSinkConduit.java:178)
        at io.undertow.conduits.HeadStreamSinkConduit.flush(HeadStreamSinkConduit.java:122)
        at org.xnio.conduits.ConduitStreamSinkChannel.flush(ConduitStreamSinkChannel.java:162) [xnio-api-3.3.2.Final.jar:3.3.2.Final]
        at io.undertow.channels.DetachableStreamSinkChannel.flush(DetachableStreamSinkChannel.java:119)
        at io.undertow.server.HttpServerExchange.closeAndFlushResponse(HttpServerExchange.java:1628)
        at io.undertow.server.HttpServerExchange.endExchange(HttpServerExchange.java:1606)
        at io.undertow.server.handlers.ChannelUpgradeHandler.handleRequest(ChannelUpgradeHandler.java:152)
        at io.undertow.server.Connectors.executeRootHandler(Connectors.java:198)
        at io.undertow.server.protocol.http.HttpReadListener.handleEventWithNoRunningRequest(HttpReadListener.java:227)
        at io.undertow.server.protocol.http.HttpReadListener.handleEvent(HttpReadListener.java:128)
        at io.undertow.server.protocol.http.HttpReadListener.handleEvent(HttpReadListener.java:56)
        at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92) [xnio-api-3.3.2.Final.jar:3.3.2.Final]
        at org.xnio.conduits.ReadReadyHandler$ChannelListenerHandler.readReady(ReadReadyHandler.java:66) [xnio-api-3.3.2.Final.jar:3.3.2.Final]
        at org.xnio.nio.NioSocketConduit.handleReady(NioSocketConduit.java:88) [xnio-nio-3.3.2.Final.jar:3.3.2.Final]
        at org.xnio.nio.WorkerThread.run(WorkerThread.java:539) [xnio-nio-3.3.2.Final.jar:3.3.2.Final]
{code}

I'm attaching trace logs from both of the servers - server-logs.zip

Note that no "ssh" http acceptor was configured in this case.


was (Author: mnovak):
I've hit this problem in one of the failover tests with EAP 7.0.0.DR11/Wildfly 10 CR2 (Artemis 1.1.0). It happens in failover scenario with dedicated shared store.

1. Start 2 EAP 7 DR11/Widlfy 10 CR2 servers with Artemis in dedicated topology with shared store. There is queue testQueue0 deployed.
-- 1st server is configured as live, 2nd server is backup
2. Start 3 producers and 1 consumer connected to live 
3. Kill live so backup activates and clients failover to it

Once live is killed in step 3. and backup activates then NPEs are thrown in log of backup server:
{code}
10:18:04,103 ERROR [org.xnio.listener] (default I/O-10) XNIO001007: A channel event listener threw an exception: java.lang.NullPointerException
        at org.wildfly.extension.messaging.activemq.HTTPUpgradeService$2.handleEvent(HTTPUpgradeService.java:154)
        at org.wildfly.extension.messaging.activemq.HTTPUpgradeService$2.handleEvent(HTTPUpgradeService.java:146)
        at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92) [xnio-api-3.3.2.Final.jar:3.3.2.Final]
        at io.undertow.server.handlers.ChannelUpgradeHandler$1.handleUpgrade(ChannelUpgradeHandler.java:149)
        at io.undertow.server.protocol.http.HttpReadListener.exchangeComplete(HttpReadListener.java:350)
        at io.undertow.server.protocol.http.HttpServerConnection.exchangeComplete(HttpServerConnection.java:225)
        at io.undertow.server.HttpServerExchange.invokeExchangeCompleteListeners(HttpServerExchange.java:1202)
        at io.undertow.server.HttpServerExchange.terminateResponse(HttpServerExchange.java:1479)
        at io.undertow.server.Connectors.terminateResponse(Connectors.java:99)
        at io.undertow.server.protocol.http.HttpTransferEncoding$3.handleEvent(HttpTransferEncoding.java:197)
        at io.undertow.server.protocol.http.HttpTransferEncoding$3.handleEvent(HttpTransferEncoding.java:195)
        at io.undertow.conduits.HeadStreamSinkConduit.exitFlush(HeadStreamSinkConduit.java:178)
        at io.undertow.conduits.HeadStreamSinkConduit.flush(HeadStreamSinkConduit.java:122)
        at org.xnio.conduits.ConduitStreamSinkChannel.flush(ConduitStreamSinkChannel.java:162) [xnio-api-3.3.2.Final.jar:3.3.2.Final]
        at io.undertow.channels.DetachableStreamSinkChannel.flush(DetachableStreamSinkChannel.java:119)
        at io.undertow.server.HttpServerExchange.closeAndFlushResponse(HttpServerExchange.java:1628)
        at io.undertow.server.HttpServerExchange.endExchange(HttpServerExchange.java:1606)
        at io.undertow.server.handlers.ChannelUpgradeHandler.handleRequest(ChannelUpgradeHandler.java:152)
        at io.undertow.server.Connectors.executeRootHandler(Connectors.java:198)
        at io.undertow.server.protocol.http.HttpReadListener.handleEventWithNoRunningRequest(HttpReadListener.java:227)
        at io.undertow.server.protocol.http.HttpReadListener.handleEvent(HttpReadListener.java:128)
        at io.undertow.server.protocol.http.HttpReadListener.handleEvent(HttpReadListener.java:56)
        at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92) [xnio-api-3.3.2.Final.jar:3.3.2.Final]
        at org.xnio.conduits.ReadReadyHandler$ChannelListenerHandler.readReady(ReadReadyHandler.java:66) [xnio-api-3.3.2.Final.jar:3.3.2.Final]
        at org.xnio.nio.NioSocketConduit.handleReady(NioSocketConduit.java:88) [xnio-nio-3.3.2.Final.jar:3.3.2.Final]
        at org.xnio.nio.WorkerThread.run(WorkerThread.java:539) [xnio-nio-3.3.2.Final.jar:3.3.2.Final]
{code}

I'm attaching trace logs from both of the servers - server-logs.zip

> messaging-activemq: NPE when http-acceptor and https-acceptor configured
> ------------------------------------------------------------------------
>
>                 Key: WFLY-4866
>                 URL: https://issues.jboss.org/browse/WFLY-4866
>             Project: WildFly
>          Issue Type: Bug
>          Components: JMS
>    Affects Versions: 8.1.0.Final, 10.0.0.CR2
>         Environment: Windows 7 Pro, Java 7u55
>            Reporter: Jeff Mesnil
>            Assignee: Jeff Mesnil
>              Labels: JMS, Messaging
>         Attachments: server-logs.zip
>
>
> With both an http-acceptor and an https-acceptor configured in the message subsystem, when an external Java app attempts to connect, it times out and the exception below appears in the server log.
> I tracked it down to the TransportConfigOperationHandlers.processAcceptors() method. At the end of the method, it creates a HashSet of the TransportConfiguration objects representing the acceptors. But, the TransportConfiguration equals() method reports that the https and http acceptors are equal, and as it is building a Set of unique values, the https-acceptor gets dropped.
> Later, when the http-upgrade handshake runs, the code is unable to find the https-acceptor, resulting in the NullPointerException.
> I think the fix might be to either not use a Set, or to look at the TransportConfiguration.equals() method.
> The workaround in the ticket works because the redundant <param> causes the equals() method to see the two acceptors as unequal.
> The exception was:
>      [exec] 10:07:57,502 ERROR [org.xnio.listener] (default I/O-10) XNIO001007: A channel event listener threw an exception: java.lang.NullPointerException
>      [exec] 	at org.jboss.as.messaging.HTTPUpgradeService$2.handleEvent(HTTPUpgradeService.java:161)
>      [exec] 	at org.jboss.as.messaging.HTTPUpgradeService$2.handleEvent(HTTPUpgradeService.java:153)
>      [exec] 	at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92) [xnio-api-3.2.2.Final.jar:3.2.2.Final]
>      [exec] 	at io.undertow.server.handlers.ChannelUpgradeHandler$1.handleUpgrade(ChannelUpgradeHandler.java:149)
>      [exec] 	at io.undertow.server.protocol.http.HttpReadListener.exchangeComplete(HttpReadListener.java:271)
>      [exec] 	at io.undertow.server.protocol.http.HttpServerConnection.exchangeComplete(HttpServerConnection.java:221)
>      [exec] 	at io.undertow.server.HttpServerExchange.invokeExchangeCompleteListeners(HttpServerExchange.java:1131)
>      [exec] 	at io.undertow.server.HttpServerExchange.terminateResponse(HttpServerExchange.java:1351)
>      [exec] 	at io.undertow.server.Connectors.terminateResponse(Connectors.java:78)
>      [exec] 	at io.undertow.server.protocol.http.ServerFixedLengthStreamSinkConduit.channelFinished(ServerFixedLengthStreamSinkConduit.java:33)
>      [exec] 	at io.undertow.conduits.AbstractFixedLengthStreamSinkConduit.exitFlush(AbstractFixedLengthStreamSinkConduit.java:273)
>      [exec] 	at io.undertow.conduits.AbstractFixedLengthStreamSinkConduit.flush(AbstractFixedLengthStreamSinkConduit.java:207)
>      [exec] 	at org.xnio.conduits.ConduitStreamSinkChannel.flush(ConduitStreamSinkChannel.java:162) [xnio-api-3.2.2.Final.jar:3.2.2.Final]
>      [exec] 	at io.undertow.channels.DetachableStreamSinkChannel.flush(DetachableStreamSinkChannel.java:100)
>      [exec] 	at io.undertow.server.HttpServerExchange.closeAndFlushResponse(HttpServerExchange.java:1489)
>      [exec] 	at io.undertow.server.HttpServerExchange.endExchange(HttpServerExchange.java:1470)
>      [exec] 	at io.undertow.server.handlers.ChannelUpgradeHandler.handleRequest(ChannelUpgradeHandler.java:152)
>      [exec] 	at io.undertow.server.handlers.ProxyPeerAddressHandler.handleRequest(ProxyPeerAddressHandler.java:45)
>      [exec] 	at io.undertow.server.Connectors.executeRootHandler(Connectors.java:177)
>      [exec] 	at io.undertow.server.protocol.http.HttpReadListener.handleEventWithNoRunningRequest(HttpReadListener.java:156)
>      [exec] 	at io.undertow.server.protocol.http.HttpReadListener.handleEvent(HttpReadListener.java:91)
>      [exec] 	at io.undertow.server.protocol.http.HttpReadListener.handleEvent(HttpReadListener.java:45)
>      [exec] 	at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92) [xnio-api-3.2.2.Final.jar:3.2.2.Final]
>      [exec] 	at org.xnio.conduits.ReadReadyHandler$ChannelListenerHandler.readReady(ReadReadyHandler.java:66) [xnio-api-3.2.2.Final.jar:3.2.2.Final]
>      [exec] 	at org.xnio.nio.NioSocketConduit.handleReady(NioSocketConduit.java:87) [xnio-nio-3.2.2.Final.jar:3.2.2.Final]
>      [exec] 	at org.xnio.nio.WorkerThread.run(WorkerThread.java:539) [xnio-nio-3.2.2.Final.jar:3.2.2.Final]



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the jboss-jira mailing list