NetWorker: How To Produce AUTHC Java Thread and Heap Dumps For Linux NetWorker Server
Summary: This process is intended for NetWorker backup administrators to enable Java Virtual Machine (JVM) monitoring when Java thread and heap dumps are requested by NetWorker support. This may be useful when doing advanced diagnosis of authentication-related issues. ...
Instructions
Prerequisites:
- The NetWorker authentication (
authc) server is installed on a Linux platform. - This process requires restarting NetWorker services, so server downtime must be planned accordingly.
- The windows box used to monitor the NetWorker server requires having the VisualVM tool installed: https://visualvm.github.io/download.html
- Oracle Java Development Kit (JDK) must be installed on the Windows box used to launch VisualVM, NetWorker Runtime Environment (NRE) does not support VisualVM.
Configuring the NetWorker server to show information in VisualVM:
1. Connect to the NetWorker server over SSH and switch to root:
sudo su -
ifconfig -a
nslookup NETWORKER_SERVERNAME
netstat -apno | grep 9094
4. Make a copy of the
authservice configuration file:
cp /opt/nsr/authc-server/bin/authservice /opt/nsr/authc-server/bin/authservice_`date -I`
5. Open the authcservice file with a text editor and add the following lines:
vi /opt/nsr/authc-server/bin/authservice
-Djava.security.properties=${AUTHCCONF}/java.security \
-Dauthc.server.banner.location=${AUTHCCONF} \
-Djava.locale.providers=COMPAT \
-Dcom.sun.management.jmxremote \
-Dcom.sun.management.jmxremote.port=9094 \ # <--- Replace this another port if port 9094 is in use by another application
-Dcom.sun.management.jmxremote.rmi.port=9094 \ # <--- Replace this another port if port 9094 is in use by another application
-Djava.rmi.server.hostname=10.xxx.xxx.xxx \ # <--- Replace this with NW server IP address
-Dcom.sun.management.jmxremote.local.only=false \
-Dcom.sun.management.jmxremote.authenticate=false \
-Dcom.sun.management.jmxremote.ssl=false \
-XX:+IgnoreUnrecognizedVMOptions \
org.apache.catalina.startup.Bootstrap
6. Restart NetWorker services:
systemctl restart networker
7. After services come back up, confirm the port set in the authservice file is listening:
netstat -apno | grep 9094
The NetWorker authc server is now configured to show information in VisualVM.
Using VisuaVM to create thread and heap dumps for the NetWorker authc server:
1. Confirm that the Windows system can connect to port 9094 on the NetWorker server:
Powershell: tnc HOSTNAME -port 9094
2. Launch VisualVM.
3. Right-click Remote and select Add Remote Host:

4. Enter the NetWorker server hostname, click Advanced Settings and add port 9094.

5. Click OK.
6. Right-click the NetWorker server entry and select Add JMX Connection.

7. In the Connection field, enter the NetWorker server hostname followed by :9094.

8. Click OK.
9 Double-click the JMX entry in the left menu and select the Threads tab:

To produce thread dumps, click Thread Dump which produces a thread dump under the JMX connect:

To save the thread dump, right-click the dump and click Save As:

To produce a head dump, right-click the JMX connection and click Heap Dump:

You are prompted to save the heap dump under the /tmp directory on the NetWorker server:

10. When you have finished producing the thread and heap dumps. Manually save and zip (compress) the thread dumps from the VisualVM.
11. Manually zip (compress) the heap dumps on the NetWorker server along with the authc logs:
tar cvzf /tmp/`hostname`_`date -I`.tgz /tmp/heap* /proc/cpuinfo /proc/meminfo /nsr/authc/logs
This command creates a bundle with the NetWorker servers hostname and date in the NetWorker server's /tmp directory. Copy it off with an SCP tool:
NetWorker (Linux): How to copy files to/from a Linux NetWorker server.