pinpoint-apm/pinpoint · warning

Error creating FileDescriptorMetric [{}]

Error message

Error creating FileDescriptorMetric [{}]

What it means

FileDescriptorMetricProvider logs this when reflective instantiation of the file-descriptor metric class fails with any ReflectiveOperationException other than the missing-constructor case (e.g. class not found, inaccessible, or constructor threw). The provider falls back to FileDescriptorMetric.UNSUPPORTED_FILE_DESCRIPTOR_METRIC and the agent continues without fd metrics.

Source

Thrown at agent-module/profiler/src/main/java/com/navercorp/pinpoint/profiler/context/provider/stat/filedescriptor/FileDescriptorMetricProvider.java:148

        if (classToLoad == null) {
            return FileDescriptorMetric.UNSUPPORTED_FILE_DESCRIPTOR_METRIC;
        }
        if (UNSUPPORTED_METRIC.equals(classToLoad)) {
            return FileDescriptorMetric.UNSUPPORTED_FILE_DESCRIPTOR_METRIC;
        }

        try {
            @SuppressWarnings("unchecked")
            Class<FileDescriptorMetric> fileDescriptorMetricClass = (Class<FileDescriptorMetric>) Class.forName(classToLoad);
            try {
                Constructor<FileDescriptorMetric> fileDescriptorMetricConstructor = fileDescriptorMetricClass.getConstructor();
                return fileDescriptorMetricConstructor.newInstance();
            } catch (NoSuchMethodException e) {
                logger.warn("Unknown FileDescriptorMetric : {}", classToLoad);
                return FileDescriptorMetric.UNSUPPORTED_FILE_DESCRIPTOR_METRIC;
            }
        } catch (ReflectiveOperationException e) {
            logger.warn("Error creating FileDescriptorMetric [{}]", classToLoad);
            return FileDescriptorMetric.UNSUPPORTED_FILE_DESCRIPTOR_METRIC;
        }
    }
}

View on GitHub (pinned to 744c3d3075)

Solutions

  1. Inspect the chained ReflectiveOperationException cause in the log to pinpoint load vs instantiate vs constructor-throw
  2. Verify the agent jar contains the platform-specific FileDescriptorMetric classes
  3. Guard the metric constructor against missing MBean methods so it does not throw during instantiation
  4. Switch to a Pinpoint agent build matching your JVM vendor/version, or accept the fallback
Defensive patterns

Strategy: fallback

Validate before calling

jar tf pinpoint-agent.jar | grep -i FileDescriptorMetric; // ensure the platform-specific metric class is present before startup

Try / catch

try { return fileDescriptorMetricConstructor.newInstance(); } catch (ReflectiveOperationException e) { logger.warn("Error creating FileDescriptorMetric [{}]", classToLoad, e); return FileDescriptorMetric.UNSUPPORTED_FILE_DESCRIPTOR_METRIC; }

Prevention

When it happens

Trigger: Class.forName fails for the platform metric class; setAccessible/instantiation fails; the constructor throws because the OS does not expose the needed MBean.

Common situations: Incomplete agent deployment missing Unix/Linux metric classes; exotic platforms where com.sun.unix or OperatingSystemMXBean fd methods are unavailable; wrong agent distribution for the JVM vendor.

Related errors


AI-assisted analysis of pinpoint-apm/pinpoint@744c3d3075 (2026-09-07). Data as JSON: /api/errors/33c7d288cdb5e355. Report an issue: GitHub.