Hi,

You should be able to connect via jconsole as mentioned in [1] without any
modifications to JVM arguments.

You just need to look for "JMX Service URL" in the logs and use that in
jconsole. Then you need to provide credentials of a user with "Server
Admin" permission.

Which ELB version are you trying?

[1] https://docs.wso2.com/display/ESB480/JMX+Monitoring

On Tue, Sep 9, 2014 at 5:35 PM, Asanka Vithanage <[email protected]> wrote:

> Hi Dumidu,
>
> Thanks, Its working.
>
> On Tue, Sep 9, 2014 at 5:29 PM, Dumidu Handakumbura <[email protected]>
> wrote:
>
>> Hi,
>>
>> Try adding the following to the wso2server.sh script.
>>
>> -Dcom.sun.management.jmxremote \
>> -Dcom.sun.management.jmxremote.authenticate=false \
>> -Dcom.sun.management.remote.ssl=false \
>> -Djava.rmi.server.hostname=<IP> \
>>
>> Regards,
>>
>> On Tue, Sep 9, 2014 at 5:25 PM, Asanka Vithanage <[email protected]>
>> wrote:
>>
>>> Hi,
>>>
>>> I need to remotely monitor ELB (hosted on an cloud instance) using
>>> Jconsole.With default settings i am getting a connection failed from
>>> jconsole side.
>>> Then tried changing as <HostName>cloud_instance_public_ip</HostName> on
>>> repository/conf/etc/jmx.xml. now when starting the ELB server getting error
>>> [1].
>>>
>>> Tried ELB starting with -Djava.rmi.server.hostname= as well, as
>>> mentioned on doc https://docs.wso2.com/display/ESB480/JMX+Monitoring
>>> ,but still no luck.
>>>
>>> Can anyone point me to a solution?
>>>
>>> [1]
>>>
>>> [2014-09-09 07:05:09,882] ERROR - JMXServerManager Could not initialize
>>> RMI server
>>> java.io.IOException: Cannot bind to URL [rmi://192.168.17.30:9999/jmxrmi]:
>>> javax.naming.NoPermissionException [Root exception is
>>> java.rmi.ServerException: RemoteException occurred in server thread; nested
>>> exception is:
>>>     java.rmi.AccessException: Registry.Registry.bind disallowed; origin /
>>> 192.168.17.30 is non-local host]
>>>     at
>>> javax.management.remote.rmi.RMIConnectorServer.newIOException(RMIConnectorServer.java:827)
>>>     at
>>> javax.management.remote.rmi.RMIConnectorServer.start(RMIConnectorServer.java:432)
>>>     at
>>> org.wso2.carbon.core.init.JMXServerManager.startJMXService(JMXServerManager.java:121)
>>>     at
>>> org.wso2.carbon.core.internal.StartupFinalizerServiceComponent.completeInitialization(StartupFinalizerServiceComponent.java:197)
>>>     at
>>> org.wso2.carbon.core.internal.StartupFinalizerServiceComponent.serviceChanged(StartupFinalizerServiceComponent.java:282)
>>>     at
>>> org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:107)
>>>     at
>>> org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:861)
>>>     at
>>> org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
>>>     at
>>> org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
>>>     at
>>> org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:819)
>>>     at
>>> org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:771)
>>>     at
>>> org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:130)
>>>     at
>>> org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:214)
>>>     at
>>> org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:433)
>>>     at
>>> org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:451)
>>>     at
>>> org.wso2.carbon.server.admin.internal.ServerAdminServiceComponent.activate(ServerAdminServiceComponent.java:106)
>>>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>     at
>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>>     at
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>>     at java.lang.reflect.Method.invoke(Method.java:601)
>>>     at
>>> org.eclipse.equinox.internal.ds.model.ServiceComponent.activate(ServiceComponent.java:260)
>>>     at
>>> org.eclipse.equinox.internal.ds.model.ServiceComponentProp.activate(ServiceComponentProp.java:146)
>>>     at
>>> org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(ServiceComponentProp.java:347)
>>>     at
>>> org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(InstanceProcess.java:620)
>>>     at
>>> org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProcess.java:197)
>>>     at
>>> org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolver.java:343)
>>>     at
>>> org.eclipse.equinox.internal.ds.SCRManager.serviceChanged(SCRManager.java:222)
>>>     at
>>> org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:107)
>>>     at
>>> org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:861)
>>>     at
>>> org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
>>>     at
>>> org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
>>>     at
>>> org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:819)
>>>     at
>>> org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:771)
>>>     at
>>> org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:130)
>>>     at
>>> org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:214)
>>>     at
>>> org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:433)
>>>     at
>>> org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:451)
>>>     at
>>> org.wso2.carbon.core.init.CarbonServerManager.initializeCarbon(CarbonServerManager.java:517)
>>>     at
>>> org.wso2.carbon.core.init.CarbonServerManager.start(CarbonServerManager.java:219)
>>>     at
>>> org.wso2.carbon.core.internal.CarbonCoreServiceComponent.activate(CarbonCoreServiceComponent.java:77)
>>>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>     at
>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>>     at
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>>     at java.lang.reflect.Method.invoke(Method.java:601)
>>>     at
>>> org.eclipse.equinox.internal.ds.model.ServiceComponent.activate(ServiceComponent.java:260)
>>>     at
>>> org.eclipse.equinox.internal.ds.model.ServiceComponentProp.activate(ServiceComponentProp.java:146)
>>>     at
>>> org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(ServiceComponentProp.java:347)
>>>     at
>>> org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(InstanceProcess.java:620)
>>>     at
>>> org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProcess.java:197)
>>>     at
>>> org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolver.java:343)
>>>     at
>>> org.eclipse.equinox.internal.ds.SCRManager.serviceChanged(SCRManager.java:222)
>>>     at
>>> org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:107)
>>>     at
>>> org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:861)
>>>     at
>>> org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
>>>     at
>>> org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
>>>     at
>>> org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:819)
>>>     at
>>> org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:771)
>>>     at
>>> org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:130)
>>>     at
>>> org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:214)
>>>     at
>>> org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:433)
>>>     at
>>> org.eclipse.equinox.http.servlet.internal.Activator.registerHttpService(Activator.java:81)
>>>     at
>>> org.eclipse.equinox.http.servlet.internal.Activator.addProxyServlet(Activator.java:60)
>>>     at
>>> org.eclipse.equinox.http.servlet.internal.ProxyServlet.init(ProxyServlet.java:40)
>>>     at
>>> org.wso2.carbon.tomcat.ext.servlet.DelegationServlet.init(DelegationServlet.java:38)
>>>     at
>>> org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1267)
>>>     at
>>> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1186)
>>>     at
>>> org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1081)
>>>     at
>>> org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5027)
>>>     at
>>> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5314)
>>>     at
>>> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>>>     at
>>> org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
>>>     at
>>> org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
>>>     at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
>>>     at java.util.concurrent.FutureTask.run(FutureTask.java:166)
>>>     at
>>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
>>>     at
>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
>>>     at java.lang.Thread.run(Thread.java:722)
>>> Caused by: javax.naming.NoPermissionException [Root exception is
>>> java.rmi.ServerException: RemoteException occurred in server thread; nested
>>> exception is:
>>>     java.rmi.AccessException: Registry.Registry.bind disallowed; origin /
>>> 192.168.17.30 is non-local host]
>>>     at
>>> com.sun.jndi.rmi.registry.RegistryContext.bind(RegistryContext.java:143)
>>>     at
>>> com.sun.jndi.toolkit.url.GenericURLContext.bind(GenericURLContext.java:226)
>>>     at
>>> org.wso2.carbon.context.internal.CarbonContextDataHolder$CarbonInitialJNDIContext.bind(CarbonContextDataHolder.java:959)
>>>     at javax.naming.InitialContext.bind(InitialContext.java:419)
>>>     at
>>> javax.management.remote.rmi.RMIConnectorServer.bind(RMIConnectorServer.java:644)
>>>     at
>>> javax.management.remote.rmi.RMIConnectorServer.start(RMIConnectorServer.java:427)
>>>     ... 75 more
>>> Caused by: java.rmi.ServerException: RemoteException occurred in server
>>> thread; nested exception is:
>>>     java.rmi.AccessException: Registry.Registry.bind disallowed; origin /
>>> 192.168.17.30 is non-local host
>>>     at
>>> sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:419)
>>>     at
>>> sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:267)
>>>     at sun.rmi.transport.Transport$1.run(Transport.java:177)
>>>     at sun.rmi.transport.Transport$1.run(Transport.java:174)
>>>     at java.security.AccessController.doPrivileged(Native Method)
>>>     at sun.rmi.transport.Transport.serviceCall(Transport.java:173)
>>>     at
>>> sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:553)
>>>     at
>>> sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:808)
>>>     at
>>> sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:667)
>>>     at
>>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
>>>     at
>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
>>>     at java.lang.Thread.run(Thread.java:722)
>>>     at
>>> sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:273)
>>>     at
>>> sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:251)
>>>     at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:377)
>>>     at sun.rmi.registry.RegistryImpl_Stub.bind(Unknown Source)
>>>     at
>>> com.sun.jndi.rmi.registry.RegistryContext.bind(RegistryContext.java:137)
>>>     ... 80 more
>>> Caused by: java.rmi.AccessException: Registry.Registry.bind disallowed;
>>> origin /192.168.17.30 is non-local host
>>>     at sun.rmi.registry.RegistryImpl.checkAccess(RegistryImpl.java:257)
>>>     at sun.rmi.registry.RegistryImpl.bind(RegistryImpl.java:149)
>>>     at sun.rmi.registry.RegistryImpl_Skel.dispatch(Unknown Source)
>>>     at
>>> sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:409)
>>>     at
>>> sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:267)
>>>     at sun.rmi.transport.Transport$1.run(Transport.java:177)
>>>     at sun.rmi.transport.Transport$1.run(Transport.java:174)
>>>     at java.security.AccessController.doPrivileged(Native Method)
>>>     at sun.rmi.transport.Transport.serviceCall(Transport.java:173)
>>>     at
>>> sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:553)
>>>     at
>>> sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:808)
>>>     at
>>> sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:667)
>>>     ... 3 more
>>>
>>>
>>> --
>>> Asanka Vithanage
>>> Senior Software Engineer -QA
>>> Mobile: +94 0716286708
>>> Email: [email protected]
>>> WSO2 Inc. www.wso2.com
>>>
>>>
>>
>>
>> --
>> *Dumidu Handakumbura*
>> Software Engineer - QA
>> WSO2 Inc; http://www.wso2.com/.
>> Mobile;
>> *+94777706740 <%2B94777706740> *
>>
>
>
>
> --
> Asanka Vithanage
> Senior Software Engineer -QA
> Mobile: +94 0716286708
> Email: [email protected]
> WSO2 Inc. www.wso2.com
>
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Isuru Perera
Senior Software Engineer | WSO2, Inc. | http://wso2.com/
Lean . Enterprise . Middleware

about.me/chrishantha
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to