[jira] Created: (AMQ-2776) Connection refused when using shortname in activemqurl

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (AMQ-2776) Connection refused when using shortname in activemqurl

JIRA jira@apache.org
Connection refused when using shortname in activemqurl
------------------------------------------------------

                 Key: AMQ-2776
                 URL: https://issues.apache.org/activemq/browse/AMQ-2776
             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


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: java.net.ConnectException: Connection refused: connect
at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:35)
at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:286)
at org.apache.activemq.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:185)
at org.apache.activemq.ra.ActiveMQConnectionSupport.makeConnection(ActiveMQConnectionSupport.java:79)
at org.apache.activemq.ra.ActiveMQConnectionSupport.makeConnection(ActiveMQConnectionSupport.java:61)
at org.apache.activemq.ra.ActiveMQManagedConnectionFactory.createManagedConnection(ActiveMQManagedConnectionFactory.java:169)
... 42 more
Caused by: java.net.ConnectException: Connection refused: connect
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:519)
at org.apache.activemq.transport.tcp.TcpTransport.connect(TcpTransport.java:483)
at org.apache.activemq.transport.tcp.TcpTransport.doStart(TcpTransport.java:446)
at org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:53)
at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)
at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)
at org.apache.activemq.transport.WireFormatNegotiator.start(WireFormatNegotiator.java:72)
at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)
at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)
at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:266)

This  happened also when got error starting activemq-ra module in geronimo
https://issues.apache.org/jira/browse/GERONIMO-5371

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

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (AMQ-2776) Connection refused when using shortname in activemqurl

JIRA jira@apache.org

    [ https://issues.apache.org/activemq/browse/AMQ-2776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=60045#action_60045 ]

Gary Tully commented on AMQ-2776:
---------------------------------

Is this a case of https://issues.apache.org/activemq/browse/AMQ-2094 - does the broker transportConnector use localhost?

> Connection refused when using shortname in activemqurl
> ------------------------------------------------------
>
>                 Key: AMQ-2776
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2776
>             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
>
>
> 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: java.net.ConnectException: Connection refused: connect
> at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:35)
> at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:286)
> at org.apache.activemq.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:185)
> at org.apache.activemq.ra.ActiveMQConnectionSupport.makeConnection(ActiveMQConnectionSupport.java:79)
> at org.apache.activemq.ra.ActiveMQConnectionSupport.makeConnection(ActiveMQConnectionSupport.java:61)
> at org.apache.activemq.ra.ActiveMQManagedConnectionFactory.createManagedConnection(ActiveMQManagedConnectionFactory.java:169)
> ... 42 more
> Caused by: java.net.ConnectException: Connection refused: connect
> 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:519)
> at org.apache.activemq.transport.tcp.TcpTransport.connect(TcpTransport.java:483)
> at org.apache.activemq.transport.tcp.TcpTransport.doStart(TcpTransport.java:446)
> at org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:53)
> at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)
> at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)
> at org.apache.activemq.transport.WireFormatNegotiator.start(WireFormatNegotiator.java:72)
> at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)
> at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)
> at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:266)
> This  happened also when got error starting activemq-ra module in geronimo
> https://issues.apache.org/jira/browse/GERONIMO-5371

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

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (AMQ-2776) Connection refused when using shortname in activemqurl

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/activemq/browse/AMQ-2776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=60180#action_60180 ]

vioa lu commented on AMQ-2776:
------------------------------

This case is different from amq-2094 case. activemq.sh can bind connector with full/short server host name.

1. Server suse10sp268, i add its ip map into /etc/hosts
9.186.10.68     suse10sp268.site suse10sp268
2.Edit its acitvemq.xml with :
<transportConnectors>
            <transportConnector name="openwire" uri="tcp://suse10sp268:61616"/>
</transportConnectors>

3. Start activemq
 INFO | ActiveMQ 5.3.2 JMS Message Broker (share) is starting
 INFO | For help or more information please see: http://activemq.apache.org/
 INFO | Kaha Store using data directory /share/kr-store/data
 INFO | Listening for connections at: tcp://suse10sp268.site:61616
 INFO | Connector openwire Started
 INFO | ActiveMQ JMS Message Broker (share, ID:suse10sp268-49309-1277133128502-0:0) started
 INFO | Logging to org.slf4j.impl.JCLLoggerAdapter(org.mortbay.log) via org.mortbay.log.Slf4jLog
 INFO | jetty-6.1.9
 INFO | ActiveMQ WebConsole initialized.

