You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by _prasad <ku...@gmail.com> on 2008/06/20 23:41:20 UTC

I am abel to ping the machine but still received exception "Could not connect to broker URL"

Hi ,

While developeing an application using Spring & ActiveMQ, I am getting the
following exception. 
Sender is on UNIX machine.
Broker and receiver are running on same Windows machine.
>From UNIX machine , I am able to "ping" successfully to Windows machine
where receiver & broker are running. 
What could be the probable reason that I am getting this exception? Is it
related to Firewall or so? If that is the case, how come I am able to "ping"
then?
Note that if I execute the sender from same windows machine as of
receiver/broker, then it is working fine.

Exception in thread "main"
org.springframework.jms.UncategorizedJmsException: Uncategorized exceptio
n occured during JMS processing; nested exception is javax.jms.JMSException:
Could not connect to br
oker URL: tcp://150.123.186.61:61616. Reason:
java.net.SocketTimeoutException: connect timed out; ne
sted exception is java.net.SocketTimeoutException: connect timed out
Caused by: javax.jms.JMSException: Could not connect to broker URL:
tcp://150.123.186.61:61616. Reas
on: java.net.SocketTimeoutException: connect timed out
        at
org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:35)
        at
org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnection
Factory.java:278)
        at
org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnection
Factory.java:222)
        at
org.apache.activemq.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.
java:170)
        at
org.springframework.jms.support.JmsAccessor.createConnection(JmsAccessor.java:188)
        at
org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:427)
        at
org.springframework.jms.core.JmsTemplate.send(JmsTemplate.java:480)
        at com.Sender.main(Sender.java:19)
Caused by: java.net.SocketTimeoutException: connect timed out
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
        at
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
        at java.net.Socket.connect(Socket.java:507)
        at
org.apache.activemq.transport.tcp.TcpTransport.connect(TcpTransport.java:414)
        at
org.apache.activemq.transport.tcp.TcpTransport.doStart(TcpTransport.java:380)
        at
org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:50)
        at
org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:57)
        at
org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:57)
        at
org.apache.activemq.transport.WireFormatNegotiator.start(WireFormatNegotiator.java:72)
        at
org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:57)
        at
org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:57)
        at
org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnection
Factory.java:258)
        ... 6 more
-- 
View this message in context: http://www.nabble.com/I-am-abel-to-ping-the-machine-but-still-received-exception-%22Could-not-connect-to-broker-URL%22-tp18037869p18037869.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: I am abel to ping the machine but still received exception "Could not connect to broker URL"

Posted by _prasad <ku...@gmail.com>.
hey Thanks Sridhar2008.

I don't know what is the reason. But here is what I did :
Installed broker on UNIX and started it there. Then I sent few messages from
windows machine to unix bix and that worked.
" I guess this issue was related to firewall - windows machine is not
accessible from unix, but unix machine is accessible from windows machine. "

Thanks,



