Cannot connect to an application

If the application you want to monitor does not appear in the connection dialog list, review these possible solutions.

Before any application can be monitored, the runtime environment it is running on must have a monitoring agent installed. See the agent installation instructions.

For Node.js applications, also see the documentation for the Node Application Metrics module, for further troubleshooting information.

Is the monitoring agent installed correctly?

Check the monitoring agent installation. See Installing a Health Center monitoring agent for more information.

Has the application been enabled for monitoring?

Check that the application has been enabled for monitoring. See Starting the monitoring agent for more information.

If you cannot connect to a Java application, check that your application was launched with the correct arguments for your Java version. See Platform requirements for further information about using the Health Center with different versions of the Java SDK.

Check that the agent and application are running

Check the application to see if it has been started. Check that the agent is running on the application. If the agent has started successfully, you normally see a message in the application console:
  • For Java applications: INFO: Health Center agent started on port 1972
  • For the Node.js application message, see the documentation for the Node Application Metrics module.
The port number is also written to the healthcenter.<pid>.log file in the users temporary directory. The <pid> is the process ID for the agent that is listening on that port.

Check that the application is still running. Sometimes applications end unexpectedly early.

Connection problems are also possible if the monitored runtime environment is running, but there are no more live application threads.

Check that the MQTT broker is running, and that Health Center is configured to connect to the broker

If you are using an MQTT connection, check that the MQTT broker is running. If the broker is not running or cannot be detected, the message No broker was detected on host_name on port port_number is shown in the Connection wizard. If the broker is connected but no agents were detected, the Search for an Agent page of the Connection wizard is blank in the area where a list of agents is normally displayed.

If the broker is running but cannot be detected, check that the MQTT hostname and port that you specified in the Connection wizard match the hostname and port of the MQTT broker. See your broker documentation for information about where these values are set.

If the broker was detected but no agents are listed, check the following items:
  • Check that the correct monitoring agent configuration properties file was loaded. There can be multiple versions of this file, in different locations, as described in Configuring the monitoring agent. You can use the IBM_HC_NODE_EARLY_LOGGING environment variable (set to any value) to output messages to the stderr stream that describe load attempts for the properties file. Also ensure that the file has the correct access permissions.
  • Check the contents of the properties file. For example, check that the com.ibm.diagnostics.healthcenter.mqtt.broker.host and com.ibm.diagnostics.healthcenter.mqtt.broker.port properties match the hostname and port of the MQTT broker, and check that the com.ibm.diagnostics.healthcenter.mqtt property is set to on. For more information about properties, see Health Center configuration properties.
If the broker is running and the agent successfully connects to the broker, you should see the following message output by the agent:
com.ibm.diagnostics.healthcenter.mqtt INFO: Connected to broker localhost:1883
If you are not seeing any messages, check the value of the com.ibm.diagnostics.healthcenter.logging.level property in the configuration properties file. For more information, see Health Center configuration properties.

Check for suspended applications

If the monitored runtime environment has been suspended, the connection dialog cannot connect to the monitored VM and might timeout.

Check firewalls

When the monitored application is not on the same workstation as the client, the client must be able to access the monitored application remotely. If the remote workstation is protected by a firewall, a port must be opened in the firewall to enable the monitoring agent to listen for connections.

For Java applications only, if Health Center is set to use iiop as the transport protocol (the default), you must also open a second port in the firewall, for use by the object request broker (ORB). Use the IIOP port system property to specify this port. For more information, see Health Center configuration properties.

Firewalls can also cause timeouts when you select the JMX connection option and Health Center is scanning for agents on a remote machine. In these cases, specify the exact Health Center port, and clear the Scan next ports for available ports option.

Check network interfaces

If the system running the monitored application has multiple network interfaces, the agent might listen on a different interface to the one the client uses. To set the interface that the agent listens on, use system properties. To use a specific network interface, run the server with the follow property:
-Djava.rmi.server.hostname=<preferred_ip_address>
The <preferred_ip_address> determines the interface used by the agent.

Check authentication

If authentication is enabled on the monitored application, ensure that security credentials have been entered on the first page of the connection wizard. Without these credentials, the monitored application might not appear in the application list on the second page of the connection wizard.

If you are using an MQTT broker, check that the Health Center properties for the broker user name and password are set to match the broker credentials. For more information, see Securing Health Center

Check that application threads are running

The monitoring agent shuts down when it detects that all application threads have terminated. In some cases, you do not want the Health Center to shut down. For example, a Java application which exports objects to an external RMI registry stays alive to allow RMI connections, but there are no active application threads. The Health Center agent cannot find application threads, so it terminates.

For Java applications only: to ensure that the Health Center agent keeps running, add the keepAlive option to the Health Center launch parameters:
-agentlib:healthcenter=keepAlive
Note: A side-effect of the keepAlive option is that the monitored JVM does not terminate.