activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bruce Snyder <bruce.sny...@gmail.com>
Subject Re: JMX connection problem
Date Fri, 11 Dec 2009 15:53:12 GMT
On Fri, Dec 11, 2009 at 8:07 AM, Michal Klimuk <michal.klimuk@gmail.com> wrote:
>
> Hi,
>
> I have a problem trying to connect to my broker using JMX. Did some
> research, established a configuration that I need and that should work in
> ActiveMQ 5.3.0 standalone.
>
> My configuration:
> activemq.xml
> <broker xmlns="http://activemq.apache.org/schema/core"
>                brokerName="localhos" useJmx="true">
>
> ...
>
> <managementContext>
>        <managementContext connectorPort="11099" rmiServerPort="11119"
> jmxDomainName="org.apache.activemq"/>
> </managementContext>
> <transportConnectors>
>        <transportConnector name="openwire" uri="tcp://localhost:51616" />
> </transportConnectors>
> ...
>
> </broker>
>
> ActiveMQ starts the JMX service meaning I have
>  INFO | JMX consoles can connect to
> service:jmx:rmi://localhost:11119/jndi/rmi://localhost:11099/jmxrmi
> in my launch log.
>
> Now on my Ubuntu 8.04 :
> netstat -a | grep 11119
> tcp        0      0 *:11119                 *:*                
    LISTEN
>
> netstat -a | grep 11099
> tcp        0      0 *:11099                 *:*                
    LISTEN
>
> So I have my connector listening on the port I specified. So far so good...
>
> Unfortunately my client...
>
>  JMXServiceURL url = new
> JMXServiceURL("service:jmx:rmi://localhost:11119/jndi/rmi://localhost:11099/jmxrmi");
>  JMXConnector connector = JMXConnectorFactory.connect(url);
>
> throws :
> java.net.NoRouteToHostException: No route to host
>
> My jconsole cannot connect as well...
> I can see it tries to connect but it fails and the socket is closed:
> netstat -a | grep 11099
> tcp        0      0 *:11099                 *:*                
    LISTEN
> tcp        0      0 localhost:35885         localhost:11099
> TIME_WAIT
> tcp        0      0 localhost:35883         localhost:11099
> TIME_WAIT
>
> I would be greatful for any ideas on what I might be doing wrong...

Does your /etc/hosts file have the localhost configured properly?
I.e., just an entry for localhost like so:

127.0.0.1       localhost

Bruce
-- 
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

ActiveMQ in Action: http://bit.ly/2je6cQ
Blog: http://bruceblog.org/
Twitter: http://twitter.com/brucesnyder

Mime
View raw message