I am getting below error while connecting to my On premise broker from my Azure Java queue publisher. I dont see any connectivity issue. I could ping my broker successfully from my Azure environment.
Result: Failure Exception: JMSException: [BRM.10.9003] JMS: Unable to connect to any brokers in the cluster: XXXXX@XXX.XX.com:6849 Stack: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.microsoft.azure.functions.worker.broker.JavaMethodInvokeInfo.invoke(JavaMethodInvokeInfo.java:22) at com.microsoft.azure.functions.worker.broker.JavaMethodExecutorImpl.execute(JavaMethodExecutorImpl.java:54) at
We don’t see the underlying reason for the connection failures, so you could try to check some usual errors.
Can you check connection factory details. Use jmsadmin tool to see the details. Sometime, the stored hostname is not what you expect and host resolution from the client fails.
Check if you are passing basic auth user/password from client. Check if they are correct.
Check if you are using SSL certificates. Test them in a different envionment.
Any ACL set?
You can try to enable connection/session audit log in server, and see if Azure Java Queue Publisher shows up there. This will help to narrow down the problem between TCP connectivity or Application issue.
We are using Web Methods Broker 9.5. Latest update is that it works with StandardQueueConnectionFactory but not with ClusterQueueConnectionFactory. ClusterQueueConnectionFactory is working fine for all out on premise publishers and subscribers.
You can check if includeAllBrokers is set. There is a possibility that Broker knows each other by a hostname that is resolvable within LAN, but cannot be resolved from outside. So, when Azure Java Publisher connects to one of the Broker and asks for all the cluster Brokers, it gets a list of Brokers with internal hostname that it cannot connect to.
If above is correct, then…
Short term solution: Disable includeAllBrokers, and publisher will use the list and hostname as provided in connection factory.
Solution: Check if you should be using ‘hostname’ parameter in Broker. If yes, then set hostname to a public name that is resolvable both internally in LAN as well as cloud. You will have to rebuild the cluster after setting hostname parameter in awbroker.cfg.
If issue persists, you can check what JMS API is doing. Pass following arguments to your client to generate log file.
Log file will contain diagnostic logs as various functions gets called in JMS API. It is closely tied to internal code, but you can still make out quite a few things from log file.