Sridhar2008 wrote:
> 
> 
> I am suspecting it might be a firewall (based on info in this thread)
> issue.  Here are debugging suggestions: 
> 1. Move broker to the unix m/c with sender app. Can the consumer connect ?
> 2. If you can do http to the windows m/c - you can, for example, forward
> port 80 on your windows machine
>    to the broker port 61616 (it is easy to do this on linux, I am assuming
> some app like putty can do this on win).   If this checks out, you know it
> is firewall issue (your admins may not like this port forwarding beyond
> debugging).
> 
>  > Is it related to Firewall or so? If that is the case, how come I am
> able to "ping" then?
> Corporate firewall config  is usually tailored for tcp/udp connections.
> 
> 
> _prasad wrote:
>> 
>> Here is the output of telnet.
>> 
>> bash-3.00$  telnet 150.123.186.61 61616
>> Trying 150.123.186.61...
>> Connected to 150.123.186.61.
>> Escape character is '^]'.
>> ÙActiveMQTightEncodingEnabled  
>> CacheSizeTcpNoDelayEnabledSizePrefixDisabledStackTraceEnabled
>> MaxInactivityDurationInitalDelay'MaxInactivityDurationu0
>>                                                                      
>> CacheEnabledVT102Connection to 150.123.186.61 closed by foreign host.
>> bash-3.00$
>> 
>> 
>> Sridhar2008 wrote:
>>> 
>>> Does  'telnet 150.123.186.61 61616' work from you unix machine ? 
>>> 
>>> 
>>> 
>>> _prasad wrote:
>>>> 
>>>> Hi ,
>>>> 
>>>> While developeing an application using Spring & ActiveMQ, I am getting
>>>> the following exception. 
>>>> Sender is on UNIX machine.
>>>> Broker and receiver are running on same Windows machine.
>>>> From UNIX machine , I am able to "ping" successfully to Windows machine
>>>> where receiver & broker are running. 
>>>> What could be the probable reason that I am getting this exception? Is
>>>> it related to Firewall or so? If that is the case, how come I am able
>>>> to "ping" then?
>>>> Note that if I execute the sender from same windows machine as of
>>>> receiver/broker, then it is working fine.
>>>> 
>>>> Exception in thread "main"
>>>> org.springframework.jms.UncategorizedJmsException: Uncategorized
>>>> exceptio
>>>> n occured during JMS processing; nested exception is
>>>> javax.jms.JMSException: Could not connect to br
>>>> oker URL: tcp://150.123.186.61:61616. Reason:
>>>> java.net.SocketTimeoutException: connect timed out; ne
>>>> sted exception is java.net.SocketTimeoutException: connect timed out
>>>> Caused by: javax.jms.JMSException: Could not connect to broker URL:
>>>> tcp://150.123.186.61:61616. Reas
>>>> on: java.net.SocketTimeoutException: connect timed out
>>>>         at
>>>> org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:35)
>>>>         at
>>>> org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnection
>>>> Factory.java:278)
>>>>         at
>>>> org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnection
>>>> Factory.java:222)
>>>>         at
>>>> org.apache.activemq.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.
>>>> java:170)
>>>>         at
>>>> org.springframework.jms.support.JmsAccessor.createConnection(JmsAccessor.java:188)
>>>>         at
>>>> org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:427)
>>>>         at
>>>> org.springframework.jms.core.JmsTemplate.send(JmsTemplate.java:480)
>>>>         at com.Sender.main(Sender.java:19)
>>>> Caused by: java.net.SocketTimeoutException: connect timed out
>>>>         at java.net.PlainSocketImpl.socketConnect(Native Method)
>>>>         at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
>>>>         at
>>>> java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
>>>>         at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
>>>>         at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
>>>>         at java.net.Socket.connect(Socket.java:507)
>>>>         at
>>>> org.apache.activemq.transport.tcp.TcpTransport.connect(TcpTransport.java:414)
>>>>         at
>>>> org.apache.activemq.transport.tcp.TcpTransport.doStart(TcpTransport.java:380)
>>>>         at
>>>> org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:50)
>>>>         at
>>>> org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:57)
>>>>         at
>>>> org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:57)
>>>>         at
>>>> org.apache.activemq.transport.WireFormatNegotiator.start(WireFormatNegotiator.java:72)
>>>>         at
>>>> org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:57)
>>>>         at
>>>> org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:57)
>>>>         at
>>>> org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnection
>>>> Factory.java:258)
>>>>         ... 6 more
>>>> 
>>> 
>>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/I-am-abel-to-ping-the-machine-but-still-received-exception-%22Could-not-connect-to-broker-URL%22-tp18037869p18074781.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: I am abel to ping the machine but still received exception "Could not connect to broker URL"

Posted by Sridhar2008 <ac...@komandur.com>.

I am suspecting it might be a firewall (based on info in this thread) issue. 
Here are debugging suggestions: 
1. Move broker to the unix m/c with sender app. Can the consumer connect ?
2. If you can do http to the windows m/c - you can, for example, forward
port 80 on your windows machine
   to the broker port 61616 (it is easy to do this on linux, I am assuming
some app like putty can do this on win).   If this checks out, you know it
is firewall issue (your admins may not like this port forwarding beyond
debugging).

 > Is it related to Firewall or so? If that is the case, how come I am able
to "ping" then?
Corporate firewall config  is usually tailored for tcp/udp connections.