4. Then i run
activemq-admin.sh browse --amqurl tcp://suse10sp268:61616 TEST.FOO, it will report error,
ERROR: java.lang.RuntimeException: Failed to execute browse task. Reason: javax.jms.JMSException: Could not connect to broker URL: tcp://suse10sp268:61616. Reason: java.net.ConnectException: Connection refused
java.lang.RuntimeException: Failed to execute browse task. Reason: javax.jms.JMSException: Could not connect to broker URL: tcp://suse10sp268:61616. Reason: java.net.ConnectException: Connection refused
        at org.apache.activemq.console.command.AmqBrowseCommand.runTask(AmqBrowseCommand.java:130)
        at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
        at org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:136)
        at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
        at org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:82)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.activemq.console.Main.runTaskClass(Main.java:251)
        at org.apache.activemq.console.Main.main(Main.java:107)
ERROR: java.lang.Exception: javax.jms.JMSException: Could not connect to broker URL: tcp://suse10sp268:61616. Reason: java.net.ConnectException: Connection refused
java.lang.Exception: javax.jms.JMSException: Could not connect to broker URL: tcp://suse10sp268:61616. Reason: java.net.ConnectException: Connection refused
        at org.apache.activemq.console.command.AmqBrowseCommand.runTask(AmqBrowseCommand.java:131)
        at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
        at org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:136)
        at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
        at org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:82)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.activemq.console.Main.runTaskClass(Main.java:251)
        at org.apache.activemq.console.Main.main(Main.java:107)
Caused by: javax.jms.JMSException: Could not connect to broker URL: tcp://suse10sp268:61616. Reason: java.net.ConnectException: Connection refused
        at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:35)
        at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:286)
        at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:230)
        at org.apache.activemq.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:178)
        at org.apache.activemq.console.filter.AmqMessagesQueryFilter.createConnection(AmqMessagesQueryFilter.java:123)
        at org.apache.activemq.console.filter.AmqMessagesQueryFilter.queryMessages(AmqMessagesQueryFilter.java:87)
        at org.apache.activemq.console.filter.AmqMessagesQueryFilter.query(AmqMessagesQueryFilter.java:72)
        at org.apache.activemq.console.filter.WildcardTransformFilter.query(WildcardTransformFilter.java:60)
        at org.apache.activemq.console.util.AmqMessagesUtil.getMessages(AmqMessagesUtil.java:51)
        at org.apache.activemq.console.command.AmqBrowseCommand.runTask(AmqBrowseCommand.java:117)
        ... 10 more
Caused by: java.net.ConnectException: Connection refused
        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:519)
        at org.apache.activemq.transport.tcp.TcpTransport.connect(TcpTransport.java:436)
        at org.apache.activemq.transport.tcp.TcpTransport.doStart(TcpTransport.java:402)
        at org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:53)
        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(ActiveMQConnectionFactory.java:266)
        ... 18 more


 but if i run
activemq-admin.sh browse --amqurl tcp://suse10sp268.site:61616 TEST.FOO, no error, there is just one difference between two command: server host name, the former is short host name suse10sp268, the latter is full host name: sus10sp268.site
 tcp://suse10sp268:61616
 tcp://suse10sp268.site:61616





> Connection refused when using shortname in activemqurl
> ------------------------------------------------------
>
>                 Key: AMQ-2776
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2776
>             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
>
>
> 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: java.net.ConnectException: Connection refused: connect
> at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:35)
> at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:286)
> at org.apache.activemq.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:185)
> at org.apache.activemq.ra.ActiveMQConnectionSupport.makeConnection(ActiveMQConnectionSupport.java:79)
> at org.apache.activemq.ra.ActiveMQConnectionSupport.makeConnection(ActiveMQConnectionSupport.java:61)
> at org.apache.activemq.ra.ActiveMQManagedConnectionFactory.createManagedConnection(ActiveMQManagedConnectionFactory.java:169)
> ... 42 more
> Caused by: java.net.ConnectException: Connection refused: connect
> 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:519)
> at org.apache.activemq.transport.tcp.TcpTransport.connect(TcpTransport.java:483)
> at org.apache.activemq.transport.tcp.TcpTransport.doStart(TcpTransport.java:446)
> at org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:53)
> at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)
> at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)
> at org.apache.activemq.transport.WireFormatNegotiator.start(WireFormatNegotiator.java:72)
> at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)
> at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)
> at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:266)
> This  happened also when got error starting activemq-ra module in geronimo
> https://issues.apache.org/jira/browse/GERONIMO-5371

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

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (AMQ-2776) Connection refused when using shortname in activemqurl

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/activemq/browse/AMQ-2776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=60182#action_60182 ]

