Question
Pegasystems Inc.
AU
Last activity: 29 Jan 2016 19:27 EST
SMA remote JMX to PRPC does not seem to work
Hi all,
Please refer to this link I have posted, I am not able to connect SMA remotely to PRPC over JMX.
https://mesh.pega.com/message/219473#219473
Regarsd
Seri
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Pegasystems Inc.
US
Is the hostname (....au) mapping to the ip address quoted? is that a web server (or load balancer), or actual prpc server ip? I tried direct connection to prpc, no issues with the approach in the SA. From tomcat running SMA to another remote tomcat running prpc.
Updated: 29 Jan 2016 0:06 EST
Pegasystems Inc.
AU
Hi Kevin,
No LB or Web server fronting the node, I tried the actual PRPC IP also.
I tried that also below, and I even removed the -Djava.rmi.server.hostname out since this line is to me simply restrict which node can connect over jmxremote (this is my understanding).
//--------------------------------
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=9004
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
-Djava.rmi.server.hostname="drsdevaes01.tmc.rta.nsw.gov.au"
service:jmx:rmi://drsdevaes01.tmc.rta.nsw.gov.au/jndi/rmi://drsdevaes01.tmc.rta.nsw.gov.au:9004/jmxrmi
Error
Reconnect |
MSG:
com.pega.jmx.ui.util.JMXClientException: Cannot connect to the server with specified settings
Connection refused to host: drsdevaes01.tmc.rta.nsw.gov.au; nested exception is: java.net.ConnectException: Connection timed out: connect
Stack Trace:
Hi Kevin,
No LB or Web server fronting the node, I tried the actual PRPC IP also.
I tried that also below, and I even removed the -Djava.rmi.server.hostname out since this line is to me simply restrict which node can connect over jmxremote (this is my understanding).
//--------------------------------
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=9004
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
-Djava.rmi.server.hostname="drsdevaes01.tmc.rta.nsw.gov.au"
service:jmx:rmi://drsdevaes01.tmc.rta.nsw.gov.au/jndi/rmi://drsdevaes01.tmc.rta.nsw.gov.au:9004/jmxrmi
Error
Reconnect |
MSG:
com.pega.jmx.ui.util.JMXClientException: Cannot connect to the server with specified settings
Connection refused to host: drsdevaes01.tmc.rta.nsw.gov.au; nested exception is: java.net.ConnectException: Connection timed out: connect
Stack Trace:
com.pega.jmx.ui.util.JMXClientException: Cannot connect to the server with specified settings
Connection refused to host: drsdevaes01.tmc.rta.nsw.gov.au; nested exception is: java.net.ConnectException: Connection timed out: connect at com.pega.jmx.ui.util.JMXClientException.wrap(JMXClientException.java:49) at com.pega.jmx.ui.action.AuthenticateAction.execute(AuthenticateAction.java:346) at com.pega.jmx.ui.action.AuthenticateAction.executeWithoutValidation(AuthenticateAction.java:86) at sun.reflect.GeneratedMethodAccessor462.invoke(Unknown Source)
//---------------------------------------
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=9004
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
-Djava.rmi.server.hostname= Proprietary information hidden
//--------------------------------
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=9004
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
-Djava.rmi.server.hostname=" Proprietary information hidden"
You can tried with one local PRPC or another VM. and another with VM. You will have the same issue.
All SMA local JMX connection work find, but not between different IPs.
Regarsd
Seri
Pegasystems Inc.
US
like I said, already tried without any issues. I noticed that you did not specify the port number in the SMA configuration. Also I would like check if the firewall exists between two ips.
Updated: 29 Jan 2016 19:27 EST
Pegasystems Inc.
AU
Hi Kevin,
Thanks for your help, I went back and lookup Oracle doco, my previous understanding of the -Djava.rmi.server.hostname=IP was wrong,
https://docs.oracle.com/javase/8/docs/technotes/guides/rmi/javarmiproperties.html
java.rmi.server.hostname
The value of this property represents the host name string that should be associated with remote stubs for locally created remote objects, in order to allow clients to invoke methods on the remote object. The default value of this property is the IP address of the local host, in "dotted-quad" format.
To call a method on a remote object the RMI client has first to retrieve a remote stub object from the RMI registry. This stub object contains the server address that is later used to connect to the remote object when a remote method should be called
So, the configuration should be
CATALINA_OPTS="-Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.port=9004 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=<should be your PRPC host IP>"
Hi Kevin,
Thanks for your help, I went back and lookup Oracle doco, my previous understanding of the -Djava.rmi.server.hostname=IP was wrong,
https://docs.oracle.com/javase/8/docs/technotes/guides/rmi/javarmiproperties.html
java.rmi.server.hostname
The value of this property represents the host name string that should be associated with remote stubs for locally created remote objects, in order to allow clients to invoke methods on the remote object. The default value of this property is the IP address of the local host, in "dotted-quad" format.
To call a method on a remote object the RMI client has first to retrieve a remote stub object from the RMI registry. This stub object contains the server address that is later used to connect to the remote object when a remote method should be called
So, the configuration should be
CATALINA_OPTS="-Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.port=9004 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=<should be your PRPC host IP>"
Yes, the SMA/JMX from and to VM and Local PRPC works, but unable to get this to work on the client side. Still not able to make JMX connect to the remote PRPC. I don't think there is FW ports blocking, will check with the client on Monday.
Error
Reconnect
MSG:
com.pega.jmx.ui.util.JMXClientException: Cannot connect to the server with specified settings
Connection refused to host: drsdevaes01.tmc.rta.nsw.gov.au; nested exception is: java.net.ConnectException: Connection timed out: connect
Stack Trace:
com.pega.jmx.ui.util.JMXClientException: Cannot connect to the server with specified settings Connection refused to host: drsdevaes01.tmc.rta.nsw.gov.au; nested exception is:
java.net.ConnectException: Connection timed out: connect
The config on tomcat to me has been done correctly.
-Dcatalina.base=C:\apache-tomcat-7.0.52 -Dcatalina.home=C:\apache-tomcat-7.0.52 -Djava.endorsed.dirs=C:\apache-tomcat-7.0.52\endorsed -Djava.io.tmpdir=C:\apache-tomcat-7.0.52\temp -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file=C:\apache-tomcat-7.0.52\conf\logging.properties -Xms2048m -Xmx2048m -XX:PermSize=256m -XX:MaxPermSize=512m -XX:NewSize=682m -XX:MaxNewSize=682m -XX:+HeapDumpOnOutOfMemoryError -XX:+UseCompressedOops -XX:ReservedCodeCacheSize=256m -XX:+UseCodeCacheFlushing -XX:TargetSurvivorRatio=90 -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=80 -XX:+CMSClassUnloadingEnabled -XX:+DisableExplicitGC -Djava.awt.headless=true -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -verbose:gc -Xloggc:C:\apache-tomcat-7.0.52\logs\gc.log -Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.port=9004 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=drsdevaes01.tmc.rta.nsw.gov.au exit -Xms2048m -Xmx2048m -Xss128k
Regards
Seri