From users-return-2062-apmail-qpid-users-archive=qpid.apache.org@qpid.apache.org Mon Oct 19 05:56:58 2009 Return-Path: Delivered-To: apmail-qpid-users-archive@www.apache.org Received: (qmail 38098 invoked from network); 19 Oct 2009 05:56:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 19 Oct 2009 05:56:58 -0000 Received: (qmail 41458 invoked by uid 500); 19 Oct 2009 05:56:57 -0000 Delivered-To: apmail-qpid-users-archive@qpid.apache.org Received: (qmail 41420 invoked by uid 500); 19 Oct 2009 05:56:57 -0000 Mailing-List: contact users-help@qpid.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@qpid.apache.org Delivered-To: mailing list users@qpid.apache.org Received: (qmail 41407 invoked by uid 99); 19 Oct 2009 05:56:57 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Oct 2009 05:56:57 +0000 X-ASF-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_00,HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of yogu13@gmail.com designates 209.85.216.193 as permitted sender) Received: from [209.85.216.193] (HELO mail-px0-f193.google.com) (209.85.216.193) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Oct 2009 05:56:54 +0000 Received: by pxi31 with SMTP id 31so3016399pxi.19 for ; Sun, 18 Oct 2009 22:56:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=Dqny5MS8viVmBt/pao9TPGmIomMlWm/8cGzeiaaeD7M=; b=QjWnb/hQSpnudFGHESs7S/wZnAPbkjnReiS4vo5KrTOCVawnvu8HtGNW5AusXSWzH4 03icQCSWA7dP3ZDNa8c/U5WobtLVyGx01VZXTVaN2lOMIGqHY14kkn9NpNseprT68/GJ IuA618AIJChbOH2QOVL5ssRk2LOhChkVKVdY8= 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; b=Lb+85OuvymUKHL7vpxVQ8MWyibYMXDGGHajjyknCuB+qP1kdUUlAYVNNzCmar6FQMf tb3ZmeXKN9Lh/oGEKCUmRYJqX3hRRVIZyiaJGQENOR1qGZ3rlOWEGw4SSMKEnG3f99ZI W7H1HL5mXcO1GAdmrlFcJj62PruycXjyCY1Rk= MIME-Version: 1.0 Received: by 10.143.129.7 with SMTP id g7mr294979wfn.241.1255931793876; Sun, 18 Oct 2009 22:56:33 -0700 (PDT) In-Reply-To: References: <51f9fa170910111030r290e7b02s3b3cd64f5cb2a843@mail.gmail.com> <51f9fa170910131008p41412882ld3b73408e9dec476@mail.gmail.com> <51f9fa170910160649q1db0d94ci623a325b69628273@mail.gmail.com> Date: Mon, 19 Oct 2009 11:26:33 +0530 Message-ID: <51f9fa170910182256n23b340abqa204d4e38a1e8eb9@mail.gmail.com> Subject: Re: Issue connecting to Qpid Broker From: Yogesh Rao To: users@qpid.apache.org Content-Type: multipart/alternative; boundary=000e0cd72db66fa6d50476436836 --000e0cd72db66fa6d50476436836 Content-Type: text/plain; charset=ISO-8859-1 Hi Marnie ... Thanks for the suggestion. but i havent used slf4j previously, so could you let me know how can i configure the client to use slf4j ? Regards, -Yogesh On Fri, Oct 16, 2009 at 7:48 PM, Marnie McCormack < marnie.mccormack@googlemail.com> wrote: > Hi Yogesh, > > Having had a quick discussion here - it's possible that your log4j is > upsetting the client log4j settings (and attempts to log). What does your > client log contain ? > > One suggestion (from Martin) is to set the client up to use slf4j and see > if > that allows your log4j client to connect ok, that'd rule out any unhappy > interaction between them. The broker is certainly not getting a valid > response from the client during authentication negotiation. > > Hth, > Marnie > > On Fri, Oct 16, 2009 at 2:49 PM, Yogesh Rao wrote: > > > Hi, > > > > Below is the log of qpid broker (This is not the complete log) ... > > > > 2009-10-15 15:18:30,122 DEBUG [pool-1-thread-4] framing.FieldTable > > (FieldTable.java:1063) - FieldTable::FieldTable(buffer,187): Done. > > 2009-10-15 15:18:30,122 DEBUG [pool-1-thread-4] > > protocol.AMQMinaProtocolSession (AMQMinaProtocolSession.java:213) - Frame > > Received: Frame channelId: 0, bodyFrame: [ConnectionStartOkBodyImpl: > > clientProperties={instance=[LONG_STRING: localhost], > product=[LONG_STRING: > > Qpid Client], version=[LONG_STRING: 2.2.2.0], platform=[LONG_STRING: > > Java(TM) SE Runtime Environment, 1.6.0_13-b03, Sun Microsystems Inc., > x86, > > Windows XP, 5.1, Service Pack 2]}, mechanism=CRAM-MD5, response=null, > > locale=en_US] > > 2009-10-15 15:18:30,309 INFO [pool-1-thread-4] > > handler.ConnectionStartOkMethodHandler > > (ConnectionStartOkMethodHandler.java:65) - SASL Mechanism selected: > > CRAM-MD5 > > 2009-10-15 15:18:30,309 INFO [pool-1-thread-4] > > handler.ConnectionStartOkMethodHandler > > (ConnectionStartOkMethodHandler.java:66) - Locale selected: en_US > > 2009-10-15 15:18:30,309 DEBUG [pool-1-thread-4] state.AMQStateManager > > (AMQStateManager.java:166) - State changing to CONNECTION_NOT_AUTH from > old > > state CONNECTION_NOT_AUTH > > 2009-10-15 15:18:30,309 DEBUG [pool-1-thread-1] > framing.AMQDataBlockEncoder > > (AMQDataBlockEncoder.java:51) - Encoded frame byte-buffer is > > > > > '0x01000000000035000a00140000002d3c383433373535363236373934343337333730302e31323535363030313130333039406c6f63616c686f73743ece' > > 2009-10-15 15:18:30,309 DEBUG [SocketAcceptorIoProcessor-0.3] > > protocol.AMQPFastProtocolHandler (AMQPFastProtocolHandler.java:270) - > > Message sent: HeapBuffer[pos=0 lim=61 cap=61: 01 00 00 00 00 00 35 00 0A > 00 > > 14 00 00 00 2D 3C 38 34 33 37 35 35 36 32 36 37 39 34 34 33 37 33 37 30 > 30 > > 2E 31 32 35 35 36 30 30 31 31 30 33 30 39 40 6C 6F 63 61 6C 68 6F 73 74 > 3E > > CE] > > 2009-10-15 15:18:30,309 DEBUG [SocketAcceptorIoProcessor-0.3] > > protocol.AMQPFastProtocolHandler (AMQPFastProtocolHandler.java:270) - > > Message sent: Frame channelId: 0, bodyFrame: [ConnectionSecureBodyImpl: > > challenge=[B@132021a] > > 2009-10-15 15:18:30,325 DEBUG [pool-1-thread-2] > > protocol.AMQMinaProtocolSession (AMQMinaProtocolSession.java:213) - Frame > > Received: Frame channelId: 0, bodyFrame: [ConnectionSecureOkBodyImpl: > > response=[B@2803d5] > > 2009-10-15 15:18:30,325 INFO [pool-1-thread-2] > > handler.ConnectionSecureOkMethodHandler > > (ConnectionSecureOkMethodHandler.java:74) - Authentication failed:Invalid > > response > > 2009-10-15 15:18:30,325 DEBUG [pool-1-thread-2] state.AMQStateManager > > (AMQStateManager.java:166) - State changing to CONNECTION_CLOSING from > old > > state CONNECTION_NOT_AUTH > > > > my jndi.properties looks like > > > > java.naming.factory.initial = > > org.apache.qpid.jndi.PropertiesFileInitialContextFactory > > # connectionfactory.[jndiname] = [ConnectionURL] > > connectionfactory.asychLoggingConnectionFactory = > > amqp://guest:guest@localhost/test?brokerlist='tcp://localhost:5672' > > # topic.[jndiName] = [physicalName] > > topic.test = test > > > > > > Do let me know incase you need anything else ... > > > > Note:- The issue only comes when i am trying to connect from within > log4j. > > A > > standalone code works just fine ... > > > > Thank you! > > > > Regards, > > -Yogesh > > > > On Thu, Oct 15, 2009 at 1:49 AM, Marnie McCormack < > > marnie.mccormack@googlemail.com> wrote: > > > > > Can you cat the content of your jndi properties file ? Swtiching log > > level > > > to debug for the broker would show a connection attempt, but I suspect > > your > > > jndi might be the issue. > > > > > > Thanks, > > > Marnie > > > > > > On Tue, Oct 13, 2009 at 6:08 PM, Yogesh Rao wrote: > > > > > > > Hi Can anyone help me on this ???? > > > > Any directions on this would be extremely helpful ... > > > > > > > > Thanks in advance !! > > > > > > > > On Sun, Oct 11, 2009 at 11:00 PM, Yogesh Rao > wrote: > > > > > > > > > Hi, > > > > > > > > > > I am facing an unusual problem when i try to connect to qpid from > > > within > > > > > Log4j. Let me give a overview of what i am trying to do here ... I > am > > > > > creating my own JMS appender implementation (for some specific > > reason) > > > > and > > > > > trying to send the logging message over JMS. This is based on > publish > > > > > subscribe. I have written sample pub / sub code and it works very > > well > > > > with > > > > > qpid. I am trying to move that into JMSAppender and it seems to be > > > > throwing > > > > > a timeout exception when it tries to createTopicConnection ... > > > > > > > > > > Below is the code which i have written ... > > > > > > > > > > public class JMSAppender extends AppenderSkeleton { > > > > > > > > > > public void activateOptions() { > > > > > > > > > > try { > > > > > > > > > > Properties env = new Properties( ); > > > > > env.load(new FileInputStream("d:/qpid-config.properties")); > > > > > Context jndi = new InitialContext(env); > > > > > TopicConnectionFactory topicConnectionFactory = > > > (TopicConnectionFactory) > > > > > lookup(jndi, "qpidConnectionFactory"); > > > > > Topic topic = (Topic) lookup(jndi, "logTopic"); > > > > > if (userName != null) { > > > > > > > > > > topicConnection = > > > topicConnectionFactory.createTopicConnection(userName, > > > > > password); > > > > > > > > > > } else { > > > > > * // here is the problem * > > > > > *topicConnection = > > > > > topicConnectionFactory.createTopicConnection();* > > > > > } > > > > > topicSession = > > > > > topicConnection.createTopicSession(false,Session.AUTO_ACKNOWLEDGE); > > > > > topicPublisher = topicSession.createPublisher(topic); > > > > > topicConnection.start(); > > > > > jndi.close(); > > > > > > > > > > } catch (Exception e) { > > > > > > > > > > e.printStackTrace(); > > > > > > > > > > } > > > > > > > > > > > > > > > } > > > > > > > > > > > > > > > Below is the exception trace that i get .... > > > > > > > > > > javax.jms.JMSException: Error creating connection: Timeout waiting > > for > > > > > connection. > > > > > at > > > > > > > > > > > > > > > org.apache.qpid.client.AMQConnectionFactory.createConnection(AMQConnectionFactory.java:325) > > > > > at > > > > > > > > > > > > > > > org.apache.qpid.client.AMQConnectionFactory.createConnection(AMQConnectionFactory.java:296) > > > > > at > > > > > > > > > > > > > > > org.apache.qpid.client.AMQConnectionFactory.createTopicConnection(AMQConnectionFactory.java:348) > > > > > at sample.logging.JMSAppender.activateOptions(JMSAppender.java:62) > > > > > at > > > > > > > > > org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:257) > > > > > at > > > > > > > > > > > > > > > org.apache.log4j.xml.DOMConfigurator.parseAppender(DOMConfigurator.java:285) > > > > > at > > > > > > > > > > > > > > > org.apache.log4j.xml.DOMConfigurator.findAppenderByName(DOMConfigurator.java:171) > > > > > at > > > > > > > > > > > > > > > org.apache.log4j.xml.DOMConfigurator.findAppenderByReference(DOMConfigurator.java:184) > > > > > > > > > > Do let me know how can i fix the issue... looking at the code i > don't > > > see > > > > > any problem, strangely this only happens when log4j is trying to > > > connect > > > > to > > > > > qpid using the appender... could that be a problem ? Please > advice... > > > > > > > > > > Thank you in advance ... > > > > > > > > > > > > > > > > > > > > > > > > > --000e0cd72db66fa6d50476436836--