_prasad wrote:
> 
> Here is the output of telnet.
> 
> bash-3.00$  telnet 150.123.186.61 61616
> Trying 150.123.186.61...
> Connected to 150.123.186.61.
> Escape character is '^]'.
> ÙActiveMQTightEncodingEnabled  
> CacheSizeTcpNoDelayEnabledSizePrefixDisabledStackTraceEnabled
> MaxInactivityDurationInitalDelay'MaxInactivityDurationu0
>                                                                      
> CacheEnabledVT102Connection to 150.123.186.61 closed by foreign host.
> bash-3.00$
> 
> 
> Sridhar2008 wrote:
>> 
>> Does  'telnet 150.123.186.61 61616' work from you unix machine ? 
>> 
>> 
>> 
>> _prasad wrote:
>>> 
>>> Hi ,
>>> 
>>> While developeing an application using Spring & ActiveMQ, I am getting
>>> the following exception. 
>>> Sender is on UNIX machine.
>>> Broker and receiver are running on same Windows machine.
>>> From UNIX machine , I am able to "ping" successfully to Windows machine
>>> where receiver & broker are running. 
>>> What could be the probable reason that I am getting this exception? Is
>>> it related to Firewall or so? If that is the case, how come I am able to
>>> "ping" then?
>>> Note that if I execute the sender from same windows machine as of
>>> receiver/broker, then it is working fine.
>>> 
>>> Exception in thread "main"
>>> org.springframework.jms.UncategorizedJmsException: Uncategorized
>>> exceptio
>>> n occured during JMS processing; nested exception is
>>> javax.jms.JMSException: Could not connect to br
>>> oker URL: tcp://150.123.186.61:61616. Reason:
>>> java.net.SocketTimeoutException: connect timed out; ne
>>> sted exception is java.net.SocketTimeoutException: connect timed out
>>> Caused by: javax.jms.JMSException: Could not connect to broker URL:
>>> tcp://150.123.186.61:61616. Reas
>>> on: java.net.SocketTimeoutException: connect timed out
>>>         at
>>> org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:35)
>>>         at
>>> org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnection
>>> Factory.java:278)
>>>         at
>>> org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnection
>>> Factory.java:222)
>>>         at
>>> org.apache.activemq.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.
>>> java:170)
>>>         at
>>> org.springframework.jms.support.JmsAccessor.createConnection(JmsAccessor.java:188)
>>>         at
>>> org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:427)
>>>         at
>>> org.springframework.jms.core.JmsTemplate.send(JmsTemplate.java:480)
>>>         at com.Sender.main(Sender.java:19)
>>> Caused by: java.net.SocketTimeoutException: connect timed out
>>>         at java.net.PlainSocketImpl.socketConnect(Native Method)
>>>         at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
>>>         at
>>> java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
>>>         at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
>>>         at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
>>>         at java.net.Socket.connect(Socket.java:507)
>>>         at
>>> org.apache.activemq.transport.tcp.TcpTransport.connect(TcpTransport.java:414)
>>>         at
>>> org.apache.activemq.transport.tcp.TcpTransport.doStart(TcpTransport.java:380)
>>>         at
>>> org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:50)
>>>         at
>>> org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:57)
>>>         at
>>> org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:57)
>>>         at
>>> org.apache.activemq.transport.WireFormatNegotiator.start(WireFormatNegotiator.java:72)
>>>         at
>>> org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:57)
>>>         at
>>> org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:57)
>>>         at
>>> org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnection
>>> Factory.java:258)
>>>         ... 6 more
>>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/I-am-abel-to-ping-the-machine-but-still-received-exception-%22Could-not-connect-to-broker-URL%22-tp18037869p18074445.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: I am abel to ping the machine but still received exception "Could not connect to broker URL"

Posted by _prasad <ku...@gmail.com>.
Here is the output of telnet.

bash-3.00$  telnet 150.123.186.61 61616
Trying 150.123.186.61...
Connected to 150.123.186.61.
Escape character is '^]'.
ÙActiveMQTightEncodingEnabled  
CacheSizeTcpNoDelayEnabledSizePrefixDisabledStackTraceEnabled
MaxInactivityDurationInitalDelay'MaxInactivityDurationu0
                                                                     
CacheEnabledVT102Connection to 150.123.186.61 closed by foreign host.
bash-3.00$


