qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brant Boehmann <brant.boehm...@gmail.com>
Subject Re: C++ broker, java client
Date Thu, 10 Dec 2009 01:57:24 GMT
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.
Since we are using no auth on the qpid broker anything we pass here
will make us fail authentication.
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.
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
>
>

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