Question
IT Solution Service
SG
Last activity: 19 Jul 2018 7:46 EDT
SMAs in two app server environment
Hi,
We have two app servers and one database. I have just finished setup Pega 7.3.1 and am trying to register SMA from prsysmgmt console. I logged in to app1 node and added app1 for PRPC Primary URL. Then, I logged in to app2 node and tried to add app 2 but SMA complains the node is already added. I guess this is because we have only one database although we have two app servers, but is it possible to monitor app1 and app2 somehow by SMA? If so, how should I add it?
Thanks,
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Pegasystems Inc.
IT
Since you are running on Tomcat, you need to ensure that JMX MBean is enabled and listening on a public interface in order to be able to connect from remote.
Please refer to the following Support Article for further details on this configuration: https://community.pega.com/support/support-articles/sma-connection-refused-tomcat-remote-node
As described in the article you can use netstat to check if the process is listening on the provided port.
In my case I’m using the following settings:
Since you are running on Tomcat, you need to ensure that JMX MBean is enabled and listening on a public interface in order to be able to connect from remote.
Please refer to the following Support Article for further details on this configuration: https://community.pega.com/support/support-articles/sma-connection-refused-tomcat-remote-node
As described in the article you can use netstat to check if the process is listening on the provided port.
In my case I’m using the following settings:
domenico@astmptc:~/dev/java/server/apache-tomcat-8.0.35/bin$ ps axfu | grep java
domenico 15922 0.0 0.0 21292 1020 pts/2 S+ 10:02 0:00 | \_ grep --color=auto java
domenico 15833 14.9 1.7 4847576 573552 pts/2 Sl 10:00 0:15 \_ /usr/lib/jvm/java-8-oracle/bin/java
...
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=9444
-Dcom.sun.management.jmxremote.local.only=false
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
-Djava.rmi.server.hostname=astmptc
...
org.apache.catalina.startup.Bootstrap start
domenico@astmptc:~/dev/java/server/apache-tomcat-8.0.35/bin$ netstat -apn | grep java
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp6 0 0 Proprietary information hidden:8005 :::* LISTEN 15833/java
tcp6 0 0 :::8009 :::* LISTEN 15833/java
tcp6 0 0 :::8080 :::* LISTEN 15833/java
tcp6 0 0 :::36026 :::* LISTEN 15833/java
tcp6 0 0 :::9444 :::* LISTEN 15833/java
Once JMX has been enabled in both Tomcat instances you can add APP #2 as remote node in the SMA instance running on APP #1.
The opposite will work as well (i.e: adding APP #1 as remote node in the SMA on APP #2)
To do so you need to use the following JMX Server URL:
service:jmx:rmi:///jndi/rmi://{host_name}:{jmx_port}/jmxrmi
Based on previous example the former string becomes:
service:jmx:rmi:///jndi/rmi://astmptc:9444/jmxrmi
Please note that former example is not using authentication.
For details on how to secure JMX on Tomcat please refer to the following post: https://collaborate.pega.com/question/how-secure-sma-tomcat-8
Pegasystems Inc.
GB
When you login to app2 node, how many existing nodes have already been added? Can you provide some screenshots?
Regards
Simon
Pegasystems Inc.
IT
Have you assigned a distinct name to each node?
For further information on how to add a node in SMA please refer to the "Add a Node Entry" chapter in the SMA Reference Guide linked below:
https://community.pega.com/system/files/pdfs/SMA_Ref_Guide_V63SP1.pdf
IT Solution Service
SG
Hi,
Yes two app servers have different name. Let's say one is appserver1 and the other is appserver2, then my question is if it is possible to add appserver1 and appserver2 that use the same database. My colleague said it complained "the node is already added". Is that because database is just one? Can't we add two nodes just because two app servers have distinct servers?
Thanks,
Pegasystems Inc.
IT
In SMA you can add as many remote nodes as you want as long as you give them different names but you can only have at most a single local node.
Here local means same JVM and not same host. This is because you can't have more than one PRPC application running per JVM instance.
So in your case, assuming you have 2 nodes with two JVMs, with PRPC and SMA deployed on each instance of JVM, then each instance of SMA will have a local PRPC node (same JVM) and a remote one (remote JVM).
This means that the second node that fails to register must be correctly defined as remote node.
In this case, given that apparently you are running JBoss EAP 7, you need to use a JMX Service URL using the new syntax for the jboss-remoting protocol.
In JBoss EAP 7.x the remoting infrastructure moved to the HTTP protocol. As such the connection string to use with JBoss EAP 7 is the following:
In SMA you can add as many remote nodes as you want as long as you give them different names but you can only have at most a single local node.
Here local means same JVM and not same host. This is because you can't have more than one PRPC application running per JVM instance.
So in your case, assuming you have 2 nodes with two JVMs, with PRPC and SMA deployed on each instance of JVM, then each instance of SMA will have a local PRPC node (same JVM) and a remote one (remote JVM).
This means that the second node that fails to register must be correctly defined as remote node.
In this case, given that apparently you are running JBoss EAP 7, you need to use a JMX Service URL using the new syntax for the jboss-remoting protocol.
In JBoss EAP 7.x the remoting infrastructure moved to the HTTP protocol. As such the connection string to use with JBoss EAP 7 is the following:
service:jmx:remote+http://{host_name}:{jboss.management.http.port:9990}
The port is the management http port used to connect to the standard JBoss EAP Management console. By default the port is 9990.
The credentials to use are those that let you authenticate in the JBoss EAP Management console.
Please see the screenshot below for an example of SMA configuration and the following links for further details:
https://gautric.github.io/blog/2016/07/19/JConsole-JavaMissionControl-JBoss-EAP-7.html
https://docs.jboss.org/author/display/WFLY10/JMX+subsystem+configuration
IT Solution Service
SG
Thanks, I take your response as it is possible to add two nodes in my scenario. I am sorry to paste wrong screenshot but we use Tomcat, not JBOSS (My local machine is running on JBOSS, so I pasted wrong image). Below is my client environment representation:
So each host has the same version of JDK installed. In this case, I assume we have two nodes with two JVM. Am I right? If so, could you please again, the screenshot of SMA addition with Tomcat by remote method?
Thanks,
Accepted Solution
Pegasystems Inc.
IT
Since you are running on Tomcat, you need to ensure that JMX MBean is enabled and listening on a public interface in order to be able to connect from remote.
Please refer to the following Support Article for further details on this configuration: https://community.pega.com/support/support-articles/sma-connection-refused-tomcat-remote-node
As described in the article you can use netstat to check if the process is listening on the provided port.
In my case I’m using the following settings:
Since you are running on Tomcat, you need to ensure that JMX MBean is enabled and listening on a public interface in order to be able to connect from remote.
Please refer to the following Support Article for further details on this configuration: https://community.pega.com/support/support-articles/sma-connection-refused-tomcat-remote-node
As described in the article you can use netstat to check if the process is listening on the provided port.
In my case I’m using the following settings:
domenico@astmptc:~/dev/java/server/apache-tomcat-8.0.35/bin$ ps axfu | grep java
domenico 15922 0.0 0.0 21292 1020 pts/2 S+ 10:02 0:00 | \_ grep --color=auto java
domenico 15833 14.9 1.7 4847576 573552 pts/2 Sl 10:00 0:15 \_ /usr/lib/jvm/java-8-oracle/bin/java
...
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=9444
-Dcom.sun.management.jmxremote.local.only=false
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
-Djava.rmi.server.hostname=astmptc
...
org.apache.catalina.startup.Bootstrap start
domenico@astmptc:~/dev/java/server/apache-tomcat-8.0.35/bin$ netstat -apn | grep java
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp6 0 0 Proprietary information hidden:8005 :::* LISTEN 15833/java
tcp6 0 0 :::8009 :::* LISTEN 15833/java
tcp6 0 0 :::8080 :::* LISTEN 15833/java
tcp6 0 0 :::36026 :::* LISTEN 15833/java
tcp6 0 0 :::9444 :::* LISTEN 15833/java
Once JMX has been enabled in both Tomcat instances you can add APP #2 as remote node in the SMA instance running on APP #1.
The opposite will work as well (i.e: adding APP #1 as remote node in the SMA on APP #2)
To do so you need to use the following JMX Server URL:
service:jmx:rmi:///jndi/rmi://{host_name}:{jmx_port}/jmxrmi
Based on previous example the former string becomes:
service:jmx:rmi:///jndi/rmi://astmptc:9444/jmxrmi
Please note that former example is not using authentication.
For details on how to secure JMX on Tomcat please refer to the following post: https://collaborate.pega.com/question/how-secure-sma-tomcat-8
IT Solution Service
SG
Thanks Domenico!! We'll try this out.
Thanks,