camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Cannot create JMX connector
Date Tue, 14 Dec 2010 15:02:49 GMT
Hi

Have you tried with just only setting create connector = true


On Tue, Dec 14, 2010 at 8:24 AM, tan <tanblin@stee.stengg.com> wrote:
>
> Hi,
>
> I have problems creating a jmx connector for remote monitoring. I tried
> putting -Dorg.apache.camel.jmx.createRmiConnector=true in the VM arguments,
> as well as adding the rmi connector inside the code as below:
>
>     DefaultManagementAgent agent = new
> DefaultManagementAgent(camelContext);
>     agent.setCreateConnector(true);
>
> agent.setServiceUrlPath("service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi/camel");
>     camelContext.getManagementStrategy().setManagementAgent(agent);
>
> But both of them produced the below errors:
>
> [ WARN] [Camel Thread 0 - JMXConnector:
> service:jmx:rmi:///jndi/rmi://PC_NAME:1099/jmxrmi/camel]
> (DefaultManagementAgent.java:430) - Could not start JMXConnector thread.
> java.io.IOException: Cannot bind to URL [rmi://PC_NAME:1099/jmxrmi/camel]:
> javax.naming.ServiceUnavailableException [Root exception is
> java.rmi.ConnectException: Connection refused to host: PC_NAME; nested
> exception is:
>        java.net.ConnectException: Connection refused: connect]
>        at javax.management.remote.rmi.RMIConnectorServer.newIOException(Unknown
> Source)
>        at javax.management.remote.rmi.RMIConnectorServer.start(Unknown Source)
>        at
> org.apache.camel.management.DefaultManagementAgent$1.run(DefaultManagementAgent.java:428)
>        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
>        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
>        at java.lang.Thread.run(Unknown Source)
> Caused by: javax.naming.ServiceUnavailableException [Root exception is
> java.rmi.ConnectException: Connection refused to host: PC_NAME; nested
> exception is:
>        java.net.ConnectException: Connection refused: connect]
>        at com.sun.jndi.rmi.registry.RegistryContext.bind(Unknown Source)
>        at com.sun.jndi.toolkit.url.GenericURLContext.bind(Unknown Source)
>        at javax.naming.InitialContext.bind(Unknown Source)
>        at javax.management.remote.rmi.RMIConnectorServer.bind(Unknown Source)
>        ... 5 more
> Caused by: java.rmi.ConnectException: Connection refused to host: PC_NAME;
> nested exception is:
>        java.net.ConnectException: Connection refused: connect
>        at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source)
>        at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source)
>        at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source)
>        at sun.rmi.server.UnicastRef.newCall(Unknown Source)
>        at sun.rmi.registry.RegistryImpl_Stub.bind(Unknown Source)
>        ... 9 more
> Caused by: java.net.ConnectException: Connection refused: connect
>        at java.net.PlainSocketImpl.socketConnect(Native Method)
>        at java.net.PlainSocketImpl.doConnect(Unknown Source)
>        at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
>        at java.net.PlainSocketImpl.connect(Unknown Source)
>        at java.net.SocksSocketImpl.connect(Unknown Source)
>        at java.net.Socket.connect(Unknown Source)
>        at java.net.Socket.connect(Unknown Source)
>        at java.net.Socket.<init>(Unknown Source)
>        at java.net.Socket.<init>(Unknown Source)
>        at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(Unknown
> Source)
>        at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(Unknown
> Source)
>        ... 14 more
>
> I tried searching but can't seem to find any similar issues. Can someone
> help me on this? Thanks in advance.
> --
> View this message in context: http://camel.465427.n5.nabble.com/Cannot-create-JMX-connector-tp3304153p3304153.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Mime
View raw message