vioa lu commented on AMQ-2776:
------------------------------

if transportConnector is 0.0.0.0, amqurl start log is:
INFO | Listening for connections at: tcp://suse10sp268:61616
if i run :
activemq-admin.sh browse --amqurl tcp://suse10sp268:61616 TEST.FOO, it will work.

if transportConnector is suse10sp268, start log is
INFO | Listening for connections at: tcp://suse10sp268.site:61616
if i run
activemq-admin.sh browse --amqurl tcp://suse10sp268:61616 TEST.FOO, it doesn't work, but "activemq-admin.sh browse --amqurl tcp://suse10sp268.site:61616 TEST.FOO" will work.

> Connection refused when using shortname in activemqurl
> ------------------------------------------------------
>
>                 Key: AMQ-2776
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2776
>             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
>
>
> 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: java.net.ConnectException: Connection refused: connect
> at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:35)
> at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:286)
> at org.apache.activemq.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:185)
> at org.apache.activemq.ra.ActiveMQConnectionSupport.makeConnection(ActiveMQConnectionSupport.java:79)
> at org.apache.activemq.ra.ActiveMQConnectionSupport.makeConnection(ActiveMQConnectionSupport.java:61)
> at org.apache.activemq.ra.ActiveMQManagedConnectionFactory.createManagedConnection(ActiveMQManagedConnectionFactory.java:169)
> ... 42 more
> Caused by: java.net.ConnectException: Connection refused: connect
> 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:519)
> at org.apache.activemq.transport.tcp.TcpTransport.connect(TcpTransport.java:483)
> at org.apache.activemq.transport.tcp.TcpTransport.doStart(TcpTransport.java:446)
> at org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:53)
> at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)
> at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)
> at org.apache.activemq.transport.WireFormatNegotiator.start(WireFormatNegotiator.java:72)
> at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)
> at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)
> at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:266)
> This  happened also when got error starting activemq-ra module in geronimo
> https://issues.apache.org/jira/browse/GERONIMO-5371

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

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (AMQ-2776) Connection refused when using shortname in activemqurl

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/activemq/browse/AMQ-2776?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

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 (127.0.0.1) 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: https://issues.apache.org/activemq/browse/AMQ-2776
>             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: java.net.ConnectException: Connection refused: connect
> at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:35)
> at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:286)
> at org.apache.activemq.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:185)
> at org.apache.activemq.ra.ActiveMQConnectionSupport.makeConnection(ActiveMQConnectionSupport.java:79)
> at org.apache.activemq.ra.ActiveMQConnectionSupport.makeConnection(ActiveMQConnectionSupport.java:61)
> at org.apache.activemq.ra.ActiveMQManagedConnectionFactory.createManagedConnection(ActiveMQManagedConnectionFactory.java:169)
> ... 42 more
> Caused by: java.net.ConnectException: Connection refused: connect
> 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:519)
> at org.apache.activemq.transport.tcp.TcpTransport.connect(TcpTransport.java:483)
> at org.apache.activemq.transport.tcp.TcpTransport.doStart(TcpTransport.java:446)
> at org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:53)
> at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)
> at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)
> at org.apache.activemq.transport.WireFormatNegotiator.start(WireFormatNegotiator.java:72)
> at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)
> at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)
> at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:266)
> This  happened also when got error starting activemq-ra module in geronimo
> https://issues.apache.org/jira/browse/GERONIMO-5371

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

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (AMQ-2776) Connection refused when using shortname in activemqurl

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/activemq/browse/AMQ-2776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=60931#action_60931 ]

Eric commented on AMQ-2776:
---------------------------

In 5.3.2

With two distinct brokers on the same server with a single interface, and without localhost usage.

I experiment the same problem of connection refused on a multicast network connector connection. Only "0.0.0.0" seems to work as IP address of the transport connector

"name" of the current host, with or without domain extension, with useLocalHost=true or useLocalHost=false doesn't work.

It works in 5.3.0-5 fuse.

