Hi Bruno,
Yes that's exactly what I thought was happening too.....

Please do take a look at some of the other posts I've made to the mailing list over the last few days.

I made a post entitled "Could somebody *please* explain Java Connection URLs" to which Pavel Moravec kindly replied:

"

Hi Fraser,
there is a bug in Java client disallowing no credentials option, 
seehttps://issues.apache.org/jira/browse/QPID-3396.

Kind regards,
Pavel
"

As you may have gathered the "back end" part of the GUI is the QpidRestAPI written in Java. You may or may not know this but Java has a particular ConnectionURL format documented here:

http://qpid.apache.org/books/0.20/Programming-In-Apache-Qpid/html/QpidJNDI.html#section-jms-connection-url

They aren't erm the "most convenient" form to do things with so what I did was to write a helper class called "ConnectionHelper" that can take URLs in all the main formats - the Java one just gets passed through, the one used by the python tools (guest/guest@host:port) and the amqp URL used in qpid::messaging should all work and the Class basically constructs a Java form Connection URL to pass to JNDI.

Anyways as you've observed if no username/password is supplied this defaults to amqp://guest:guest@...... when I saw your last post I clocked that and took a closer look.

The spec says "amqp://[<user>:<pass>@][<clientid>]<virtualhost>[?<option>='<value>'[&<option>='<value>']]" so the user/pass *should* be optional, however unfortunately it's not.

I actually started writing that bit an age back ~18 months and I got bitten then and forgot about it until your post. I had another go trying different approaches, but if you look at my posting there's basically currently no way in Java to specify a user ID on anonymous (well no way that I've come across and nobody apart from Pavel replied to my post so I'm assuming that there won't be a way until that bug is fixed).

So from the perspective of my code I'm not sure that there's much I can do unless someone can suggest a Connection URL for connecting as anonymous - if they can I'll happily change the code to support that.

All I can suggest for the moment if you want to use --auth yes is to add a "guest" user in SASL, or better yet a real username/password - TBH if you're not doing that you might as well use --auth no.

I hope that this doesn't seem to be a cop-out, I've genuinely tried to come up with something - in between getting it to work on Qpid 0.20 :-(

One possibility is for me to take a look at the patch mentioned in Pavel's response. It might be possible for me to create a Connection using the Qpid specific implementation classes rather than constructing a Connection URL and using the ConnectionFactory. It's not ideal but I suspect that it might work, but then I'll be a bit at the beck and call if someone tinkers around with those.


As an aside you didn't give me any info on the browser you were using etc. I still can't think of any reason why it'd take as long as you've been suggesting to get updates to queues/exchanges etc. Have you tried the new option I've added to disable QMF Events. That switch basically switches that particular connection to use timed polling for updates instead of receiving Events and using heartbeats to trigger updates. Because the async event approach uses AJAX long-polling which "hogs" an HTTP connection if you've got a browser with limited connections available disabling QMF Events and using a timer driven poll just might be more responsive.

It was just a hunch really, but if neither approach give updates pretty regularly every 10 seconds then I'd point the finger at something network related on your end. I've never experience the sort of symptoms you described and I'd be most interested to hear from others. I'm afraid that I can't think what it could be other than I've posted here.

Regards,
Frase

Hi Frase,

Sorry for the late reply. I've just installed version 1.1 and it shows
the following message in log:

[IoReceiver - 'my-broker-address'] INFO
org.apache.qpid.client.AMQConnection - Not a hard-error connection not
closing: org.apache.qpid.AMQException: ch=0 id=7
ExecutionException(errorCode=UNAUTHORIZED_ACCESS, commandId=14,
classCode=0, commandCode=0, fieldIndex=0,
description=unauthorized-access: authorised user id : anonymous@QPID but
user id in message declared as guest
(qpid/broker/SemanticState.cpp:484), errorInfo={}) [error code 403:
access refused]

I think that the empty string in authentication means 'anonymous' for
the Broker, but you are forcing 'guest' in messages' userId field. I
made a quick search in the code, but I was not able to do quick fix.

Regards.



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
For additional commands, e-mail: users-h...@qpid.apache.org

Reply via email to