activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ivan (JIRA)" <>
Subject [jira] Updated: (AMQ-2776) Connection refused when using shortname in activemqurl
Date Wed, 30 Jun 2010 01:52:51 GMT


Ivan updated AMQ-2776:

    Attachment: activemq-2776.patch

I try to investigate the problem a bit. Before TCPTransport tries to connect the remote server,
it would first call the resolveHost method to check whether the target remote host is the
local machine, also it will check a boolean tag useLocalHost. From the comments in the codes,
it said in Mac, there is a problem while trying to connect the local machine with its hostname.
But, I am not sure whether it is a good choice in other platforms, usually the hostname is
corresponding to the actual IP. Since the user configures the target server with hostname,
it means that the actual IP is expected to connect to, because the server is only binding
to actual IP, not the localhost ( interface. 
I attached a patch, it just initialize the useLocalHost depending on the OS platform.

> Connection refused when using shortname in activemqurl
> ------------------------------------------------------
>                 Key: AMQ-2776
>                 URL:
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Connector
>    Affects Versions: 5.3.2, 5.4.0
>         Environment: Suse 10 Sp2
>            Reporter: vioa lu
>             Fix For: 5.4.0
>         Attachments: activemq-2776.patch
> 1. On server suse10sp268, start activemq , then run activemq-admin.bat browse --amqurl
tcp://suse10sp268:61616 TEST.FOO , got excecption Caused by: javax.jms.JMSException: Could
not connect to broker URL: tcp://suse10sp268:61616. Reason: Connection
refused: connect
> at org.apache.activemq.util.JMSExceptionSupport.create(
> at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(
> at org.apache.activemq.ActiveMQConnectionFactory.createConnection(
> at org.apache.activemq.ra.ActiveMQConnectionSupport.makeConnection(
> at org.apache.activemq.ra.ActiveMQConnectionSupport.makeConnection(
> at org.apache.activemq.ra.ActiveMQManagedConnectionFactory.createManagedConnection(
> ... 42 more
> Caused by: Connection refused: connect
> at Method)
> at
> at
> at
> at
> at
> at org.apache.activemq.transport.tcp.TcpTransport.connect(
> at org.apache.activemq.transport.tcp.TcpTransport.doStart(
> at org.apache.activemq.util.ServiceSupport.start(
> at org.apache.activemq.transport.TransportFilter.start(
> at org.apache.activemq.transport.TransportFilter.start(
> at org.apache.activemq.transport.WireFormatNegotiator.start(
> at org.apache.activemq.transport.TransportFilter.start(
> at org.apache.activemq.transport.TransportFilter.start(
> at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(
> This  happened also when got error starting activemq-ra module in geronimo

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message