I don't know if using the virtual hostname associated to another interface in the /etc/hosts file, works. We must have this functionality in production environment to isolate flows for security reasons.

Eric-AWL

> Connection refused when using shortname in activemqurl
> ------------------------------------------------------
>
>                 Key: AMQ-2776
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2776
>             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: java.net.ConnectException: Connection refused: connect
> at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:35)
> at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:286)
> at org.apache.activemq.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:185)
> at org.apache.activemq.ra.ActiveMQConnectionSupport.makeConnection(ActiveMQConnectionSupport.java:79)
> at org.apache.activemq.ra.ActiveMQConnectionSupport.makeConnection(ActiveMQConnectionSupport.java:61)
> at org.apache.activemq.ra.ActiveMQManagedConnectionFactory.createManagedConnection(ActiveMQManagedConnectionFactory.java:169)
> ... 42 more
> Caused by: java.net.ConnectException: Connection refused: connect
> 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:519)
> at org.apache.activemq.transport.tcp.TcpTransport.connect(TcpTransport.java:483)
> at org.apache.activemq.transport.tcp.TcpTransport.doStart(TcpTransport.java:446)
> at org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:53)
> at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)
> at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)
> at org.apache.activemq.transport.WireFormatNegotiator.start(WireFormatNegotiator.java:72)
> at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)
> at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)
> at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:266)
> This  happened also when got error starting activemq-ra module in geronimo
> https://issues.apache.org/jira/browse/GERONIMO-5371

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

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (AMQ-2776) Connection refused when using shortname in activemqurl

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/activemq/browse/AMQ-2776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=60958#action_60958 ]

Eric commented on AMQ-2776:
---------------------------

With multicast discovery, I think I found the problem

My transport connector was in 5.3.0

      <transportConnector name="TestDeCharge-DEFAULT-IN"
                          uri="tcp://td0sib01s.priv.atos.fr:61616?useLocalHost=false"
                          discoveryUri="multicast://default?group=TestDeCharge-DEFAULT"/>

In 5.3.0, the corresponding multicast frame is

09:59:02.870809 IP td0sib01s.priv.atos.fr.6155 > 239.255.2.3.6155: UDP, length 102
        0x0000:  4500 0082 0000 4000 0111 959b 0a18 e7b5  E.....@.........
        0x0010:  efff 0203 180b 180b 006e e44f 5465 7374  .........n.OTest
        0x0020:  4465 4368 6172 6765 2d44 4546 4155 4c54  DeCharge-DEFAULT
        0x0030:  2e41 6374 6976 654d 512d 342e 616c 6976  .ActiveMQ-4.aliv
        0x0040:  652e 256c 6f63 616c 686f 7374 2574 6370  e.%localhost%tcp
        0x0050:  3a2f 2f74 6430 7369 6230 3173 2e70 7269  ://td0sib01s.pri
        0x0060:  762e 6174 6f73 2e66 723a 3631 3631 363f  v.atos.fr:61616?
        0x0070:  7573 654c 6f63 616c 486f 7374 3d66 616c  useLocalHost=fal
        0x0080:  7365                                     se

In 5.3.2, the corresponding multicast frame is

