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 4ACE4200C17 for ; Fri, 10 Feb 2017 16:31:48 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 494AC160B5C; Fri, 10 Feb 2017 15:31:48 +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 A0511160B69 for ; Fri, 10 Feb 2017 16:31:47 +0100 (CET) Received: (qmail 51013 invoked by uid 500); 10 Feb 2017 15:31:46 -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 50994 invoked by uid 99); 10 Feb 2017 15:31:46 -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; Fri, 10 Feb 2017 15:31:46 +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 69ADDC3AA0 for ; Fri, 10 Feb 2017 15:31:46 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -1.199 X-Spam-Level: X-Spam-Status: No, score=-1.199 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-2.999] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id LIzxCYyPLPcj for ; Fri, 10 Feb 2017 15:31:45 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id E1EE85FB51 for ; Fri, 10 Feb 2017 15:31:44 +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 28820E060F for ; Fri, 10 Feb 2017 15:31:43 +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 303B421D72 for ; Fri, 10 Feb 2017 15:31:42 +0000 (UTC) Date: Fri, 10 Feb 2017 15:31:42 +0000 (UTC) From: "ASF subversion and git services (JIRA)" To: issues@activemq.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (ARTEMIS-917) Retained messages from file system contain weird chars MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 10 Feb 2017 15:31:48 -0000 [ https://issues.apache.org/jira/browse/ARTEMIS-917?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15861421#comment-15861421 ] ASF subversion and git services commented on ARTEMIS-917: --------------------------------------------------------- Commit f231fe4e9b4d0720c3bac19d097c1bde17badd46 in activemq-artemis's branch refs/heads/1.x from [~martyntaylor] [ https://git-wip-us.apache.org/repos/asf?p=activemq-artemis.git;h=f231fe4 ] ARTEMIS-917 Only return body of retained message after reboot (cherry picked from commit 3900cb0ec7305ee1f341687ace6a4fab7469a817) > Retained messages from file system contain weird chars > ------------------------------------------------------ > > Key: ARTEMIS-917 > URL: https://issues.apache.org/jira/browse/ARTEMIS-917 > Project: ActiveMQ Artemis > Issue Type: Bug > Components: Broker > Affects Versions: 1.5.1 > Environment: - Machine: > It's an EC2 instance on AWS cloud of type m4.large: 2 vCPU, 8G RAM and SSD storage. > - OS: > CentOS Linux release 7.3.1611 (Core) - x86_64 > - JVM: > java version "1.8.0_111" > Java(TM) SE Runtime Environment (build 1.8.0_111-b14) > Java HotSpot(TM) 64-Bit Server VM (build 25.111-b14, mixed mode) > - Distro package version of libaio: > Arch : x86_64 > Version : 0.3.109 > Release : 13.el7 > Reporter: Francesco Padovani > Attachments: broker-ARTEMIS-917.xml > > > I'm testing the "retained message" feature of MQTT protocol. > It seems that the broker works well while the retained messages are kept in ram: messages are sent correctly. > But when the Broker needs to recover and send the retained messages from the file system (e.g. after a restart), clients receive them with weird chars inside. > Following are the steps to reproduce the behaviour: > [Server Side] > 1. Create a dedicated user and a folder for the Broker installation (with right permission for that user) > 2. Set JAVA_HOME environment variable for the above user (jdk 1.8.0_111 in my case), download and unpack apache artemis 1.5.1. > 3. Create a broker instance (set a username, password and role). > 4. cd into the just created broker folder and create a user by using the following command: > bin/artemis user add > --> set username = > --> set password = > --> set role = mqtt > 5. Set the broker.xml file accordingly to the attached one (by changing ip and folder references). > 6. Run the broker: in foreground ("bin/artemis run") or as a service (bin/artemis-service start) it's the same. > [Client Side] > 7. use a mqtt client to publish a retained message on a topic. E.g. with mosquitto client the command could be the following: > mosquitto_pub -d -h -p 1883 -u -P -t /topic/test -r -q -m "test for a retained message" > 8. use a mqtt client to subscribe the same topic specified in the previous step. E.g.: > mosquitto_sub -d -h -p 1883 -u -P -q -t /topic/test > ...it receives the retained message sent in previous step. The message is good. > [Server Side] > 9. Stop the Broker: "bin/artemis stop" or "bin/artemis-service stop" > 10. Wait until the Broker finishes to stop ("stopped" in the log) and then restart it: "bin/artemis run" or "bin/artemis-service start". Check until it's up and running. > [Client Side] > 11. use a mqtt client to subscribe the same topic specified in step 7/8. E.g.: > mosquitto_sub -d -h -p 1883 -u -P -q -t /topic/test > ...HERE THE ISSUE: it receives the same retained message published in step 7, but with weird chars inside. > 12. If you try to replicate steps 7 and 8 (publish a new retained message and subscribe to receive it) you will notice that the new retained message comes back to be clean (no weird chars). > NOTE: it doesn't matter the client used for test. I replicated the same behaviour by using mosquitto_client, mqtt-spy and mqtt.fx -- This message was sent by Atlassian JIRA (v6.3.15#6346)