Unknown hostname exception when trying to connect to qpid host

910 views Asked by At

I am using qpid broker(0.28) and qpid JMS client to communicate to the broker. I want to use amqp1.0 protocol and when I try the example given here, using a connection url as amqp://guest:guest@localhost:5672?clientid=test, I get error as it is not able to connect to the qpid host

Caught exception: Unknown hostname localhostjavax.jms.JMSException: Unknown hostname localhost
    at org.apache.qpid.amqp_1_0.jms.impl.SessionImpl.(SessionImpl.java:97)
    at org.apache.qpid.amqp_1_0.jms.impl.ConnectionImpl.createSession(ConnectionImpl.java:231)
    at org.apache.qpid.amqp_1_0.jms.impl.ConnectionImpl.createSession(ConnectionImpl.java:210)
    at org.apache.qpid.amqp_1_0.jms.impl.ConnectionImpl.createSession(ConnectionImpl.java:40)

When I change my connection url to amqp://guest:guest@localhost:5672?clientid=test&remote-host=default I get an error as

Caused by: org.apache.qpid.amqp_1_0.client.Sender$SenderCreationException: Peer did not create remote endpoint for link, target: ping
    at org.apache.qpid.amqp_1_0.client.Sender.(Sender.java:185)
    at org.apache.qpid.amqp_1_0.client.Sender.(Sender.java:113)
    at org.apache.qpid.amqp_1_0.client.Sender.(Sender.java:106)
    at org.apache.qpid.amqp_1_0.client.Sender.(Sender.java:92)
    at org.apache.qpid.amqp_1_0.client.Sender.(Sender.java:78)
    at org.apache.qpid.amqp_1_0.client.Sender.(Sender.java:72)
    at org.apache.qpid.amqp_1_0.client.Session$1.(Session.java:90)
    at org.apache.qpid.amqp_1_0.client.Session.createSender(Session.java:89)

Can someone please help in understanding what exactly is happening? What wrong am I doing?

0

There are 0 answers