You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by mir_akhil <ak...@gmail.com> on 2008/04/03 10:49:29 UTC

Unable to connect to remote broker

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();
--------------------------------------------

-- 
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.


Re: Unable to connect to remote broker

Posted by mir_akhil <ak...@gmail.com>.
Now it is working properly the issue was with the Windows FireWall, after
disabling firewall it started working..


mir_akhil wrote:
> 
> Hi
> I have tried both with and without connectionTimeout property in the
> transport URL
> but it does not work, I think there is some firewall issue in the network
> Iam using (just a thought)
> Thanks
> Akhil
> 
> tmi wrote:
>> 
>> Does it work when you omit the connectionTimeout property in the
>> transport URL?
>> 
>> 
> 
> 

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


Re: Unable to connect to remote broker

Posted by mir_akhil <ak...@gmail.com>.
Hi
I have tried both with and without connectionTimeout property in the
transport URL
but it does not work, I think there is some firewall issue in the network
Iam using (just a thought)
Thanks
Akhil

tmi wrote:
> 
> Does it work when you omit the connectionTimeout property in the transport
> URL?
> 
> 

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


Re: Unable to connect to remote broker

Posted by tmi <mi...@web.de>.
Does it work when you omit the connectionTimeout property in the transport
URL?

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