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 34E59424B for ; Mon, 23 May 2011 09:53:41 +0000 (UTC) Received: (qmail 56049 invoked by uid 500); 23 May 2011 09:53:40 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 56024 invoked by uid 500); 23 May 2011 09:53:40 -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 56016 invoked by uid 99); 23 May 2011 09:53:40 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 May 2011 09:53:40 +0000 X-ASF-Spam-Status: No, hits=0.6 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of gary.tully@gmail.com designates 209.85.216.178 as permitted sender) Received: from [209.85.216.178] (HELO mail-qy0-f178.google.com) (209.85.216.178) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 May 2011 09:53:36 +0000 Received: by qyk2 with SMTP id 2so3670993qyk.2 for ; Mon, 23 May 2011 02:53:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type:content-transfer-encoding; bh=Cy4xX5ORSbYsapOUajE9CDzRtJuC5nvftdC+iLxUK7w=; b=J5GVKoLSGYmu9A0lvdzl79dePFoSwGAmnYdN3w6asXrM/Y6pwLiz3Y3SA1vH2utQAu jmGQbR53RdgF3XbWaLhYBqFgnC19GRAC3USmGNPx8MOfXms41Jb1iqXQbsrPPH4HqW40 +wiE9Zf3oTO/4xzCm89plNWHj9vFy5rx53e0Y= 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=n8a0TCDydoyOkxnqmyi0yVDosSAWYKBeQ/KuFBM2kHSx982iMBACSCh+KKMwMbjc9m 5YsKpg2KmgdY0IoE997wWK9dnJ4Cqxibcjx1QJE9yhwWXlI1tMqpy8w/OYrFS8KGre51 IqJ/Mz5gJTZbYL4jppdR76Go5q/5fQ7+Py6WI= MIME-Version: 1.0 Received: by 10.229.136.1 with SMTP id p1mr1506522qct.218.1306144394897; Mon, 23 May 2011 02:53:14 -0700 (PDT) Received: by 10.229.25.9 with HTTP; Mon, 23 May 2011 02:53:14 -0700 (PDT) In-Reply-To: <1305989285267-3540710.post@n4.nabble.com> References: <1305989285267-3540710.post@n4.nabble.com> Date: Mon, 23 May 2011 10:53:14 +0100 Message-ID: Subject: Re: Problem with NIO protocol From: Gary Tully To: users@activemq.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable It looks correct, only change would be to just change the port on the client broker url, so use tcp://ec2-x-x-x-x.us-west-1.compute.amazonaws.com:61618 There is nothing particular to nio on the client, by default it picks up the tcp impl, but there may be an issue here. On 21 May 2011 15:48, hodgesz wrote: > Hi, > > We are currently using ActiveMQ 5.4.2 with Spring/Tomcat clients. =A0We h= ave > this configured as standalone two node JDBC master/slave. =A0Right now we= are > only testing with one Spring/Tomcat client and the master ActiveMQ node. > When changing my broker URL on the clients to use the NIO protocol instea= d > of TCP we are seeing the following exceptiom in the ActiveMQ logs. > > > 2011-05-18 21:50:44,950 | INFO =A0| Transport failed: java.io.IOException= : > Wire format negotiation timeout: peer did not send his wire format. | > org.apache.activemq.broker.TransportConnection.Transport | Async Exceptio= n > Handler > > > It is very likely I don't have something configured right since I am fail= y > new to ActiveMQ. =A0That said I have tried to follow examples from the > ActiveMQ in Action book I just purchased. > > The following is my transportConnectors element in the activemq.xml > > > > =A0 > =A0 > > > > On the client when my broker URL is > tcp://ec2-x-x-x-x.us-west-1.compute.amazonaws.com:61616 it loads fine > without any errors. =A0If I change the broker URL to > nio://ec2-x-x-x-x.us-west-1.compute.amazonaws.com:61618 I see the errors. > > A quick search on the web I came across a few JIRAs and the FAQ URL > http://activemq.apache.org/javaxjmsjmsexception-wire-format-negociation-t= imeout-peer-did-not-send-his-wire-format.html > > The FAQ says this error is one of following three things. > > 1. You're connecting to the port not used by ActiveMQ TCP transport > =A0Make sure to check that you're connecting to the appropriate host:port > > 2. You're using log4j JMS appender and doesn't filter out ActiveMQ log > messages > =A0Be sure to read How do I use log4j JMS appender with ActiveMQ and more > importantly to never send ActiveMQ log messages to JMS appender > > 3. Your broker is probably under heavy load (or network connection is > unreliable), so connection setup cannot be completed in a reasonable time > > > As far as I can tell my case doesn't fall in either of those three > categories. =A0I am pretty sure I have configured the host and port corre= ctly > in that the TCP protocol works fine. =A0It's just when using NIO that I s= ee > the issue. =A0I am not using the log4j JMS appender, there is no load > currently and the network connection is fine since I can telnet to both > ports from the client. > > The only thing I can think of is I configured NIO incorrectly on the serv= er > or client but from all the examples I have seen it looks consistent. > > Any help on this would be greatly appreciated. > > Thanks, > > Jonathan > > -- > View this message in context: http://activemq.2283324.n4.nabble.com/Probl= em-with-NIO-protocol-tp3540710p3540710.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. > --=20 http://fusesource.com http://blog.garytully.com