activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "shamokuyuwpz (JIRA)" <j...@apache.org>
Subject [jira] [Created] (AMQ-3943) Connect to ActiveMQ server's jmx feature,but failed.
Date Wed, 25 Jul 2012 13:56:35 GMT
shamokuyuwpz created AMQ-3943:
---------------------------------

             Summary: Connect to ActiveMQ server's jmx feature,but failed.
                 Key: AMQ-3943
                 URL: https://issues.apache.org/jira/browse/AMQ-3943
             Project: ActiveMQ
          Issue Type: Bug
         Environment: SLES 11 sp1 x64,
ActiveMQ 5.5.1,
Java(TM) SE Runtime Environment (build 1.6.0_29-b11)
            Reporter: shamokuyuwpz


Code follow.I connect to an ActiveMQ server's jmx feature.I confirm the jmx feature is enable,because
the same code work well on orther blades.
    public static void main(String args[]) throws UnknownHostException, IOException
    {
        JMXServiceURL url = new JMXServiceURL("service:jmx:rmi:///jndi/rmi://128.128.17.1:2011/jmxrmi");
        String username = "guest";

        String password = "guest";

        Map env = new HashMap();
        String[] credentials = new String[] { username, password };
        env.put(JMXConnector.CREDENTIALS, credentials);
        JMXConnector connector = JMXConnectorFactory.connect(url, env);
        connector.connect();
        connector.close();
    }
But in a blade,it throws exception :
Exception in thread "main" java.rmi.ConnectException: Connection refused to host: 127.0.0.1;
nested exception is: 
	java.net.ConnectException: Connection refused
	at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:601)
	at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:198)
	at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:184)
	at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:110)
	at javax.management.remote.rmi.RMIServerImpl_Stub.newClient(Unknown Source)
	at javax.management.remote.rmi.RMIConnector.getConnection(RMIConnector.java:2327)
	at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:277)
	at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:248)
	at SyntaxMain.main(SyntaxMain.java:24)
Caused by: java.net.ConnectException: Connection refused
	at java.net.PlainSocketImpl.socketConnect(Native Method)
	at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
	at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
	at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
	at java.net.Socket.connect(Socket.java:529)
	at java.net.Socket.connect(Socket.java:478)
	at java.net.Socket.<init>(Socket.java:375)
	at java.net.Socket.<init>(Socket.java:189)
	at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22)
	at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:128)
	at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:595)
	... 8 more
In fact,I connect to the 128.128.17.1 ActiveMQ server's jmx feature,but it point me that refusing
by 127.0.0.1.Have to say this make me blues.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message