Question
![](https://accounts.pega.com/sites/default/files/pega-user-image/127/REG-126866.png?source=PUMINIT)
![](https://accounts.pega.com/sites/default/files/pega-user-image/127/REG-126866.png?source=PUMINIT)
Cognizant Technology Solutions
US
Last activity: 31 Jan 2017 16:56 EST
How SMA connects to Remote JVM
Hello community member,
Can you help understand how SMA internally connects to remote JVMs. Only things we configure in remote JVM configuration in SMA is hostname and port (SOAP_CONNECTOR_PORT).
If I try to use the same host name and port name in jConsole we get an errror "non-jRMP server at remote endpoint" . My WebSphere admin says JMX ports are not enabled so we get this error.
So wondering how SMA connects to these JVMs to get information about requestor, agents, listeners etc.
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
Pegasystems Inc.
IN
Hello Amit,
SMA is built on Java Management Extensions (JMX) interface and is instrumented using JMX objects called Managed Beans (MBeans), which expose their management interfaces to the SMA applications through a JMX agent. JMX provides a standard API to monitor and manage resources either locally or via remote access .
Go through below PDN articles for more details
https://docs-previous.pega.com/system-management-application-reference-guide-63-sp1
https://community.pega.com/sites/default/files/help_v717/procomhelpmain.htm
Thanks,
Arun
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
Pegasystems Inc.
IN
Hello Amit,
As you have issues with remote JVM connection you can go through below links hope it helps
https://community.pega.com/support/support-articles/unable-connect-sma-through-remote-connection
Thanks,
Arun
![](https://accounts.pega.com/sites/default/files/pega-user-image/127/REG-126866.png?source=PUMINIT)
![](https://accounts.pega.com/sites/default/files/pega-user-image/127/REG-126866.png?source=PUMINIT)
Cognizant Technology Solutions
US
Hi Arun,
When I try to connect using my java code I get the below error as mentioned in reply comment of Sai's answer.
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
Pegasystems Inc.
IN
Hello Amit,
Have you checked jconsole on first note before doing the code test for remote connection it will list you all the mbeans present for pega .
Please find the below attachments .
I would request you to follow below article which clearly explained how to configure jmx in websphere
http://www.monitis.com/blog/configuring-jmx-in-websphere-8-5/ .
Thanks,
Arun
![](https://accounts.pega.com/sites/default/files/pega-user-image/127/REG-126866.png?source=PUMINIT)
![](https://accounts.pega.com/sites/default/files/pega-user-image/127/REG-126866.png?source=PUMINIT)
Cognizant Technology Solutions
US
I am on WebSphere. One paragraph in SMA documentation reads.
SMA, RMI, and Garbage Collection In a multi-node installation, JMX uses RMI to communicate with the other nodes being monitored. In Java, explicit garbage collection is forced once per minute in any system using RMI, although it is possible to configure the JVM to suppress this by disabling explicit GC calls. If not suppressed, frequent garbage collection can lead to degraded system performance. If a Process Commander node and SMA are sharing a JVM on such a system, that system will collect garbage once per minute, because of the system’s use of RMI. Again, it will adversely affect Process Commander performance on that node. This issue can affect all server types except WebSphere, which uses SOAP services for intranode communications, not RMI. A single-node installation connecting through the local JVM avoids RMI and the forced garbage collection problem, and the attendant performance issues.
What does this mean. Websphere SMA config and working is diff from others? How do I code a java piece to get remote jvm info on WebSphere with this set up?
Updated: 31 Jan 2017 7:25 EST
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
Pegasystems Inc.
IN
Hi Amit,
SMA uses RMI to connect internally below url has more details about the architecture. Hope this helps you.
https://collaborate.pega.com/discussion/configure-system-management-application-sma
Thanks
Sai Kishore Boyana
![](https://accounts.pega.com/sites/default/files/pega-user-image/127/REG-126866.png?source=PUMINIT)
![](https://accounts.pega.com/sites/default/files/pega-user-image/127/REG-126866.png?source=PUMINIT)
Cognizant Technology Solutions
US
Hi Sai,
When I try to connect to JMX with below code I get an error. Same details are configured in SMA too.
I am running this code inside one java activity step in pega.
try{
String HOST = "<i give my hostname here>";
String PORT = "48135";
javax.management.remote.JMXServiceURL url = new javax.management.remote.JMXServiceURL("service:jmx:rmi:///jndi/rmi://" + HOST + ":" + PORT + "/jmxrmi");
javax.management.remote.JMXConnector jmxConnector = javax.management.remote.JMXConnectorFactory.connect(url);
javax.management.MBeanServerConnection mbeanServerConnection = jmxConnector.getMBeanServerConnection();
output ="pass";
}
catch(Exception e)
{
java.io.StringWriter sw = new java.io.StringWriter();
java.io.PrintWriter pw = new java.io.PrintWriter(sw);
e.printStackTrace(pw);
output= sw.toString();
}
Exception:-
Hi Sai,
When I try to connect to JMX with below code I get an error. Same details are configured in SMA too.
I am running this code inside one java activity step in pega.
try{
String HOST = "<i give my hostname here>";
String PORT = "48135";
javax.management.remote.JMXServiceURL url = new javax.management.remote.JMXServiceURL("service:jmx:rmi:///jndi/rmi://" + HOST + ":" + PORT + "/jmxrmi");
javax.management.remote.JMXConnector jmxConnector = javax.management.remote.JMXConnectorFactory.connect(url);
javax.management.MBeanServerConnection mbeanServerConnection = jmxConnector.getMBeanServerConnection();
output ="pass";
}
catch(Exception e)
{
java.io.StringWriter sw = new java.io.StringWriter();
java.io.PrintWriter pw = new java.io.PrintWriter(sw);
e.printStackTrace(pw);
output= sw.toString();
}
Exception:-
java.io.IOException: Failed to retrieve RMIServer stub: javax.naming.CommunicationException [Root exception is java.rmi.ConnectIOException: non-JRMP server at remote endpoint] at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:340) at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:249) at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:208) at com.pegarules.generated.activity.sh_action_test_4ed3c9b7da968aeb3ea625640f2b170c.step5_circum0(sh_action_test_4ed3c9b7da968aeb3ea625640f2b170c.java:226) at com.pegarules.generated.activity.sh_action_test_4ed3c9b7da968aeb3ea625640f2b170c.perform(sh_action_test_4ed3c9b7da968aeb3ea625640f2b170c.java:73) at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3020) at com.pegarules.generated.activity.ra_action_executemaystartactivity_59febb8db9b0c9993574e6c9ecc4de30.step3_circum0(ra_action_executemaystartactivity_59febb8db9b0c9993574e6c9ecc4de30.java:496) at com.pegarules.generated.activity.ra_action_executemaystartactivity_59febb8db9b0c9993574e6c9ecc4de30.perform(ra_action_executemaystartactivity_59febb8db9b0c9993574e6c9ecc4de30.java:117) at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3020) at com.pega.pegarules.session.internal.mgmt.base.ThreadRunner.runActivitiesAlt(ThreadRunner.java:617) at com.pega.pegarules.session.internal.mgmt.PRThreadImpl.runActivitiesAlt(PRThreadImpl.java:581) at com.pega.pegarules.session.internal.engineinterface.service.HttpAPI.runActivities(HttpAPI.java:2406) at com.pega.pegarules.session.external.engineinterface.service.EngineAPI.processRequestInner(EngineAPI.java:394) at sun.reflect.GeneratedMethodAccessor83.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.pega.pegarules.session.internal.PRSessionProviderImpl.doWithRequestorLocked(PRSessionProviderImpl.java:1066) at com.pega.pegarules.session.internal.PRSessionProviderImpl.doWithRequestorLocked(PRSessionProviderImpl.java:792) at com.pega.pegarules.session.external.engineinterface.service.EngineAPI.processRequest(EngineAPI.java:328) at com.pega.pegarules.session.internal.engineinterface.service.HttpAPI.invoke(HttpAPI.java:720) at com.pega.pegarules.session.internal.engineinterface.etier.impl.EngineImpl._invokeEngine_privact(EngineImpl.java:312) at com.pega.pegarules.session.internal.engineinterface.etier.impl.EngineImpl.invokeEngine(EngineImpl.java:263) at com.pega.pegarules.session.internal.engineinterface.etier.ejb.EngineBean.invokeEngine(EngineBean.java:221) at sun.reflect.GeneratedMethodAccessor69.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethod(PRBootstrap.java:349) at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethodPropagatingThrowable(PRBootstrap.java:390) at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethodPropagatingException(PRBootstrap.java:412) at com.pega.pegarules.internal.etier.ejb.EngineBeanBoot.invokeEngine(EngineBeanBoot.java:168) at com.pega.pegarules.internal.etier.interfaces.EJSLocalStatelessEngineBMT_f2439d86.invokeEngine(Unknown Source) at com.pega.pegarules.priv.context.JNDIEnvironment.invokeEngineInner(JNDIEnvironment.java:277) at com.pega.pegarules.priv.context.JNDIEnvironment.invokeEngine(JNDIEnvironment.java:222) at com.pega.pegarules.web.impl.WebStandardImpl.makeEtierRequest(WebStandardImpl.java:383) at com.pega.pegarules.web.impl.WebStandardImpl.doPost(WebStandardImpl.java:271) at sun.reflect.GeneratedMethodAccessor241.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethod(PRBootstrap.java:349) at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethodPropagatingThrowable(PRBootstrap.java:390) at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethod(PRBootstrap.java:439) at com.pega.pegarules.internal.web.servlet.WebStandardBoot.doPost(WebStandardBoot.java:99) at com.pega.pegarules.internal.web.servlet.WebStandardBoot.doGet(WebStandardBoot.java:89) at javax.servlet.http.HttpServlet.service(HttpServlet.java:718) at javax.servlet.http.HttpServlet.service(HttpServlet.java:831) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1694) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:970) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:508) at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:181) at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:91) at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:878) at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1592) at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:191) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:454) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:516) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:307) at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:84) at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java:558) at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java:608) at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java:985) at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java:1074) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1662) Caused by: javax.naming.CommunicationException [Root exception is java.rmi.ConnectIOException: non-JRMP server at remote endpoint] at com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:101) at com.sun.jndi.toolkit.url.GenericURLContext.lookup(GenericURLContext.java:185) at javax.naming.InitialContext.lookup(InitialContext.java:392) at javax.management.remote.rmi.RMIConnector.findRMIServerJNDI(RMIConnector.java:1888) at javax.management.remote.rmi.RMIConnector.findRMIServer(RMIConnector.java:1858) at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:257) ... 61 more Caused by: java.rmi.ConnectIOException: non-JRMP server at remote endpoint at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:230) at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:184) at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:322) at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source) at com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:97) ... 66 more
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689979000/321c2db9-adc7-4c43-8f1d-d6a84c486e5a.jpg?itok=mEyE0RUn)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689979000/321c2db9-adc7-4c43-8f1d-d6a84c486e5a.jpg?itok=mEyE0RUn)
Pegasystems Inc.
US
Hi Amit,
Could you try the below code snippet and let me know the result:
try
{
String host = "host";
int port = 9999; // management-native port
String urlString ="service:jmx:remoting-jmx://" + host + ":" + port;
System.out.println("\n\n\t**** urlString: "+urlString);;
javax.management.remote.JMXServiceURL serviceURL = new javax.management.remote.JMXServiceURL(urlString);
java.util.Map map = new java.util.HashMap();
String[] credentials = new String[] { "user", "password" };
map.put("jmx.remote.credentials", credentials);
javax.management.remote.JMXConnector jmxConnector = javax.management.remote.JMXConnectorFactory.connect(serviceURL, map);
javax.management.MBeanServerConnection connection = jmxConnector.getMBeanServerConnection();
}catch (Exception e){
System.out.println("Caught exception: " + e);
}
Kindly update the properties according to your configuration before your test and let me know the result, if any error share the log details.
Regards
Mahesh