JBoss ON reports NaN, --no data available-- or null for all metrics of NFS backed File System resource when NFSv2 is not supported by NFS server

Solution Unverified - Updated

Environment

  • Red Hat JBoss Operations Network (ON) 3.3
  • Platform File System resource backed by NFS

Issue

  • Metric values for NFS file system resource are not collected.
  • Free Files ('fileSystemUsage.freeFiles), Free Space ('fileSystemUsage.free), Used ('fileSystemUsage.used), Used Percentage ('fileSystemUsage.usePercent) and Capacity ('fileSystemUsage.total) always report a metric value of NaN`.

Resolution

This issue has been resolved in the latest JBoss ON 3.3 update.

If you are not able to update, you can workaround the issue by enabling NFS version 2 (NFSv2) on the NFS Server. For an example of how to do this for Red Hat Enterprise Linux (RHEL) 7, see Setup NFSv2 on RHEL7.1.

Root Cause

The native library used by JBoss ON to monitor a file system will first attempt to reach the NFS server if the file system is identified as NFS. This process is referred to as an RPC ping and is used to prevent a file stat request from being sent to an NFS server that is unreachable. However, this RPC ping is done for NFS version 2 (NFSv2) only. Meaning that if the remote NFS server does not expose the NFS mounts using the NFSv2 protocol, the ping will report the version is not supported and therefore is interpreted as a failed ping. The failed ping then results in all metric data being ignored for the NFS file system resource.

This issue may be most prominent for Red Hat Enterprise Linux 7 as NFSv2 is disabled by default due to it no longer being supported.

This issue was captured in This content is not included.Red Hat Bugzilla 1469292.

Diagnostic Steps

  • Verify that rpcinfo returns NFS version 2 (NFSv2) services. Replace ${NFS_SERVER_HOST} with the appropriate host address of your NFS server.

      rpcinfo -l "${NFS_SERVER_HOST}" 100003 2
    

    If the output indicates No remote programs registered. for an NFS server, this will indicate that this issue may apply.

    The following command may be helpful to iterate through all available NFS mounts:

      for nfsServer in `mount | grep 'type nfs ' | awk -F: '{print $1}'`; do echo "NFS Server: ${nfsServer}"; rpcinfo -l "${nfsServer}" 100003 2; done
    
  • Perform an RPC ping request using the JBoss ON Agent's native library. Replace ${NFS_SERVER_HOST} with the appropriate host address of your NFS server.

      java -cp "${RHQ_AGENT_HOME}"/lib/sigar-1.6.*.jar org.hyperic.sigar.RPC "${NFS_SERVER_HOST}" nfs
    

    If the output indicates (9) RPC: Program/version mismatch for an NFS server, this will indicate that this issue applies.

    The following command may be helpful to iterate through all available NFS mounts:

      for nfsServer in `mount | grep 'type nfs ' | awk -F: '{print $1}'`; do echo "NFS Server: ${nfsServer}"; java -cp "${RHQ_AGENT_HOME}"/lib/sigar-1.6.*.jar org.hyperic.sigar.RPC "${nfsServer}" nfs; done
    
SBR
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.