On 23/01/13 10:41, Bruno Matos wrote:
Hi Fraser,

I have configured logs, and I will point some 'issues' that I found.

Sometimes I can see events, but not queues or exchanges. After waiting
for a while (sometimes I let it run an came back 1 ou 2 minutes later)
and it's all populated.
That's very strange. In implementation terms how things get updated is that there's an AJAX connection to the REST API that does the equivalent of "getWorkItems()" in the QMF API. That's a "long polling" connection in AJAX speak, so basically it does an HTTP Connection and blocks until QMF Events (heartbeat, queueDeclare, bind, whatever occur) when one of these things happens that request returns with the QMF Event response, that triggers a callback which fires off AJAX requests for the various management objects. Each request (for queue, exchange, binding etc.) is a separate AJAX request and I use a jQuery "when()...then()" to trigger a callback to update the pages when all of the requests have returned.

The AJAX stuff has been around in my code for ages and I'm afraid that I've never come across anything like you're describing :-( I've tried it on IE6-IE9, FF 17.0.1, Opera 9 - 12, Chrome (can't recall the version) and Safari on iOS on an iPad 2 and iPod touch 5, also I've tried on an Android phone VM and Tablet VM and I've tinkered on a BlackBerry PlayBook (though not in anger just to see if it looks like it's working OK)


What browser are you running it on? The only thing that I can think of that might cause this behaviour is if the browser has been set so it only supports a minimal number of connections to a server. As I say the Asynchronous Event delivery is done via AJAX long polling, which essentially keeps hold of a connection so if you have a browser with only two connections allowed that could cause something like this. That said like I say I've not seen anything like you describe.

The closest I've seen is in iOS6. That has overly aggressive caching (there's apparently a bug report in with Apple about it) I had issues with updating the image on the button "active" state on iOS because it was trying to do an HTTP GET for the image down the same connection being used for the long polling. I resolved that by using image sprites and better image caching, but I've never seen it for the actual data responses :-/

Some more details on browser etc. might help and if you can figure out any info on the number of connections it supports (if you're able to try a different browser and see how that affects what you are seeing that would be really useful too).

would you be able to describe your setup, maybe that'll give me some clues. You definitely haven't changed "--mgmt-pub-interval" to anything other than the 10s default have you? Though if you are seeing events you should get updates quickly each event that you see will have triggered the AJAX getObjects() equivalent. So I'm still suspecting something odd with browser connections and perhaps some network issues you end?

You've only got a single tab with the UI open haven't you? IIRC most browsers only support a handful of connections to a given domain (which is where my train of thought is headed) but I *think* different tabs would each use some of these, so if you happened to open a few tabs to point to the server that might cause quirky behaviour. I'm suspecting you haven't done this, but I've got to ask :-)

That said I've just opened six tabs in Firefox with no problems, when I opened a seventh it took a little longer for the page to load, but all of the pages look like they are updating with no issues.

I'm afraid I'm a bit baffled on this one, so any more info would be useful.

I'm running Qpid broker 0.18, with authentication=yes (default) and
QpidRestAPI, in a FC18.
In logs, I see

INFO org.apache.qpid.client.AMQConnection - Not a hard-error connection
not closing: org.apache.qpid.AMQException: ch=1 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]

Browser shows RestAPI disconnected.
So have you tried doing:

./QpidRestAPI -a <user>/<passwd>@<broker-host>:<port>

i.e. giving it a connectionURL to the broker that you want to use as the default?

If you just do

./QpidRestAPI

with no options the default connection url will be <host-QpidRestAPI-is-on>:5672 and if you have qpidd --auth yes that default one won't authenticate (I think).

I think that you mentioned that if you explicitly add a new QMF Console Connection with the connection URL then you can establish a connection so I'd be really interested to know what happens if you take the URL that you add on the setting page and use that in ./QpidRestAPI -a

If you don't specify anything in the -a the code does:

broker = (broker == null) ? inetaddr.getAddress().getHostAddress() + ":5672" : broker;

Hmm. I'm wondering; "behind the scenes" I end up having to create a Java ConnectionURL object they end up looking like:

amqp://[<user>:<pass>@][<clientid>]<virtualhost>[?<option>='<value>'[&<option>='<value>']]

Looking at the ConnectionHelper class that I put together to create Java ConnectionURLs from various different ConnectionURL formats it looks like that's defaulting the user:pass to guest:guest.

TBH I've only really messed around on brokers with --auth no and that's happy with the guest:guest

As I say above if you configure the -a option with proper credentials it *ought* to work. If you get issues it might be worth trying a full Java Connection URL in the -a option, I'm *pretty sure* that this should be supported.


Is the code in the Qpid SVN, or will it be? Should I create JIRAs if I
think I found a problem?

Thank you.


No I'm afraid not, I'm not actually a qpid developer per se I'm really just a Qpid user trying to give something back to the community. I'm hoping that it will ultimately make its way into an official Qpid release. It was actually submitted to the community via the Jira where you'd have downloaded it from. I don't know what the real process is, but at this stage the most useful thing to do might be to collate a list of issues that you've seen and add them as comments to that Jira.

I'll try to have a think about these things ASAP, unfortunately I'm now back doing "the day job" (I took a few weeks off over Xmas to try and finally get the GUI released) so I've only really got weekends, but I'll do what I can within the limits of "family pressure".

HTH,
Frase


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to