Sridhar2008 wrote:
> 
> Does  'telnet 150.123.186.61 61616' work from you unix machine ? 
> 
> 
> 
> _prasad wrote:
>> 
>> Hi ,
>> 
>> While developeing an application using Spring & ActiveMQ, I am getting
>> the following exception. 
>> Sender is on UNIX machine.
>> Broker and receiver are running on same Windows machine.
>> From UNIX machine , I am able to "ping" successfully to Windows machine
>> where receiver & broker are running. 
>> What could be the probable reason that I am getting this exception? Is it
>> related to Firewall or so? If that is the case, how come I am able to
>> "ping" then?
>> Note that if I execute the sender from same windows machine as of
>> receiver/broker, then it is working fine.
>> 
>> Exception in thread "main"
>> org.springframework.jms.UncategorizedJmsException: Uncategorized exceptio
>> n occured during JMS processing; nested exception is
>> javax.jms.JMSException: Could not connect to br
>> oker URL: tcp://150.123.186.61:61616. Reason:
>> java.net.SocketTimeoutException: connect timed out; ne
>> sted exception is java.net.SocketTimeoutException: connect timed out
>> Caused by: javax.jms.JMSException: Could not connect to broker URL:
>> tcp://150.123.186.61:61616. Reas
>> on: java.net.SocketTimeoutException: connect timed out
>>         at
>> org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:35)
>>         at
>> org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnection
>> Factory.java:278)
>>         at
>> org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnection
>> Factory.java:222)
>>         at
>> org.apache.activemq.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.
>> java:170)
>>         at
>> org.springframework.jms.support.JmsAccessor.createConnection(JmsAccessor.java:188)
>>         at
>> org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:427)
>>         at
>> org.springframework.jms.core.JmsTemplate.send(JmsTemplate.java:480)
>>         at com.Sender.main(Sender.java:19)
>> Caused by: java.net.SocketTimeoutException: connect timed out
>>         at java.net.PlainSocketImpl.socketConnect(Native Method)
>>         at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
>>         at
>> java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
>>         at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
>>         at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
>>         at java.net.Socket.connect(Socket.java:507)
>>         at
>> org.apache.activemq.transport.tcp.TcpTransport.connect(TcpTransport.java:414)
>>         at
>> org.apache.activemq.transport.tcp.TcpTransport.doStart(TcpTransport.java:380)
>>         at
>> org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:50)
>>         at
>> org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:57)
>>         at
>> org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:57)
>>         at
>> org.apache.activemq.transport.WireFormatNegotiator.start(WireFormatNegotiator.java:72)
>>         at
>> org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:57)
>>         at
>> org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:57)
>>         at
>> org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnection
>> Factory.java:258)
>>         ... 6 more
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/I-am-abel-to-ping-the-machine-but-still-received-exception-%22Could-not-connect-to-broker-URL%22-tp18037869p18039353.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: I am abel to ping the machine but still received exception "Could not connect to broker URL"

Posted by Sridhar2008 <ac...@komandur.com>.
Does  'telnet 150.123.186.61 61616' work from you unix machine ? 



_prasad wrote:
> 
> Hi ,
> 
> While developeing an application using Spring & ActiveMQ, I am getting the
> following exception. 
> Sender is on UNIX machine.
> Broker and receiver are running on same Windows machine.
> From UNIX machine , I am able to "ping" successfully to Windows machine
> where receiver & broker are running. 
> What could be the probable reason that I am getting this exception? Is it
> related to Firewall or so? If that is the case, how come I am able to
> "ping" then?
> Note that if I execute the sender from same windows machine as of
> receiver/broker, then it is working fine.
> 
> Exception in thread "main"
> org.springframework.jms.UncategorizedJmsException: Uncategorized exceptio
> n occured during JMS processing; nested exception is
> javax.jms.JMSException: Could not connect to br
> oker URL: tcp://150.123.186.61:61616. Reason:
> java.net.SocketTimeoutException: connect timed out; ne
> sted exception is java.net.SocketTimeoutException: connect timed out
> Caused by: javax.jms.JMSException: Could not connect to broker URL:
> tcp://150.123.186.61:61616. Reas
> on: java.net.SocketTimeoutException: connect timed out
>         at
> org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:35)
>         at
> org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnection
> Factory.java:278)
>         at
> org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnection
> Factory.java:222)
>         at
> org.apache.activemq.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.
> java:170)
>         at
> org.springframework.jms.support.JmsAccessor.createConnection(JmsAccessor.java:188)
>         at
> org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:427)
>         at
> org.springframework.jms.core.JmsTemplate.send(JmsTemplate.java:480)
>         at com.Sender.main(Sender.java:19)
> Caused by: java.net.SocketTimeoutException: connect timed out
>         at java.net.PlainSocketImpl.socketConnect(Native Method)
>         at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
>         at
> java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
>         at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
>         at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
>         at java.net.Socket.connect(Socket.java:507)
>         at
> org.apache.activemq.transport.tcp.TcpTransport.connect(TcpTransport.java:414)
>         at
> org.apache.activemq.transport.tcp.TcpTransport.doStart(TcpTransport.java:380)
>         at
> org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:50)
>         at
> org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:57)
>         at
> org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:57)
>         at
> org.apache.activemq.transport.WireFormatNegotiator.start(WireFormatNegotiator.java:72)
>         at
> org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:57)
>         at
> org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:57)
>         at
> org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnection
> Factory.java:258)
>         ... 6 more
> 

-- 
View this message in context: http://www.nabble.com/I-am-abel-to-ping-the-machine-but-still-received-exception-%22Could-not-connect-to-broker-URL%22-tp18037869p18038600.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.