Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

SMA: Connection refused on Tomcat remote node

SA-28752

Summary



User faced the following exception trying to configure a remote PRPC connection from System Management Application (SMA) using Tomcat application server. 
 

Error Messages



com.pega.jmx.ui.util.JMXClientException: Cannot connect to the server with specified settings
Failed to retrieve RMIServer stub: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: your_host.your_domain.org; nested exception is: java.net.ConnectException: Connection refused


Steps to Reproduce



Configure a remote node on SMA URL.


Root Cause



A defect or configuration issue in the operating environment:

SMA use JMX to define connections to Tomcat based remote nodes. Hence, to establish a connection, on the remote node the JMX MBean must be enabled and listening on a public interface.

Resolution



Perform the following local-change: 

In order to enable JMX in Tomcat and expose a RMI port for remote connections the following JVM options must be added to the JAVA_OPTS system property present in the setenv.[bat|sh] script contained in the bin directory of the Tomcat installation:
  • Dcom.sun.management.jmxremote
  • Dcom.sun.management.jmxremote.port=<your_port>
  • Dcom.sun.management.jmxremote.local.only=false
  • Dcom.sun.management.jmxremote.authenticate=false
  • Dcom.sun.management.jmxremote.ssl=false
  • Djava.rmi.server.hostname=<your hostname> 


E.g (Using 9999 as a random port number): 

export JAVA_OPTS=-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9999 -Dcom.sun.management.jmxremote.local.only=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=my_host.my_domain.org

To troubleshoot connection issues:

  1. Use netstat command to check if the process is listening on the specified port. For example:
~$ netstat -apn | grep java
...
tcp6 0 0 :::9999 :::* LISTEN 15833/java
​      2. Ensure that the MBean server is listening on external interfaces. In the former example the MBean server is listening on port 9999 on every available IP address (:::).
        3. Test the remote connection using JConsole. 
If user is able to connect to using JConsole then the connection should be possible from SMA as well.
 

 

Published October 21, 2016 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us