You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Howard Gao (JIRA)" <ji...@apache.org> on 2017/09/05 22:51:00 UTC

[jira] [Closed] (ARTEMIS-1376) AMQ224014: Failed to close session: java.lang.NullPointerException

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

Howard Gao closed ARTEMIS-1376.
-------------------------------
       Resolution: Duplicate
    Fix Version/s: 2.3.0

> AMQ224014: Failed to close session: java.lang.NullPointerException
> ------------------------------------------------------------------
>
>                 Key: ARTEMIS-1376
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-1376
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>          Components: Broker, OpenWire
>    Affects Versions: 2.3.0
>         Environment: commit b19637a3470308f2933d6fb28d8c5e1cc8600940 (HEAD -> master, upstream/master)
> Merge: 0a101c06a 90b7f075d
> Author: Clebert Suconic <cl...@apache.org>
> Date:   Tue Aug 29 09:17:25 2017 -0400
>     This closes #1494
>            Reporter: Jiri Danek
>             Fix For: 2.3.0
>
>
> During investigation of QPIDJMS-314 it was observed that the broker prints the following exception in the log for every OpenWire connection it gets.
> To reproduce, run the reproducer from the issue above, or any OpenWire test in the broker. For example, the following reproduces the issue {{org.apache.activemq.JMSConsumerTest}}
> The error does not seem to have any effects on functionality.
> {noformat}
> xxxxxxxxxxxx created transporttcp://localhost:61616
> [Thread-1 (activemq-netty-threads)] 15:33:00,532 WARN  [org.apache.activemq.artemis.core.server] AMQ222061: Client connection failed, clearing up resources for session 9389196d-8cbe-11e7-9123-cee70fc30b99
> [Thread-1 (activemq-netty-threads)] 15:33:00,533 ERROR [org.apache.activemq.artemis.core.server] AMQ224014: Failed to close session: java.lang.NullPointerException
> 	at org.apache.activemq.artemis.core.server.impl.ServerSessionImpl.doClose(ServerSessionImpl.java:351) [:]
> 	at org.apache.activemq.artemis.core.server.impl.ServerSessionImpl$1.done(ServerSessionImpl.java:1261) [:]
> 	at org.apache.activemq.artemis.core.persistence.impl.nullpm.NullStorageManager$2.executeOnCompletion(NullStorageManager.java:150) [:]
> 	at org.apache.activemq.artemis.core.server.impl.ServerSessionImpl.close(ServerSessionImpl.java:1253) [:]
> 	at org.apache.activemq.artemis.core.server.impl.ServerSessionImpl.connectionFailed(ServerSessionImpl.java:1532) [:]
> 	at org.apache.activemq.artemis.core.protocol.openwire.OpenWireConnection.callFailureListeners(OpenWireConnection.java:416) [:]
> 	at org.apache.activemq.artemis.core.protocol.openwire.OpenWireConnection.disconnect(OpenWireConnection.java:578) [:]
> 	at org.apache.activemq.artemis.core.protocol.openwire.OpenWireConnection.disconnect(OpenWireConnection.java:392) [:]
> 	at org.apache.activemq.artemis.core.protocol.openwire.OpenWireProtocolManager.removeConnection(OpenWireProtocolManager.java:170) [:]
> 	at org.apache.activemq.artemis.core.protocol.openwire.OpenWireConnection$CommandProcessor.processRemoveConnection(OpenWireConnection.java:1531) [:]
> 	at org.apache.activemq.command.RemoveInfo.visit(RemoveInfo.java:73) [activemq-client-5.14.0.jar:5.14.0]
> 	at org.apache.activemq.artemis.core.protocol.openwire.OpenWireConnection.bufferReceived(OpenWireConnection.java:273) [:]
> 	at org.apache.activemq.artemis.core.remoting.server.impl.RemotingServiceImpl$DelegatingBufferHandler.bufferReceived(RemotingServiceImpl.java:642) [:]
> 	at org.apache.activemq.artemis.core.remoting.impl.netty.ActiveMQChannelHandler.channelRead(ActiveMQChannelHandler.java:68) [:]
> 	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [netty-all-4.1.14.Final.jar:4.1.14.Final]
> 	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [netty-all-4.1.14.Final.jar:4.1.14.Final]
> 	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) [netty-all-4.1.14.Final.jar:4.1.14.Final]
> 	at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310) [netty-all-4.1.14.Final.jar:4.1.14.Final]
> 	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:284) [netty-all-4.1.14.Final.jar:4.1.14.Final]
> 	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [netty-all-4.1.14.Final.jar:4.1.14.Final]
> 	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [netty-all-4.1.14.Final.jar:4.1.14.Final]
> 	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) [netty-all-4.1.14.Final.jar:4.1.14.Final]
> 	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1342) [netty-all-4.1.14.Final.jar:4.1.14.Final]
> 	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [netty-all-4.1.14.Final.jar:4.1.14.Final]
> 	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [netty-all-4.1.14.Final.jar:4.1.14.Final]
> 	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:934) [netty-all-4.1.14.Final.jar:4.1.14.Final]
> 	at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:979) [netty-all-4.1.14.Final.jar:4.1.14.Final]
> 	at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:404) [netty-all-4.1.14.Final.jar:4.1.14.Final]
> 	at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:307) [netty-all-4.1.14.Final.jar:4.1.14.Final]
> 	at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858) [netty-all-4.1.14.Final.jar:4.1.14.Final]
> 	at java.lang.Thread.run(Thread.java:748) [rt.jar:1.8.0_141]
> [Thread-1 (activemq-netty-threads)] 15:33:00,533 WARN  [org.apache.activemq.artemis.core.server] AMQ222107: Cleared up resources for session 9389196d-8cbe-11e7-9123-cee70fc30b99
> [Thread-1 (activemq-netty-threads)] 15:33:00,533 WARN  [org.apache.activemq.artemis.core.server] AMQ222061: Client connection failed, clearing up resources for session ID:nixos-45801-1504013567125-21:1:-1
> [Thread-1 (activemq-netty-threads)] 15:33:00,533 WARN  [org.apache.activemq.artemis.core.server] AMQ222107: Cleared up resources for session ID:nixos-45801-1504013567125-21:1:-1
> [Thread-1 (activemq-netty-threads)] 15:33:00,543 WARN  [org.apache.activemq.artemis.core.server] AMQ222061: Client connection failed, clearing up resources for session ID:nixos-45801-1504013567125-21:1:1
> [Thread-1 (activemq-netty-threads)] 15:33:00,544 WARN  [org.apache.activemq.artemis.core.server] AMQ222107: Cleared up resources for session ID:nixos-45801-1504013567125-21:1:1
> broker is: org.apache.activemq.broker.artemiswrapper.ArtemisBrokerWrapper@7d4f9aae
> 2017-08-29 15:33:00,550 [main           ] - INFO  BrokerService                  - Apache ActiveMQ Artemis5.14.0 (localhost, Artemis Broker) is shutting down
> [main] 15:33:00,551 ERROR [org.apache.activemq.artemis.core.server] AMQ224014: Failed to close session: java.lang.NullPointerException
> 	at org.apache.activemq.artemis.core.server.impl.ServerSessionImpl.doClose(ServerSessionImpl.java:351) [:]
> 	at org.apache.activemq.artemis.core.server.impl.ServerSessionImpl$1.done(ServerSessionImpl.java:1261) [:]
> 	at org.apache.activemq.artemis.core.persistence.impl.nullpm.NullStorageManager$2.executeOnCompletion(NullStorageManager.java:150) [:]
> 	at org.apache.activemq.artemis.core.server.impl.ServerSessionImpl.close(ServerSessionImpl.java:1253) [:]
> 	at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.freezeConnections(ActiveMQServerImpl.java:1228) [:]
> 	at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.stop(ActiveMQServerImpl.java:1027) [:]
> 	at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.stop(ActiveMQServerImpl.java:953) [:]
> 	at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.stop(ActiveMQServerImpl.java:806) [:]
> 	at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.stop(ActiveMQServerImpl.java:800) [:]
> 	at org.apache.activemq.broker.artemiswrapper.ArtemisBrokerWrapper.stop(ArtemisBrokerWrapper.java:240) [:]
> 	at org.apache.activemq.broker.BrokerService.stop(BrokerService.java:199) [:5.14.0]
> 	at org.apache.activemq.JmsTestSupport.tearDown(JmsTestSupport.java:140) [:]
> 	at junit.framework.TestCase.runBare(TestCase.java:146) [junit-4.11.jar:]
> 	at org.apache.activemq.CombinationTestSupport.runBare(CombinationTestSupport.java:138) [:]
> 	at junit.framework.TestResult$1.protect(TestResult.java:122) [junit-4.11.jar:]
> 	at junit.framework.TestResult.runProtected(TestResult.java:142) [junit-4.11.jar:]
> 	at junit.framework.TestResult.run(TestResult.java:125) [junit-4.11.jar:]
> 	at junit.framework.TestCase.run(TestCase.java:129) [junit-4.11.jar:]
> 	at junit.framework.TestSuite.runTest(TestSuite.java:255) [junit-4.11.jar:]
> 	at junit.framework.TestSuite.run(TestSuite.java:250) [junit-4.11.jar:]
> 	at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:84) [junit-4.11.jar:]
> 	at org.junit.runner.JUnitCore.run(JUnitCore.java:160) [junit-4.11.jar:]
> 	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68) [junit-rt.jar:]
> 	at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47) [junit-rt.jar:]
> 	at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242) [junit-rt.jar:]
> 	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70) [junit-rt.jar:]
> [main] 15:33:00,552 ERROR [org.apache.activemq.artemis.core.server] AMQ224014: Failed to close session: java.lang.NullPointerException
> 	at org.apache.activemq.artemis.core.server.impl.ServerSessionImpl.doClose(ServerSessionImpl.java:351) [:]
> 	at org.apache.activemq.artemis.core.server.impl.ServerSessionImpl$1.done(ServerSessionImpl.java:1261) [:]
> 	at org.apache.activemq.artemis.core.persistence.impl.nullpm.NullStorageManager$2.executeOnCompletion(NullStorageManager.java:150) [:]
> 	at org.apache.activemq.artemis.core.server.impl.ServerSessionImpl.close(ServerSessionImpl.java:1253) [:]
> 	at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.closeAllServerSessions(ActiveMQServerImpl.java:1247) [:]
> 	at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.stop(ActiveMQServerImpl.java:1032) [:]
> 	at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.stop(ActiveMQServerImpl.java:953) [:]
> 	at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.stop(ActiveMQServerImpl.java:806) [:]
> 	at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.stop(ActiveMQServerImpl.java:800) [:]
> 	at org.apache.activemq.broker.artemiswrapper.ArtemisBrokerWrapper.stop(ArtemisBrokerWrapper.java:240) [:]
> 	at org.apache.activemq.broker.BrokerService.stop(BrokerService.java:199) [:5.14.0]
> 	at org.apache.activemq.JmsTestSupport.tearDown(JmsTestSupport.java:140) [:]
> 	at junit.framework.TestCase.runBare(TestCase.java:146) [junit-4.11.jar:]
> 	at org.apache.activemq.CombinationTestSupport.runBare(CombinationTestSupport.java:138) [:]
> 	at junit.framework.TestResult$1.protect(TestResult.java:122) [junit-4.11.jar:]
> 	at junit.framework.TestResult.runProtected(TestResult.java:142) [junit-4.11.jar:]
> 	at junit.framework.TestResult.run(TestResult.java:125) [junit-4.11.jar:]
> 	at junit.framework.TestCase.run(TestCase.java:129) [junit-4.11.jar:]
> 	at junit.framework.TestSuite.runTest(TestSuite.java:255) [junit-4.11.jar:]
> 	at junit.framework.TestSuite.run(TestSuite.java:250) [junit-4.11.jar:]
> 	at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:84) [junit-4.11.jar:]
> 	at org.junit.runner.JUnitCore.run(JUnitCore.java:160) [junit-4.11.jar:]
> 	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68) [junit-rt.jar:]
> 	at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47) [junit-rt.jar:]
> 	at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242) [junit-rt.jar:]
> 	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70) [junit-rt.jar:]
> [main] 15:33:00,574 INFO  [org.apache.activemq.artemis.core.server] AMQ221002: Apache ActiveMQ Artemis Message Broker version 2.3.0-SNAPSHOT [937431dc-8cbe-11e7-9123-cee70fc30b99] stopped, uptime 0.210 seconds
> {noformat}
> As you can see, the exception is printed twice. First when the client is connecting and disconnecting, and next time when the broker is shutting down. Because of how the test works, this is not really separated, but it is apparent when running the reproducer from the QPIDJMS issue.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)