qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Glen Marchesani <g...@model3.net>
Subject Re: C++ broker, java client
Date Thu, 10 Dec 2009 05:37:29 GMT
Hi Rajith,
Thanks for your help and quick responses.  It looks like our issue was
related to a bad build of qpid.  My apologies for this.  In short when I ran
it with the "qpidd -t" option.  I had to do it on a different machine and
when I ran our example java code it worked (with the url of
amqp://guest:guest@clientid/test?brokerlist='tcp://172.16.1.52:5672').  The
issue was the qpidd server we were originally using as I went back to that
and saw the issue again.

We were running qpid C++ 0.5 daemon.

One interesting note is the performance of our python client was around 1000
msgs/second.  With the java client we are seeing something closer to 10,000
msgs/second.  Very informal tests but enough that I thought it worth
mentioning.



On Wed, Dec 9, 2009 at 9:59 PM, Rajith Attapattu <rajith77@gmail.com> wrote:

> On Wed, Dec 9, 2009 at 8:57 PM, Brant Boehmann <brant.boehmann@gmail.com>
> wrote:
> > I think Glen will be running your test soon, but I may have stumbled
> across
> > the issue while digging through qpid code.
> >
> > The docs say a url of the form: It
> >
> >
> amqp://[<user>:<pass>@][<clientid>]<virtualhost>[?<option>='<value>'[&<option>='<value>']]
> >
> > It then goes on to give examples like:
> >
> > amqp:///test?brokerlist='localhost'
> > amqp:///test?brokerlist='tcp://anotherhost:5684?retries='10''
> > amqp://guest:guest@
> /test?brokerlist='vm://:1;vm://:2'&failover='roundrobin'
> > amqp://guest:guest@
> /test?brokerlist='vm://:1;vm://:2'&failover='roundrobin?cyclecount='20''
> > amqp://guest:guest@client
> /test?brokerlist='tcp://localhost;tcp://redundant-server:5673?ssl='true''&failover='roundrobin'
> > amqp://guest:guest@/test?brokerlist='vm://:1'&failover='nofailover'
> >
> >
> >
> > This implies that the user info (ie guest:guest) are not required.
>
> Yes the documentation does imply that, all though the code doesn't reflect
> it.
> I sincerely apologize for this mistake.
> One of the biggest issues we have right now is that our documentation
> is sometimes out of sync with the code.
> We are trying to address this as a matter of priority.
>
> All though the code treats the user_info as mandatory sometimes it
> doesn't make sense especially when using mechanisms like anon or
> kerberos.
> So IMO the documentation is correct and the username/password should
> be optional.
> However looking at the svn history, it seems that the user info has
> always been treated mandatory.
>
> We should either fix the code or the documentation.
> Would you like to create a JIRA for this?
> Again sorry for the inconvenience.
>
> > Since we are using no auth on the qpid broker anything we pass here
> > will make us fail authentication.
>
> If you have disabled authentication in the broker then there should
> not be any problem.
> Could you please let us know if you are using the trunk broker or if
> you are using a particular release.
> Also please paste the output of the broker.
>
> > So we decided to try a form without a username/password. This seemed
> > logical to us because we have python code that is not providing
> > username/password.
>
> As explained above the code does not treat the userinfo as optional.
>
> > However, when we user a url without username:password info, The code
> > throws an exception internally which is logged as a warning message to
> > us:
> > WARNING: Unable to createFactories:User information not found on url
> > between indicies 7 and 1
> >
> > I dug through some of the java client code and found lines 86-111 of
> > org/apache/qpid/client/url/URLParser.java is attempting to retrieve the
> user
> > info from the url string, and doesn't find it, so it stops parsing the
> rest
> > of the url and throws an exception. Control of the program then flows
> back
> > to the createFactory method of
> > org/apache/qpid/jndi/PropertiesFileInitialContextFactory.java where the
> > WARNING message is logged and ConnectionFactory is not created thus
> cannot
> > be used.
> >
> > Looking through the code I don't see any way for a java client to connect
> > without providing credentials.
> > Can anyone think of a work around?
> >
> > On Wed, Dec 9, 2009 at 6:18 PM, Rajith Attapattu <rajith77@gmail.com>
> wrote:
> >
> >> Could you please run the broker with -t and paste the output of the
> broker?
> >> Are you using a specific release of the c++ broker or is it built from
> >> trunk?
> >>
> >> Rajith
> >>
> >> On Wed, Dec 9, 2009 at 6:08 PM, Glen Marchesani <glen@model3.net>
> wrote:
> >> > Hi I am Brant's co-worker and can confirm the server is setup for
> >> no-auth.
> >> >
> >> > We are trying to migrate working python code to work in the java
> client
> >> and
> >> > as Brant has pointed out can't form a url for the java client that
> works.
> >> >
> >> >
> >> > On Wed, Dec 9, 2009 at 4:03 PM, Brant Boehmann <
> brant.boehmann@gmail.com
> >> >wrote:
> >> >
> >> >> I've tried with guest:guest and I get authentication failure shown
in
> >> the
> >> >> stack trace. I think auth is already disabled on the server as the
> >> python
> >> >> code I posted works without providing credentials. If I remove guest:
> >> guest
> >> >> from the url then I get the error about the user info missing in the
> url
> >> >> and
> >> >> I still can't connect. Does anyone have example java code of
> connecting
> >> to
> >> >> a
> >> >> c++ broker with auth disabled?
> >> >>
> >> >> On Dec 9, 2009 11:57 AM, "Rajith Attapattu" <rajith77@gmail.com>
> wrote:
> >> >>
> >> >> start the c++ broker with --auth no
> >> >>
> >> >> If you want authentication enabled, then need to setup SASL in the
> c++
> >> >> broker.
> >> >> Sadly I couldn't find any documentation in the Qpid project, except
> >> >> here https://issues.apache.org/jira/browse/QPID-648
> >> >> If you set it up for the most basic case (username/password) then you
> >> >> could use amqp://guest:guest@clientid
> >> >> /test?brokerlist='tcp://localhost:5672'
> >> >> where guest/guest is the user/pwd.
> >> >>
> >> >> Regards,
> >> >>
> >> >> Rajith
> >> >>
> >> >> On Tue, Dec 8, 2009 at 11:27 PM, Brant Boehmann <
> >> brant.boehmann@gmail.com>
> >> >> wrote: > I have a qpid C...
> >> >> --
> >> >> Regards,
> >> >>
> >> >> Rajith Attapattu
> >> >> Red Hat
> >> >> http://rajith.2rlabs.com/
> >> >>
> >> >> ---------------------------------------------------------------------
> >> >> Apache Qpid - AMQP Messaging Implementation
> >> >> Project:      http://qpid.apache.org
> >> >> Use/Interact: mailto:users-subscribe@qpid.apache.org
> >> >>
> >> >
> >>
> >>
> >>
> >> --
> >> Regards,
> >>
> >> Rajith Attapattu
> >> Red Hat
> >> http://rajith.2rlabs.com/
> >>
> >> ---------------------------------------------------------------------
> >> Apache Qpid - AMQP Messaging Implementation
> >> Project:      http://qpid.apache.org
> >> Use/Interact: mailto:users-subscribe@qpid.apache.org
> >>
> >>
> >
>
>
>
> --
> Regards,
>
> Rajith Attapattu
> Red Hat
> http://rajith.2rlabs.com/
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message