Return-Path: X-Original-To: apmail-activemq-dev-archive@www.apache.org Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 83FDD10F4E for ; Tue, 11 Feb 2014 10:29:24 +0000 (UTC) Received: (qmail 81134 invoked by uid 500); 11 Feb 2014 10:29:23 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 80684 invoked by uid 500); 11 Feb 2014 10:29:20 -0000 Mailing-List: contact dev-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 dev@activemq.apache.org Received: (qmail 80627 invoked by uid 99); 11 Feb 2014 10:29:19 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Feb 2014 10:29:19 +0000 Date: Tue, 11 Feb 2014 10:29:19 +0000 (UTC) From: "Aleksandar Stojadinovic (JIRA)" To: dev@activemq.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (AMQ-5040) Issue with Eclipse Paho mobile client and reconnecting due to failure. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/AMQ-5040?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Aleksandar Stojadinovic updated AMQ-5040: ----------------------------------------- Description: A similar issue as the original one still exists with the 5.9.0 version. When a connection breaks to the broker, for example a WiFi connection breaks, and the phone reconnects via mobile network, the MqttService retries connecting to the broker. The client responds with "Broker unavailable (3)", and in the broker console the same "already connected" message appears as with the original post. The code is more or less identical. ------------------------------------- I built client that is connecting to Apache MQ set for mqtt. Now on first try client establishes the connection with client id = test1, sends message and closes connection if(!client.isConnected()){ client.connect(conOpt); } MqttTopic topic = client.getTopic(topicName); MqttMessage message = new MqttMessage(payload); message.setQos(qos); MqttDeliveryToken token = topic.publish(message); token.waitForCompletion(); client.disconnect(); Then when again I run client it fails on connect ... I can see log in apache mq log: WARN | Transport Connection to: tcp://127.0.0.1:57354 failed: java.io.IOExcepti on: Broker: localhost - Client: test1 already connected from tcp://127.0.0.1:57 330 in connection options I have set only setCleanSession(true). Paho client I have downloaded from site as stable version. I have first tried to raise an issue with the Eclipse Paho project (https://bugs.eclipse.org/bugs/show_bug.cgi?id=408105) and after investigation their team came to conclusion that this is not on clinet side was: I built client that is connecting to Apache MQ set for mqtt. Now on first try client establishes the connection with client id = test1, sends message and closes connection if(!client.isConnected()){ client.connect(conOpt); } MqttTopic topic = client.getTopic(topicName); MqttMessage message = new MqttMessage(payload); message.setQos(qos); MqttDeliveryToken token = topic.publish(message); token.waitForCompletion(); client.disconnect(); Then when again I run client it fails on connect ... I can see log in apache mq log: WARN | Transport Connection to: tcp://127.0.0.1:57354 failed: java.io.IOExcepti on: Broker: localhost - Client: test1 already connected from tcp://127.0.0.1:57 330 in connection options I have set only setCleanSession(true). Paho client I have downloaded from site as stable version. I have first tried to raise an issue with the Eclipse Paho project (https://bugs.eclipse.org/bugs/show_bug.cgi?id=408105) and after investigation their team came to conclusion that this is not on clinet side Environment: Ubuntu 12.04 (was: Win 2008) Summary: Issue with Eclipse Paho mobile client and reconnecting due to failure. (was: This issue still exists with the 5.9.0 version and the Eclipse Paho Client. ) > Issue with Eclipse Paho mobile client and reconnecting due to failure. > ---------------------------------------------------------------------- > > Key: AMQ-5040 > URL: https://issues.apache.org/jira/browse/AMQ-5040 > Project: ActiveMQ > Issue Type: Bug > Components: MQTT > Affects Versions: 5.7.0 > Environment: Ubuntu 12.04 > Reporter: Aleksandar Stojadinovic > Fix For: 5.9.0 > > > A similar issue as the original one still exists with the 5.9.0 version. When a connection breaks to the broker, for example a WiFi connection breaks, and the phone reconnects via mobile network, the MqttService retries connecting to the broker. The client responds with "Broker unavailable (3)", and in the broker console the same "already connected" message appears as with the original post. > The code is more or less identical. > ------------------------------------- > I built client that is connecting to Apache MQ set for mqtt. > Now on first try client establishes the connection with client id = test1, sends message and closes connection > if(!client.isConnected()){ > client.connect(conOpt); > } > MqttTopic topic = client.getTopic(topicName); > MqttMessage message = new MqttMessage(payload); > message.setQos(qos); > MqttDeliveryToken token = topic.publish(message); > token.waitForCompletion(); > client.disconnect(); > Then when again I run client it fails on connect ... I can see log in apache mq log: > WARN | Transport Connection to: tcp://127.0.0.1:57354 failed: java.io.IOExcepti > on: Broker: localhost - Client: test1 already connected from tcp://127.0.0.1:57 > 330 > in connection options I have set only setCleanSession(true). Paho client I have downloaded from site as stable version. > I have first tried to raise an issue with the Eclipse Paho project (https://bugs.eclipse.org/bugs/show_bug.cgi?id=408105) and after investigation their team came to conclusion that this is not on clinet side -- This message was sent by Atlassian JIRA (v6.1.5#6160)