Hi,

We have been having cases recently were people cannnot connect to our
ActiveMQ (4.1) when using proxies. After lots of digging, i have found that
the issue may be in this class:
org.apache.activemq.transport.tcp.TcpTransport and especially in the
connect() method. There we call remoteAddress.getAddress() which will cause
a remote address to be resolved. This means a trip to the dns server to get
the address.

In restrictive environments, where only a proxy can do this, this dns lookup
will fail and we see something on the DEBUG level that looks like this:

DEBUG [28.08.07 15:38:33.690] Connect fail to: [someaddress:someport],
reason: java.lang.NullPointerException

(btw, we are using failover transport)

The code "works on my machine" because i am allowed to resolve external ip
addresses.

But some people's computers are not allowed and they have to connect to the
proxy to do this.

A final proof that this issue is at play is that we have http transport
configured (with SSL) and if they open the Http transport URL on their
browser, they get notified about a certificate. but via activeMQ, the
connection fails.

My only workaround for this is to put the host's ip in the user's /etc/hosts
file or in C:\WINDOWS\system32\drivers\etc

To reproduce the problem, use the hostname that cannot be resolved to an IP
in your connection URI.

Is this a bug? or a feature? ;)

Regards,

Saqib
-- 
View this message in context: 
http://www.nabble.com/ActiveMQ-Tries-to-resolve-ip-adresses-to-names-which-failes-when-only-a-proxy-should-do-that-tf4354047s2354.html#a12406430
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to