adobrin,
it is very strange that individual queues work, but not the global queue count. They all use the same underlying calls (pretty much). I don't know why your zmqstat (the all version) command is erroring with 127.
can you run this command (with your server name ofcourse). If it runs, then it there is a problem in the Java ssh client level otherwise it is in the sshd/zmrcd level. Let's find out.
Code:
$ /opt/zimbra/libexec/zmrc bolton.liquidsys.com
HOST:bolton.liquidsys.com zmqstat all
(out) hold=5071
(out) corrupt=0
(out) deferred=2
(out) active=0
(out) incoming=0 Note that the lines marked OUT are the lines you should get - in your case the counts are probably 0 though.
Since you seem to be hacking zmqstat and what not you should be aware that the "zmqstat all" gets translated into plain "zmqstat" by zmrcd.