Return-Path: X-Original-To: apmail-activemq-users-archive@www.apache.org Delivered-To: apmail-activemq-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 59CCD17BE3 for ; Tue, 26 Jan 2016 15:17:47 +0000 (UTC) Received: (qmail 13643 invoked by uid 500); 26 Jan 2016 15:17:46 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 13601 invoked by uid 500); 26 Jan 2016 15:17:46 -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 13589 invoked by uid 99); 26 Jan 2016 15:17:46 -0000 Received: from Unknown (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Jan 2016 15:17: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 2A138C2336 for ; Tue, 26 Jan 2016 15:17:46 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.101 X-Spam-Level: X-Spam-Status: No, score=-0.101 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id Br3uJNbkWKuR for ; Tue, 26 Jan 2016 15:17:37 +0000 (UTC) Received: from mail-vk0-f44.google.com (mail-vk0-f44.google.com [209.85.213.44]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id 64B94259A8 for ; Tue, 26 Jan 2016 15:17:36 +0000 (UTC) Received: by mail-vk0-f44.google.com with SMTP id n1so93230760vkb.3 for ; Tue, 26 Jan 2016 07:17:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=/aNUZbrfDRTLRxhVhPqiWyKUzzOQSZ/Ssn5Swkdmjtw=; b=aNV2ksLYi3DJdCH2FBjf7MBAmYzHTsILUlcp51gmC/yNEJje4pk52hwQePWMiyTWie k7/2YTTTaFvLyfJVQ0f+FEBDTFMuNYvTT63vksMXrBWSZMIY9/txyODAkirbrS+xNM7b V/ngP4SNJEGvLj6OFWDSujaBhUU3fDdMFCi7bMslNlDDmK8mWtYZkC2nL6V1MkkfFIPI Buf6WCTB5XkTE5Teyw9rP6/SlSppDxorTEiq12KdFypGkqkGI50FmhKLWReykfqyNKfB fPf7d+H1y3nrcIe8k93k+QXD4VRfRE/miD++19fBWKxvfZ+f9C6/ClNdf38Y9zA0ZOeX wKEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type:content-transfer-encoding; bh=/aNUZbrfDRTLRxhVhPqiWyKUzzOQSZ/Ssn5Swkdmjtw=; b=LlzpFSDV0jvUdiIkqWwd5iFMkbvlY8tU9z+ZdDIhUfEOIIQOBSL8hgDEv74Pdea1Bw /DK4J6rS9PgH4kIfdh9Y/rlqkJy+8bNeNAAtclZ0S41eMHboTifnldUUtDJVb7LhklWh Fde1LKwh5IrrCY69muH4nVA/BR9YIZm+DUDEju+j8Nno5P6ue4IvNw2+djWSQJK2vVSJ g+8nOlHEYOcxK/mm+hm+Ltkw7QeEcY8LBjVSq2vbGeEzhLF4C7mUSe8juUB2WMf4EeSn 1NxAiIrlOQAkrH1tunJzQ4hm+8mZv9tEjjq8lta9jkNZ9uAALmkhPcZ8rmuY543WkcK7 7WbA== X-Gm-Message-State: AG10YOQwXSisRCMMJPuXe/w79L8bagGb1k6vKVa0GCM3m8VJWC9ImsXRY90/22YWoaECXnhpaV0X4yhOuBF/iw== MIME-Version: 1.0 X-Received: by 10.31.3.18 with SMTP id 18mr15151783vkd.17.1453821449424; Tue, 26 Jan 2016 07:17:29 -0800 (PST) Received: by 10.31.32.209 with HTTP; Tue, 26 Jan 2016 07:17:29 -0800 (PST) In-Reply-To: References: <1730129229.14590983.1453734164505.JavaMail.zimbra@redhat.com> <1171707438.14656809.1453741184908.JavaMail.zimbra@redhat.com> Date: Tue, 26 Jan 2016 10:17:29 -0500 Message-ID: Subject: Re: Cluster/Federated Artemis problems From: Clebert Suconic To: users@activemq.apache.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable just to let you know.. to build with checkstyle activated, you have to build with the dev profile: mvn -Pdev install (etc). On Tue, Jan 26, 2016 at 6:14 AM, Lachezar Dobrev wrote= : > Well, not that you have explained this it is really "Obvious". > I'm using Artemis as JMS client+server, and internals are a bit obscure > for me. I'll have to wrap my head around the fact, that there is more tha= n > JMS to that. > > Package size issue: > https://issues.apache.org/jira/browse/ARTEMIS-362 > > Git Pull-Request with fix and test case: > https://github.com/apache/activemq-artemis/pull/348 > > Jenkins does not like me however, The build passed, but the pull reques= t > is marked erroneous: > https://builds.apache.org/job/ActiveMQ-Artemis-PR-Build/965/ > > Please advise. > > Lachezar > > 2016-01-25 18:59 GMT+02:00 Justin Bertram : > >> The documentation is pretty clear (IMO) about the purpose of the "addres= s" >> property of the cluster connection. There's nothing "magic" about it. = In >> short, "Each cluster connection only applies to addresses that match the >> specified address field. An address is matched on the cluster connection >> when it begins with the string specified in this field." The documentat= ion >> itself [1] includes a more thorough explanation (including a few simple >> examples), but I didn't want to paste the whole thing here when you can >> simply go there and read it yourself. >> >> In your particular case, the value of "jms" works for you because you're >> ostensibly using a JMS topic and all addresses for JMS topics are queues >> are prefixed with "jms.". You can read more about how JMS maps to the >> Artemis "core" API here [2]. >> >> If you could open a JIRA [3] regarding the datagram issue you observed a= nd >> outline a way I can observe that myself that would go a long way in maki= ng >> sure the issue is resolved. Thanks! >> >> >> Justin >> >> [1] http://activemq.apache.org/artemis/docs/1.1.0/clusters.html (see the >> "Configuring Cluster Connections" section) >> [2] http://activemq.apache.org/artemis/docs/1.1.0/jms-core-mapping.html >> [3] https://issues.apache.org/jira/browse/ARTEMIS >> >> ----- Original Message ----- >> From: "Lachezar Dobrev" >> To: users@activemq.apache.org >> Sent: Monday, January 25, 2016 10:35:36 AM >> Subject: Re: Cluster/Federated Artemis problems >> >> Your help is appreciated, and effective. >> >> I have misunderstood the configuration elements. I was not clear that = the >> acceptor and the connector describe the same end-point. After fixing tha= t I >> saw a few logging messages about bridges being built. >> The configuration help that you pointed me to showed an inexplicable (= to >> me) address for the cluster "jms". >> After putting this *magic* address the cluster is now up and running. >> >> Now I'm trying to implement the fixed-peer cluster. I'm having trouble >> with that, but the progress is good. >> >> I still believe sending 4K datagrams is a bug though. >> >> >> 2016-01-25 17:02 GMT+02:00 Justin Bertram : >> >> > I imagine this is just a configuration issue somewhere. We ship lots = of >> > examples which use clustering (although not embedded), and the test-su= ite >> > is full of embedded clustering tests. As far as I know all these are >> > working properly. >> > >> > When you say the NettyAcceptor and NettyConnector use a >> "random-high-port" >> > are they both using the same port? If not, that would be a problem. >> > >> > You can configure a cluster "statically" (i.e. without UDP discovery). >> > Check out the "clustered-static-discovery" example and also see the >> > documentation [1]. >> > >> > I'd like to understand a bit more about how/why your current >> configuration >> > is failing. Could you provide a reproducible test-case? >> > >> > Lastly, I think you'd be best served by being on Artemis 1.2 which we >> > recently released. >> > >> > >> > Justin >> > >> > [1] http://activemq.apache.org/artemis/docs/1.1.0/clusters.html (see t= he >> > "Discovery using static Connectors" section) >> > >> > ----- Original Message ----- >> > From: "Lachezar Dobrev" >> > To: users@activemq.apache.org >> > Sent: Monday, January 25, 2016 5:22:16 AM >> > Subject: Cluster/Federated Artemis problems >> > >> > Hello group members. >> > >> > I'm having problems with clustering/federating an application's Arte= mis >> > embedded server. >> > The application is a .WAR with Springframework 4 and Embedded Artemi= s >> > 1.1.0 (from Spring). >> > >> > Multiple instances of the application are expected to be deployed in >> > multiple spots. The Artemis component is expected to cluster a JMS Top= ic >> > between nodes so that if any node sends a message on the topic all >> > listeners on all nodes should receive the message. >> > With a few problems I was able to make the Embedded Artemis Server >> handle >> > topic in a single deployment. >> > >> > Every application connects to the Embedded Artemis using InVM >> connector. >> > >> > Trying to cluster instances does not work! >> > >> > My configuration contains: >> > - A NettyAcceptor on (host):(random-high-port) >> > - A NettyConnector on (host):(random-high-port) named >> "cluster-connector" >> > - A BroadcastGroupConfiguration named "cluster-broadcast" >> > =3D UDPBroadcastEndpointFactory >> > * group-host 239.1.2.3 >> > * group-port 12345 >> > * local-host (host) >> > * local-port (random-high-port) >> > =3D ConnectorInfos >> > * "cluster-connector" >> > - DiscoveryGroupConfiguration named "cluster-discovery" >> > =3D UDPBroadcastEndpointFactory >> > * group-host 239.1.2.3 >> > * group-port 12345 >> > * local-host (host) >> > * local-port (random-high-port) >> > - ClusterConnectionConfiguration named "cluster" >> > =3D address: "cluster-address" >> > =3D connectorName: "cluster-connector" >> > =3D discoveryGroupName: "cluster-discovery" >> > >> > The configuration is done in Java (not XML) via >> > o.a.a.a.core.config.Configuration >> > >> > As already noted this does not work, even worse when a second >> application >> > instance is brought up the VMs on both instances hang on attempt to >> > shut-down. >> > >> > I noticed a possible problem: the network monitor showed, that the >> > applications keep open UDP socket that has a Send-Q that continuously >> grows >> > until about 200K pending, and then it seizes. Further using a tcpdump = I >> > noticed, that the packages being sent by Artemis look invalid, as they= 're >> > really BIG: 4096 bytes broadcast datagrams! >> > >> > Looking further I found out a possible BUG in >> > =E2=80=A6cluster.impl.BroadcastGroupImpl in the broadcastConnectors() = method. It >> > seems the method works incorrectly with the ActiveMQBuffer and the >> > underlying NIO ByteBuffer, and instead of sending a package with the >> needed >> > data it sends the whole Buffer of nearly 4K zeros and only a few hundr= ed >> > bytes of actual payload. A package of 4K is next to impossible to send >> as a >> > datagram packet. >> > >> > I've tried to perform a hot-fix for this issue and succeeded (the >> > datagrams fell to about 250 bytes), datagrams are sent and received, b= ut >> > the cluster still does not form. >> > >> > Please advise! >> > Is there a way to create a cluster without using discovery? Assuming= I >> > know every instance of the application at initialisation time is it >> > possible to create a cluster of pre-defined nodes? >> > >> > Hope I get help. >> > >> --=20 Clebert Suconic