[root@td0sib01s ~]# tcpdump -s 200 -c 4 src host td0sib01s and ip multicast -X
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 200 bytes
09:51:30.818735 IP td0sib01s.priv.atos.fr.6155 > 239.255.2.3.6155: UDP, length 83
        0x0000:  4500 006f 0000 4000 0111 95ae 0a18 e7b5  E..o..@.........
        0x0010:  efff 0203 180b 180b 005b e43c 5465 7374  .........[.<Test
        0x0020:  4465 4368 6172 6765 2d44 4546 4155 4c54  DeCharge-DEFAULT
        0x0030:  2e41 6374 6976 654d 512d 342e 616c 6976  .ActiveMQ-4.aliv
        0x0040:  652e 256c 6f63 616c 686f 7374 2574 6370  e.%localhost%tcp
        0x0050:  3a2f 2f74 6430 7369 6230 3173 2e70 7269  ://td0sib01s.pri
        0x0060:  762e 6174 6f73 2e66 723a 3631 3631 36    v.atos.fr:61616

without "?useLocalHost=false"

A broker that is present on the same server wants to connect with useLocalHost=true => localhost and not "address".

it fails to connect.

Eric-AWL

> Connection refused when using shortname in activemqurl
> ------------------------------------------------------
>
>                 Key: AMQ-2776
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2776
>             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: java.net.ConnectException: Connection refused: connect
> at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:35)
> at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:286)
> at org.apache.activemq.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:185)
> at org.apache.activemq.ra.ActiveMQConnectionSupport.makeConnection(ActiveMQConnectionSupport.java:79)
> at org.apache.activemq.ra.ActiveMQConnectionSupport.makeConnection(ActiveMQConnectionSupport.java:61)
> at org.apache.activemq.ra.ActiveMQManagedConnectionFactory.createManagedConnection(ActiveMQManagedConnectionFactory.java:169)
> ... 42 more
> Caused by: java.net.ConnectException: Connection refused: connect
> 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:519)
> at org.apache.activemq.transport.tcp.TcpTransport.connect(TcpTransport.java:483)
> at org.apache.activemq.transport.tcp.TcpTransport.doStart(TcpTransport.java:446)
> at org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:53)
> at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)
> at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)
> at org.apache.activemq.transport.WireFormatNegotiator.start(WireFormatNegotiator.java:72)
> at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)
> at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)
> at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:266)
> This  happened also when got error starting activemq-ra module in geronimo
> https://issues.apache.org/jira/browse/GERONIMO-5371

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

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (AMQ-2776) Connection refused when using shortname in activemqurl

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/activemq/browse/AMQ-2776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=60988#action_60988 ]

Gary Tully commented on AMQ-2776:
---------------------------------

the parameters supplied to the TransportConnector are stripped of before being broadcast because many of the server side options are not applicable to the connection initiator (client side)
If you want a client to connect using useLocalHost=true, then that option needs to be specified on the brokerURL (connection factory) or on the networkConnector broker url. The parameters are then applied to all discovered urls.

> Connection refused when using shortname in activemqurl
> ------------------------------------------------------
>
>                 Key: AMQ-2776
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2776
>             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: java.net.ConnectException: Connection refused: connect
> at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:35)
> at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:286)
> at org.apache.activemq.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:185)
> at org.apache.activemq.ra.ActiveMQConnectionSupport.makeConnection(ActiveMQConnectionSupport.java:79)
> at org.apache.activemq.ra.ActiveMQConnectionSupport.makeConnection(ActiveMQConnectionSupport.java:61)
> at org.apache.activemq.ra.ActiveMQManagedConnectionFactory.createManagedConnection(ActiveMQManagedConnectionFactory.java:169)
> ... 42 more
> Caused by: java.net.ConnectException: Connection refused: connect
> 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:519)
> at org.apache.activemq.transport.tcp.TcpTransport.connect(TcpTransport.java:483)
> at org.apache.activemq.transport.tcp.TcpTransport.doStart(TcpTransport.java:446)
> at org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:53)
> at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)
> at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)
> at org.apache.activemq.transport.WireFormatNegotiator.start(WireFormatNegotiator.java:72)
> at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)
> at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)
> at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:266)
> This  happened also when got error starting activemq-ra module in geronimo
> https://issues.apache.org/jira/browse/GERONIMO-5371

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

Reply | Threaded
Open this post in threaded view
|

Re: [jira] Commented: (AMQ-2776) Connection refused when using shortname in activemqurl

Eric-AWL
Hi Gary !

I wanted to use "useLocalHost=false" on my transport connector. But since this option is now striped, a broker that runs in a different process, on the same host can discover the broker that sent this broadcast frame, but can not connect to it !!!

It's because the socket is binded on "address:port" (useLocalHost=false", and the connection is tried on "127.0.0.1:port" (resolveHostname).

A broker that doesn't run on the same host can connect to it without problem.

As you can see in my tcpdump frames, in 5.3.0, useLocalHost option, wasn't striped and the connection between the 2 brokers on the same server worked.

Eric-AWL

