Return-Path: Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: (qmail 81646 invoked from network); 30 Jul 2010 17:19:51 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 30 Jul 2010 17:19:51 -0000 Received: (qmail 64065 invoked by uid 500); 30 Jul 2010 17:19:51 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 64026 invoked by uid 500); 30 Jul 2010 17:19:50 -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 64018 invoked by uid 99); 30 Jul 2010 17:19:50 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Jul 2010 17:19:50 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of gary.tully@gmail.com designates 209.85.160.43 as permitted sender) Received: from [209.85.160.43] (HELO mail-pw0-f43.google.com) (209.85.160.43) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Jul 2010 17:19:46 +0000 Received: by pwj6 with SMTP id 6so1318195pwj.2 for ; Fri, 30 Jul 2010 10:19:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=KtI2EnQJEQQbGyCNYXE1EFmV3I9x21mdozY4OWIQQ0k=; b=t484yPjgbYCOYovCr1WDtSyuIisaAO6brHVq+L363sgDDOCzPrvV8j36ml0b1Sapzx fy6trj8tS0aiaf5XWItNaB/9CQp2V7LMsdIXceqbzM13bonJ/8LVxiXAVUbf8YPsEkd9 Uj0w54DMJdLQghm5WDnaBY7b9D1wRrcG6/aYE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=rgXO1M/pDaqPu20Fbtqc9FAhezS8O20e+ZC27NrCpsUg/74DRPdgbEwkoCjh+wf3t4 gHmhRaNBCF2vTfrA43WjIbo+Nz1oDERerEXGq94eaUB/dKEu9P90fut+hBDchm49vWrj E5V1rHQodIbfeDn1Et20GdguvoPWktjjbnWkw= MIME-Version: 1.0 Received: by 10.142.229.19 with SMTP id b19mr1994218wfh.183.1280510365528; Fri, 30 Jul 2010 10:19:25 -0700 (PDT) Received: by 10.142.231.12 with HTTP; Fri, 30 Jul 2010 10:19:25 -0700 (PDT) In-Reply-To: <29307245.post@talk.nabble.com> References: <1805815.12001276089171820.JavaMail.jira@thor> <30854363.56451280485912788.JavaMail.jira@thor> <29306610.post@talk.nabble.com> <29307245.post@talk.nabble.com> Date: Fri, 30 Jul 2010 18:19:25 +0100 Message-ID: Subject: Re: [jira] Commented: (AMQ-2771) Side effect from AMQ-2094, server listens on host name address, client connects to localhost with the same URI From: Gary Tully To: dev@activemq.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable that is xml syntax validation. u need to use & for & see: http://www.stylusstudio.com/w3c/xml11/sec-references.htm On 30 July 2010 16:28, Eric-AWL wrote: > > Hi Gary > > Ok I found the option in the networkConnection documentation, but, in 5.3= .2 > > =A0 =A0 =A0 > uri=3D"multicast://default?group=3DTestDeCharge-DEFAULT&useLocalHost=3Dfa= lse" > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0networkTTL=3D"1" > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0conduitSubscriptions=3D"fa= lse" > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0dynamicOnly=3D"true" > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0duplex=3D"false"/> > > I get > > 2010/07/30;17:05:16:513;ERR;CInstance;Serveur(td0sib01s.priv.atos.fr);NA;= NA;BUSACT-0000;(Exception) > org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Li= ne > 34 in XML document from class path resource [activemq.xml] is invalid; > nested exception is org.xml.sax.SAXParseException: The reference to entit= y > "useLocalHost" must end with the ';' delimiter. > > if I swap group and useLocalHost : > > > uri=3D"multicast://default?useLocalHost=3Dfalse&group=3DTestDeCharge-DEFA= ULT" > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0networkTTL=3D"1" > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0conduitSubscriptions=3D"fa= lse" > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0dynamicOnly=3D"true" > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0duplex=3D"false"/> > > > 2010/07/30;17:15:09:279;ERR;CInstance;Serveur(td0sib01s.priv.atos.fr);NA;= NA;BUSACT-0000;(Exception) > org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Li= ne > 34 in XML document from class path resource [activemq.xml] is invalid; > nested exception is org.xml.sax.SAXParseException: The reference to entit= y > "group" must end with the ';' delimiter. > > > If I use "&*amp;" as I found some answers for old forums questions > > =A0 =A0 =A0 > uri=3D"multicast://default?group=3DTestDeCharge-DEFAULT&*amp;useLocalHost= =3Dfalse" > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0networkTTL=3D"1" > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0conduitSubscriptions=3D"fa= lse" > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0dynamicOnly=3D"true" > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0duplex=3D"false"/> > > I get > > 2010/07/30;17:18:45:037;ERR;CInstance;Serveur(td0sib01s.priv.atos.fr);NA;= NA;BUSACT-0000;(Exception) > org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Li= ne > 34 in XML document from class path resource [activemq.xml] is invalid; > nested exception is org.xml.sax.SAXParseException: The entity name must > immediately follow the '&' in the entity reference. > > It seems to be a kind of AMQ-2598 error that referenced AMQ-1099 > > Sorry for all these small problems. > > Eric-AWL > > > Gary Tully wrote: >> >> append the transport options to the uri: >> >> multicast://default?group=3DTestDeCharge-DEFAULT&useLocalHost=3Dfalse >> >> the discovery transport will pull off the parameters it knows about >> (eg group) and leave the rest for the discovered transport. >> >> On 30 July 2010 15:25, Eric-AWL wrote: >>> >>> Euuuuh, I don't know if I understand what you explain me : >>> >>> =A0 =A0 =A0>> >>> =A0uri=3D"multicast://default?group=3DTestDeCharge-DEFAULT" >>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0networkTTL=3D"1" >>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0conduitSubscriptions=3D"= false" >>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0dynamicOnly=3D"true" >>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0duplex=3D"false"/> >>> >>> =3D> >>> =A0 =A0 =A0 >> >>> =A0uri=3D"multicast://default?group=3DTestDeCharge-DEFAULT" >>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0networkTTL=3D"1" >>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0conduitSubscriptions=3D"= false" >>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0dynamicOnly=3D"true" >>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0duplex=3D"false" >>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0useLocalHost=3D"false"/> >>> >>> I don't see this new option of networkConnector in the documentation we= b >>> site. >>> >>> ??? >>> >>> >>> JIRA jira@apache.org wrote: >>>> >>>> >>>> =A0 =A0 [ >>>> https://issues.apache.org/activemq/browse/AMQ-2771?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D610= 03#action_61003 >>>> ] >>>> >>>> Gary Tully commented on AMQ-2771: >>>> --------------------------------- >>>> >>>> it does look like the useLocalHost option should default to false as i= t >>>> is >>>> an override option that results in a hard coded answer. >>>> >>>> Eric, for the multicast case, apply the parameters to the multicast ur= l >>>> used by the networkconnector, that fact that it is no longer propagate= d >>>> in >>>> the discovery multicast frame requires the option to be explicitly set >>>> by >>>> the user of that information. >>>> >>>>> Side effect from AMQ-2094, server listens on host name address, clien= t >>>>> connects to localhost with the same URI >>>>> ---------------------------------------------------------------------= ----------------------------------------- >>>>> >>>>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 Key: AMQ-2771 >>>>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 URL: https://issues.apache.org/active= mq/browse/AMQ-2771 >>>>> =A0 =A0 =A0 =A0 =A0 =A0 Project: ActiveMQ >>>>> =A0 =A0 =A0 =A0 =A0Issue Type: Wish >>>>> =A0 =A0Affects Versions: 5.3.0, 5.3.1, 5.3.2 >>>>> =A0 =A0 =A0 =A0 =A0 =A0Reporter: Przemek Bruski >>>>> =A0 =A0 =A0 =A0 =A0 =A0 Fix For: 5.4.1 >>>>> >>>>> =A0 =A0 =A0 =A0 Attachments: BrokerServiceResolveHostTest.java >>>>> >>>>> >>>>> TcpTransport.java contains the following code: >>>>> {code} >>>>> =A0 =A0 protected String resolveHostName(String host) throws >>>>> UnknownHostException { >>>>> =A0 =A0 =A0 =A0 String localName =3D InetAddress.getLocalHost().getHo= stName(); >>>>> =A0 =A0 =A0 =A0 if (localName !=3D null && isUseLocalHost()) { >>>>> =A0 =A0 =A0 =A0 =A0 =A0 if (localName.equals(host)) { >>>>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 return "localhost"; >>>>> =A0 =A0 =A0 =A0 =A0 =A0 } >>>>> =A0 =A0 =A0 =A0 } >>>>> =A0 =A0 =A0 =A0 return host; >>>>> =A0 =A0 } >>>>> {code} >>>>> TcpTransportServer.java contains the following code: >>>>> {code} >>>>> =A0 =A0 =A0 =A0 InetAddress addr =3D InetAddress.getByName(host); >>>>> =A0 =A0 =A0 =A0 try { >>>>> =A0 =A0 =A0 =A0 =A0 =A0 this.serverSocket =3D >>>>> serverSocketFactory.createServerSocket(bind.getPort(), backlog, addr)= ; >>>>> {code} >>>>> /etc/hosts looks like this: >>>>> {code} >>>>> 127.0.0.1 =A0 =A0 =A0 localhost.localdomain =A0 localhost >>>>> someip =A0 =A0 =A0 myhostname.mydomain myhostname >>>>> {code} >>>>> Now, if I start server with uri: myhostname.mydomain, the server will >>>>> listen on someip but the client started on the same host with the sam= e >>>>> uri will try connect to localhost (and fail). >>>>> I know that useLocalHost can be used to avoid it, but silently >>>>> connecting >>>>> to localhost is counterintuitive and does not sound like a valid >>>>> default >>>>> behaviour (according to documentation, using localhost instead of the >>>>> host name is a workaround, the workaround is now effectively default >>>>> behaviour and breaks valid setups that used to work with 5.2). >>>>> This worked fine on 5.2, since the server bound to all interfaces - b= ut >>>>> fixing this was obviously the right thing to do. >>>>> Questions: >>>>> 1. Can the default behaviour be changed to one that would work on >>>>> majority of systems? >>>>> 2. Is the workaround really needed? Maybe it's the local network >>>>> settings >>>>> that should be corrected? >>>>> 3. The debug messages are misleading and probably should be changed: >>>>> [ActiveMQ Task] [FailoverTransport:604] urlList >>>>> connectionList:[tcp://hostname:54663?wireFormat.maxInactivityDuration= =3D300000] >>>>> [ActiveMQ Task] [FailoverTransport:723] Attempting connect to: >>>>> tcp://hostname:54663?wireFormat.maxInactivityDuration=3D300000 >>>>> [ActiveMQ Task] [FailoverTransport:764] Connect fail to: >>>>> tcp://hostname:54663?wireFormat.maxInactivityDuration=3D300000, reaso= n: >>>>> java.net.ConnectException: Connection refused >>>>> In fact, it was the connection to localhost:54663 that was refused. >>>> >>>> -- >>>> This message is automatically generated by JIRA. >>>> - >>>> You can reply to this email to add a comment to the issue online. >>>> >>>> >>>> >>> >>> -- >>> View this message in context: >>> http://old.nabble.com/-jira--Created%3A-%28AMQ-2771%29-Side-effect-from= -AMQ-2094%2C-server-listens-on-host-name-address%2C-client-connects-to-loca= lhost-with-the-same-URI-tp28830232p29306610.html >>> Sent from the ActiveMQ - Dev mailing list archive at Nabble.com. >>> >>> >> >> >> >> -- >> http://blog.garytully.com >> >> Open Source Integration >> http://fusesource.com >> >> > > -- > View this message in context: http://old.nabble.com/-jira--Created%3A-%28= AMQ-2771%29-Side-effect-from-AMQ-2094%2C-server-listens-on-host-name-addres= s%2C-client-connects-to-localhost-with-the-same-URI-tp28830232p29307245.htm= l > Sent from the ActiveMQ - Dev mailing list archive at Nabble.com. > > --=20 http://blog.garytully.com Open Source Integration http://fusesource.com