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 A0E16200C73 for ; Wed, 10 May 2017 11:58:19 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 9E94C160BB4; Wed, 10 May 2017 09:58:19 +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 E4C8A160BA8 for ; Wed, 10 May 2017 11:58:18 +0200 (CEST) Received: (qmail 43914 invoked by uid 500); 10 May 2017 09:58:18 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Received: (qmail 43903 invoked by uid 99); 10 May 2017 09:58:16 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 May 2017 09:58:16 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 41BC4C0922 for ; Wed, 10 May 2017 09:58:16 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.488 X-Spam-Level: *** X-Spam-Status: No, score=3.488 tagged_above=-999 required=6.31 tests=[DKIM_ADSP_CUSTOM_MED=0.001, NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_NONE=-0.0001, SPF_SOFTFAIL=0.972, URIBL_BLOCKED=0.001, URI_HEX=1.313, URI_TRY_3LD=0.001] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id Z8nxORjO1Z1V for ; Wed, 10 May 2017 09:58:15 +0000 (UTC) Received: from mwork.nabble.com (mwork.nabble.com [162.253.133.43]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id DDE7B5FBA0 for ; Wed, 10 May 2017 09:58:14 +0000 (UTC) Received: from mjoe.nabble.com (unknown [162.253.133.57]) by mwork.nabble.com (Postfix) with ESMTP id 85A284079F222 for ; Wed, 10 May 2017 02:58:14 -0700 (MST) Date: Wed, 10 May 2017 02:45:44 -0700 (PDT) From: aragoubi To: users@activemq.apache.org Message-ID: <1494409544544-4725876.post@n4.nabble.com> Subject: [org.apache.activemq.broker.TransportConnection.Transport] (qtp749972657-157) Transport Connection to: MQTTSocket_2052272783 failed: java.io.IOException: Invalid CONNECT encoding MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit archived-at: Wed, 10 May 2017 09:58:19 -0000 I integrated activeMQ broker into my jboss in such a way that the broker is launched when jboss launch. This is transport connectors defined in my broker's config file: I tried a mqtt client using java paho mqttv3, this is how I tried to connect to my broker: String broker = "ws://127.0.0.1:1883"; String clientId = "JavaSample"; MemoryPersistence persistence = new MemoryPersistence(); try { MqttAsyncClient sampleClient = new MqttAsyncClient(broker, clientId, persistence); MqttConnectOptions connOpts = new MqttConnectOptions(); connOpts.setCleanSession(true); connOpts.setAutomaticReconnect(true); IMqttToken token = sampleClient.connect(connOpts); }catch(MqttException e){ e.printStackTrace(); } I think that the problem came from the port defined into the broker, because when I tried to connect to mosquito broker "tcp://test.mosquitto.org:1883" it works. I tried also to change 0.0.0.0 by localhost or by 127.0.0.1 by I am getting the same problem. Could someone help me with this ? -- View this message in context: http://activemq.2283324.n4.nabble.com/org-apache-activemq-broker-TransportConnection-Transport-qtp749972657-157-Transport-Connection-to-MQg-tp4725876.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.