JIRA jira@apache.org wrote
    [ https://issues.apache.org/activemq/browse/AMQ-2776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=60988#action_60988 ]

Gary Tully commented on AMQ-2776:
---------------------------------

the parameters supplied to the TransportConnector are stripped of before being broadcast because many of the server side options are not applicable to the connection initiator (client side)
If you want a client to connect using useLocalHost=true, then that option needs to be specified on the brokerURL (connection factory) or on the networkConnector broker url. The parameters are then applied to all discovered urls.

> Connection refused when using shortname in activemqurl
> ------------------------------------------------------
>
>                 Key: AMQ-2776
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2776
>             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: java.net.ConnectException: Connection refused: connect
> at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:35)
> at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:286)
> at org.apache.activemq.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:185)
> at org.apache.activemq.ra.ActiveMQConnectionSupport.makeConnection(ActiveMQConnectionSupport.java:79)
> at org.apache.activemq.ra.ActiveMQConnectionSupport.makeConnection(ActiveMQConnectionSupport.java:61)
> at org.apache.activemq.ra.ActiveMQManagedConnectionFactory.createManagedConnection(ActiveMQManagedConnectionFactory.java:169)
> ... 42 more
> Caused by: java.net.ConnectException: Connection refused: connect
> 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:519)
> at org.apache.activemq.transport.tcp.TcpTransport.connect(TcpTransport.java:483)
> at org.apache.activemq.transport.tcp.TcpTransport.doStart(TcpTransport.java:446)
> at org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:53)
> at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)
> at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)
> at org.apache.activemq.transport.WireFormatNegotiator.start(WireFormatNegotiator.java:72)
> at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)
> at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)
> at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:266)
> This  happened also when got error starting activemq-ra module in geronimo
> https://issues.apache.org/jira/browse/GERONIMO-5371

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (AMQ-2776) Connection refused when using shortname in activemqurl

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/activemq/browse/AMQ-2776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=60993#action_60993 ]

Ivan commented on AMQ-2776:
---------------------------

Hi, Gary
    So for the initial purpose for this JIRA, do you mean that useLocal=false should be used ? I am just wondering that why ActiveQM assume to use localhost to connect the server if both client and server are the same machine, it is for performance ? But sometimes, the borker might not listen on 0.0.0.0, which means that client could not connect to the server via localhost.
     Thanks !

> Connection refused when using shortname in activemqurl
> ------------------------------------------------------
>
>                 Key: AMQ-2776
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2776
>             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: java.net.ConnectException: Connection refused: connect
> at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:35)
> at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:286)
> at org.apache.activemq.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:185)
> at org.apache.activemq.ra.ActiveMQConnectionSupport.makeConnection(ActiveMQConnectionSupport.java:79)
> at org.apache.activemq.ra.ActiveMQConnectionSupport.makeConnection(ActiveMQConnectionSupport.java:61)
> at org.apache.activemq.ra.ActiveMQManagedConnectionFactory.createManagedConnection(ActiveMQManagedConnectionFactory.java:169)
> ... 42 more
> Caused by: java.net.ConnectException: Connection refused: connect
> 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:519)
> at org.apache.activemq.transport.tcp.TcpTransport.connect(TcpTransport.java:483)
> at org.apache.activemq.transport.tcp.TcpTransport.doStart(TcpTransport.java:446)
> at org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:53)
> at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)
> at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)
> at org.apache.activemq.transport.WireFormatNegotiator.start(WireFormatNegotiator.java:72)
> at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)
> at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)
> at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:266)
> This  happened also when got error starting activemq-ra module in geronimo
> https://issues.apache.org/jira/browse/GERONIMO-5371

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

Reply | Threaded
Open this post in threaded view
|

[jira] Assigned: (AMQ-2776) Connection refused when using shortname in activemqurl

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/activemq/browse/AMQ-2776?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Tully reassigned AMQ-2776:
-------------------------------

    Assignee: Gary Tully

> Connection refused when using shortname in activemqurl
> ------------------------------------------------------
>
>                 Key: AMQ-2776
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2776
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Connector
>    Affects Versions: 5.3.2, 5.4.0
>         Environment: Suse 10 Sp2
>            Reporter: vioa lu
>            Assignee: Gary Tully
>             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: java.net.ConnectException: Connection refused: connect
> at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:35)
> at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:286)
> at org.apache.activemq.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:185)
> at org.apache.activemq.ra.ActiveMQConnectionSupport.makeConnection(ActiveMQConnectionSupport.java:79)
> at org.apache.activemq.ra.ActiveMQConnectionSupport.makeConnection(ActiveMQConnectionSupport.java:61)
> at org.apache.activemq.ra.ActiveMQManagedConnectionFactory.createManagedConnection(ActiveMQManagedConnectionFactory.java:169)
> ... 42 more
> Caused by: java.net.ConnectException: Connection refused: connect
> 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:519)
> at org.apache.activemq.transport.tcp.TcpTransport.connect(TcpTransport.java:483)
> at org.apache.activemq.transport.tcp.TcpTransport.doStart(TcpTransport.java:446)
> at org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:53)
> at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)
> at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)
> at org.apache.activemq.transport.WireFormatNegotiator.start(WireFormatNegotiator.java:72)
> at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)
> at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)
> at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:266)
> This  happened also when got error starting activemq-ra module in geronimo
> https://issues.apache.org/jira/browse/GERONIMO-5371

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

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (AMQ-2776) Connection refused when using shortname in activemqurl

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/activemq/browse/AMQ-2776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61105#action_61105 ]

