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:gu...@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 <[email protected]> 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 <[email protected]> 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 <[email protected] > >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" <[email protected]> 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:gu...@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 < > [email protected]> > >> 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:[email protected] > >> > > > > > > -- > Regards, > > Rajith Attapattu > Red Hat > http://rajith.2rlabs.com/ > > --------------------------------------------------------------------- > Apache Qpid - AMQP Messaging Implementation > Project: http://qpid.apache.org > Use/Interact: mailto:[email protected] > >
