The question I am about to ask has been asked here before. An answer has been given by David Ingham reciting this Microsoft Document. A confirmation has been provided by Sentinel that the solution works.
Yet, I have the same problem. I follow the Microsoft document to the letter, however, still have the same issue.
At the risk of being redundant, the issue is that when using Qpid-JMS Client libraries(versions 0.22 or 0.26) to connect to the Service Bus (1.1) on Windows Server (NOT Azure) and following all directions from Microsoft which include
- Generating RootCA certificate and applying it to the Java truststore
- Using your Windows Login user/password
- Using the amqps://[user]:[pwd]@FQDN/[namespace] connection factory string
- Using the [namespace]/[queuename] as your physical queue name.
Context lookups, connection creation, session creation all work fine. But when it is time to create a MessageProducer or MessageConsumer I get errors.
For MessageProducer creation (does not matter if it is for a queue or a topic) I always get
Caused by: org.apache.qpid.amqp_1_0.client.Sender$SenderCreationException:
Peer did not create remote endpoint for link, target: testns/testq1
at org.apache.qpid.amqp_1_0.client.Sender.<init>(Sender.java:171)
For MessageConsumer creation I get
javax.jms.JMSException
at org.apache.qpid.amqp_1_0.jms.impl.MessageConsumerImpl.createClientReceiver(MessageConsumerImpl.java:164)
at org.apache.qpid.amqp_1_0.jms.impl.MessageConsumerImpl.<init>(MessageConsumerImpl.java:120)
Here are several things I have tried.
- My Service Bus is installed on a Windows 2012 Server. My Client is running from another Windows 2012 Server. But I have also moved the client to the server where Service Bus is running with no resolution. (So this is not a location issue)
- When I take the cert out of the truststore I get an appropriate error. When I insert it back error goes away. (So this is not a cert issue)
- When I intentionally misspell my Windows username or password I get Authentication error. Otherwise error goes away. (So this is not a user/pwd issue)
- It seems that it does not matter that I explicitly type the port number 5671 in the connection string. In either case connection creation works fine. (So it is not a connection issue)
- Defining the namespace in connection string or in queue definition does not seem to matter. It fails in both cases.
- I have downloaded the source code for Qpid-JMS-Client (0.22) and stepped through the debugger. The target (the address of the queue to be connected) is set correctly when connection is created but it gets reset to null right after leaving a synchronized block, which causes the error (In the case of MessageProducer)
What did I miss from the original Microsoft documentation (which is confirmed by the user named Sentinel that it works)?
Any help would be greatly appreciated. Thank you, -Dogan Atay