activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mir_akhil <akhil.ha...@gmail.com>
Subject Unable to connect to remote broker
Date Thu, 03 Apr 2008 10:22:27 GMT

Hi,
I have started broker in one machine & try to connect it from listener in
another machine, I am getting following error
--------------------
In machine where broker is running

[java] 13:52:11 ERROR Could not accept connection : Connection reset by
peer: socket write error
--------------------------------
In machine where listener is running

Exception in thread "main" javax.jms.JMSException: 
Could not connect to broker URL: tcp://pc024159:61616?connectionTimeout=0.
Reason: java.net.ConnectException: Connection timed out: connect

at
org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:35)
at
org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:276)

------------------------------------------
listener code
-------------
 ActiveMQConnectionFactory connectionFactory =
      new ActiveMQConnectionFactory("tcp://myhostname:61616");
    connection = connectionFactory.createConnection();
    session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
    Queue request = session.createQueue("request.queue");
    consumer = session.createConsumer(request);
    consumer.setMessageListener(this);
   connection.start();
--------------------------------------------
I have tried pinging the machines there is no network problem

Thanks
Akhil

-- 
View this message in context: http://www.nabble.com/Unable-to-connect-to-remote-broker-tp16467328s2354p16467328.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message