Gary Tully commented on AMQ-2776:
---------------------------------

yes, and that will be the default value in 5.4. see: https://issues.apache.org/activemq/browse/AMQ-2771
the useLocalHost flag is really a hack for macosx (at some stage) that should always have been disabled by default.

Also, the patch attached that makes the use of InetAddress.getLocalHost().getHostName() conditional on useLocalHost being set has been applied for 5.4 (r983565) which avoids one unnecessary resolution.

> Connection refused when using shortname in activemqurl
> ------------------------------------------------------
>
>                 Key: AMQ-2776
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2776
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Connector
>    Affects Versions: 5.3.2, 5.4.0
>         Environment: Suse 10 Sp2
>            Reporter: vioa lu
>            Assignee: Gary Tully
>             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: java.net.ConnectException: Connection refused: connect
> at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:35)
> at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:286)
> at org.apache.activemq.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:185)
> at org.apache.activemq.ra.ActiveMQConnectionSupport.makeConnection(ActiveMQConnectionSupport.java:79)
> at org.apache.activemq.ra.ActiveMQConnectionSupport.makeConnection(ActiveMQConnectionSupport.java:61)
> at org.apache.activemq.ra.ActiveMQManagedConnectionFactory.createManagedConnection(ActiveMQManagedConnectionFactory.java:169)
> ... 42 more
> Caused by: java.net.ConnectException: Connection refused: connect
> 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:519)
> at org.apache.activemq.transport.tcp.TcpTransport.connect(TcpTransport.java:483)
> at org.apache.activemq.transport.tcp.TcpTransport.doStart(TcpTransport.java:446)
> at org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:53)
> at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)
> at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)
> at org.apache.activemq.transport.WireFormatNegotiator.start(WireFormatNegotiator.java:72)
> at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)
> at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)
> at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:266)
> This  happened also when got error starting activemq-ra module in geronimo
> https://issues.apache.org/jira/browse/GERONIMO-5371

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

Reply | Threaded
Open this post in threaded view
|

[jira] Resolved: (AMQ-2776) Connection refused when using shortname in activemqurl

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/activemq/browse/AMQ-2776?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Tully resolved AMQ-2776.
-----------------------------

    Resolution: Fixed

variant of patch applied that makes localhost resolution conditional on useLocalHost which now defaults to false.

> Connection refused when using shortname in activemqurl
> ------------------------------------------------------
>
>                 Key: AMQ-2776
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2776
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Connector
>    Affects Versions: 5.3.2, 5.4.0
>         Environment: Suse 10 Sp2
>            Reporter: vioa lu
>            Assignee: Gary Tully
>             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: java.net.ConnectException: Connection refused: connect
> at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:35)
> at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:286)
> at org.apache.activemq.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:185)
> at org.apache.activemq.ra.ActiveMQConnectionSupport.makeConnection(ActiveMQConnectionSupport.java:79)
> at org.apache.activemq.ra.ActiveMQConnectionSupport.makeConnection(ActiveMQConnectionSupport.java:61)
> at org.apache.activemq.ra.ActiveMQManagedConnectionFactory.createManagedConnection(ActiveMQManagedConnectionFactory.java:169)
> ... 42 more
> Caused by: java.net.ConnectException: Connection refused: connect
> 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:519)
> at org.apache.activemq.transport.tcp.TcpTransport.connect(TcpTransport.java:483)
> at org.apache.activemq.transport.tcp.TcpTransport.doStart(TcpTransport.java:446)
> at org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:53)
> at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)
> at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)
> at org.apache.activemq.transport.WireFormatNegotiator.start(WireFormatNegotiator.java:72)
> at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)
> at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)
> at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:266)
> This  happened also when got error starting activemq-ra module in geronimo
> https://issues.apache.org/jira/browse/GERONIMO-5371

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