activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "vioa lu (JIRA)" <j...@apache.org>
Subject [jira] Commented: (AMQ-2776) Connection refused when using shortname in activemqurl
Date Mon, 21 Jun 2010 07:39:52 GMT

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


Mime
View raw message