Well, it is not perfect method, but if the cluster is not running at all on the given address, it returns an error almost immediately:
$ qpid-cluster admin/admin@rgc001:28610 Failed: error - (111, 'Connection refused') Where as if the cluster is JOINING, it gets stuck inside and waits for some time. But there will be probably lot of other situations when this logic doesn't work - some different states causeing it not to respond etc. Regards Jakub On Fri, Jul 22, 2011 at 17:46, Alan Conway <[email protected]> wrote: >> At the end, the only way would be probably to fix the timeout issue in >> the QMF (eventually write some script with Qpid API - that seems to >> wait nicely). Then the qpid-cluster tool can be used in a following >> way: >> a) Connection error => Not running >> b) Connects and hangs/waits => JOINING state >> c) Returns info that the state is ACTIVE => it is ACTIVE > > How do you distinguish cases a) and b) ? The connection could hang/wait > either because the remote host is down or because it is joining. I don't see > how to distinguish the two. I suppose you could use some other means to ping > the remote host and be sure it is reachable. > > --------------------------------------------------------------------- Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:[email protected]
