Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 69275200D08 for ; Wed, 6 Sep 2017 22:34:06 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 67E731609C5; Wed, 6 Sep 2017 20:34:06 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 657E91609BA for ; Wed, 6 Sep 2017 22:34:05 +0200 (CEST) Received: (qmail 19703 invoked by uid 500); 6 Sep 2017 20:34:03 -0000 Mailing-List: contact issues-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list issues@activemq.apache.org Received: (qmail 19693 invoked by uid 99); 6 Sep 2017 20:34:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Sep 2017 20:34:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 96142CD294 for ; Wed, 6 Sep 2017 20:34:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id LamJU2ctO0hj for ; Wed, 6 Sep 2017 20:34:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id F08D15FDA1 for ; Wed, 6 Sep 2017 20:34:00 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 752C2E00C9 for ; Wed, 6 Sep 2017 20:34:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 2F57423F0D for ; Wed, 6 Sep 2017 20:34:00 +0000 (UTC) Date: Wed, 6 Sep 2017 20:34:00 +0000 (UTC) From: "Jiri Danek (JIRA)" To: issues@activemq.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (ARTEMIS-1398) MQTT client sending wrong password will hang indefinitely, broker logs Error disconnecting client: null MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 06 Sep 2017 20:34:06 -0000 [ https://issues.apache.org/jira/browse/ARTEMIS-1398?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jiri Danek updated ARTEMIS-1398: -------------------------------- Issue Type: Bug (was: New Feature) > MQTT client sending wrong password will hang indefinitely, broker logs Error disconnecting client: null > ------------------------------------------------------------------------------------------------------- > > Key: ARTEMIS-1398 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1398 > Project: ActiveMQ Artemis > Issue Type: Bug > Components: MQTT > Affects Versions: 2.4.0 > Environment: commit 53a9c9b47b8c64ff2c0f2c6be40a1cf5984e5e8b (HEAD -> master, upstream/master) > Merge: 49ef04b6f d2dcf1bba > Author: Clebert Suconic > Date: Wed Sep 6 10:30:13 2017 -0400 > This closes #1513 > Reporter: Jiri Danek > > MQTT client sending wrong password will hang indefinitely, broker logs Error disconnecting client: null > If I disable anonymous login on broker and my MQTT client provides invalid credentials, then the broker is not able to kick the client and close connection. The {{Error disconnecting client: null}} is printed twice, then broker prints > {noformat} > 21:59:29,758 DEBUG [org.apache.activemq.artemis.core.remoting.server.impl.RemotingServiceImpl] RemotingServiceImpl::removing connection ID e08f927f > {noformat} > but still the client is stuck in {{connection.connect();}} method. > See the attached test case for a reproducer. > {noformat} > [Thread-1 (activemq-netty-threads)] 22:23:33,072 DEBUG [org.apache.activemq.artemis.core.protocol.mqtt] SESSION CREATED: 7aea3e70-3f7d-493b-94c1-a108d275e01b > [Thread-1 (activemq-netty-threads)] 22:23:33,097 DEBUG [org.apache.activemq.artemis.spi.core.security.jaas.InVMLoginModule] abort > [Thread-1 (activemq-netty-threads)] 22:23:33,097 DEBUG [org.apache.activemq.artemis.spi.core.security.ActiveMQJAASSecurityManager] Couldn't validate user: javax.security.auth.login.FailedLoginException: Password does not match > at org.apache.activemq.artemis.spi.core.security.jaas.InVMLoginModule.login(InVMLoginModule.java:92) [:] > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_141] > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_141] > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_141] > at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_141] > at javax.security.auth.login.LoginContext.invoke(LoginContext.java:755) [rt.jar:1.8.0_141] > at javax.security.auth.login.LoginContext.access$000(LoginContext.java:195) [rt.jar:1.8.0_141] > at javax.security.auth.login.LoginContext$4.run(LoginContext.java:682) [rt.jar:1.8.0_141] > at javax.security.auth.login.LoginContext$4.run(LoginContext.java:680) [rt.jar:1.8.0_141] > at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.8.0_141] > at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680) [rt.jar:1.8.0_141] > at javax.security.auth.login.LoginContext.login(LoginContext.java:587) [rt.jar:1.8.0_141] > at org.apache.activemq.artemis.spi.core.security.ActiveMQJAASSecurityManager.getAuthenticatedSubject(ActiveMQJAASSecurityManager.java:186) [:] > at org.apache.activemq.artemis.spi.core.security.ActiveMQJAASSecurityManager.validateUser(ActiveMQJAASSecurityManager.java:93) [:] > at org.apache.activemq.artemis.core.security.impl.SecurityStoreImpl.authenticate(SecurityStoreImpl.java:130) [:] > at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.createSession(ActiveMQServerImpl.java:1434) [:] > at org.apache.activemq.artemis.core.protocol.mqtt.MQTTConnectionManager.createServerSession(MQTTConnectionManager.java:117) [:] > at org.apache.activemq.artemis.core.protocol.mqtt.MQTTConnectionManager.connect(MQTTConnectionManager.java:84) [:] > at org.apache.activemq.artemis.core.protocol.mqtt.MQTTProtocolHandler.handleConnect(MQTTProtocolHandler.java:161) [:] > at org.apache.activemq.artemis.core.protocol.mqtt.MQTTProtocolHandler.channelRead(MQTTProtocolHandler.java:107) [:] > 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.handler.codec.ByteToMessageDecoder.handlerRemoved(ByteToMessageDecoder.java:236) [netty-all-4.1.14.Final.jar:4.1.14.Final] > at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:494) [netty-all-4.1.14.Final.jar:4.1.14.Final] > at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:428) [netty-all-4.1.14.Final.jar:4.1.14.Final] > at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265) [netty-all-4.1.14.Final.jar:4.1.14.Final] > at org.apache.activemq.artemis.core.protocol.ProtocolHandler$ProtocolDecoder.channelRead(ProtocolHandler.java:128) [:] > 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)] 22:23:33,116 DEBUG [org.apache.activemq.artemis.core.postoffice.impl.PostOfficeImpl] Couldn't find any bindings for address=activemq.notifications on message=CoreMessage[messageID=0,durable=true,userID=null,priority=0, timestamp=0,expiration=0, durable=true, address=activemq.notifications,properties=TypedProperties[_AMQ_NotifType=SECURITY_AUTHENTICATION_VIOLATION,_AMQ_NotifTimestamp=1504729413109]]@907108390 > [Thread-1 (activemq-netty-threads)] 22:23:33,116 DEBUG [org.apache.activemq.artemis.core.postoffice.impl.PostOfficeImpl] Message CoreMessage[messageID=0,durable=true,userID=null,priority=0, timestamp=0,expiration=0, durable=true, address=activemq.notifications,properties=TypedProperties[_AMQ_NotifType=SECURITY_AUTHENTICATION_VIOLATION,_AMQ_NotifTimestamp=1504729413109]]@907108390 is not going anywhere as it didn't have a binding on address:activemq.notifications > [Thread-1 (activemq-netty-threads)] 22:23:33,134 DEBUG [org.apache.activemq.artemis.core.protocol.mqtt] Error processing Control Packet, Disconnecting Client: ActiveMQSecurityException[errorType=SECURITY_EXCEPTION message=AMQ119031: Unable to validate user from /127.0.0.1:58466. Username: user; SSL certificate subject DN: unavailable] > at org.apache.activemq.artemis.core.security.impl.SecurityStoreImpl.authenticate(SecurityStoreImpl.java:152) [:] > at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.createSession(ActiveMQServerImpl.java:1434) [:] > at org.apache.activemq.artemis.core.protocol.mqtt.MQTTConnectionManager.createServerSession(MQTTConnectionManager.java:117) [:] > at org.apache.activemq.artemis.core.protocol.mqtt.MQTTConnectionManager.connect(MQTTConnectionManager.java:84) [:] > at org.apache.activemq.artemis.core.protocol.mqtt.MQTTProtocolHandler.handleConnect(MQTTProtocolHandler.java:161) [:] > at org.apache.activemq.artemis.core.protocol.mqtt.MQTTProtocolHandler.channelRead(MQTTProtocolHandler.java:107) [:] > 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.handler.codec.ByteToMessageDecoder.handlerRemoved(ByteToMessageDecoder.java:236) [netty-all-4.1.14.Final.jar:4.1.14.Final] > at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:494) [netty-all-4.1.14.Final.jar:4.1.14.Final] > at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:428) [netty-all-4.1.14.Final.jar:4.1.14.Final] > at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265) [netty-all-4.1.14.Final.jar:4.1.14.Final] > at org.apache.activemq.artemis.core.protocol.ProtocolHandler$ProtocolDecoder.channelRead(ProtocolHandler.java:128) [:] > 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)] 22:23:33,134 ERROR [org.apache.activemq.artemis.core.protocol.mqtt] Error disconnecting client: null > {noformat} -- This message was sent by Atlassian JIRA (v6.4.14#64029)