apache/beam · error · IllegalArgumentException
Internal error initializing BeamFnDataReadRunner: invalid mo
Error message
Internal error initializing BeamFnDataReadRunner: invalid monitoring info: %s
What it means
During construction, BeamFnDataReadRunner builds a MonitoringInfo for the DATA_CHANNEL_READ_INDEX metric and validates it. If validation reports the monitoring info invalid, the constructor throws an IllegalArgumentException labeled as an internal error, since this object is assembled entirely from constants and should always validate.
Source
Thrown at sdks/java/harness/src/main/java/org/apache/beam/fn/harness/BeamFnDataReadRunner.java:182
public BeamFnStateClient getStateClient() {
return beamFnStateClient;
}
@Override
public Supplier<String> getCurrentInstructionId() {
return processBundleInstructionIdSupplier;
}
});
SimpleMonitoringInfoBuilder monitoringInfoBuilder =
new SimpleMonitoringInfoBuilder()
.setUrn(Urns.DATA_CHANNEL_READ_INDEX)
.setType(MonitoringInfoConstants.TypeUrns.SUM_INT64_TYPE)
.setLabel(MonitoringInfoConstants.Labels.PTRANSFORM, pTransformId);
MetricsApi.MonitoringInfo monitoringInfo = monitoringInfoBuilder.build();
if (monitoringInfo == null) {
throw new IllegalArgumentException(
String.format(
"Internal error initializing BeamFnDataReadRunner: invalid monitoring info: %s",
monitoringInfoBuilder.validate()));
}
dataChannelReadIndexShortId = shortIdMap.getOrCreateShortId(monitoringInfo);
addBundleProgressReporter.accept(
new BundleProgressReporter() {
@Override
public void updateIntermediateMonitoringData(Map<String, ByteString> monitoringData) {
synchronized (splittingLock) {
monitoringData.put(
dataChannelReadIndexShortId, MonitoringInfoEncodings.encodeInt64Counter(index));
}
}
@Override
public void updateFinalMonitoringData(Map<String, ByteString> monitoringData) {View on GitHub (pinned to 12126d8942)
Solutions
- Upgrade/align org.apache.beam SDK and fn-harness artifacts to the same version.
- Check the message's validate() output to identify which field of the MonitoringInfo is invalid.
- File a Beam issue if it reproduces on a clean, version-aligned build.
- Rebuild without local patches to MonitoringInfoConstants/Urn tables.
Defensive patterns
Strategy: try-catch
Try / catch
try {
new BeamFnDataReadRunner(...);
} catch (IllegalArgumentException e) {
if (e.getMessage().contains("invalid monitoring info")) {
log.error("Monitoring info validation failed: {}", e.getMessage()); // check SDK version alignment
}
throw e;
} Prevention
- Keep all org.apache.beam artifacts on one version
- Avoid forking MonitoringInfoConstants/Urn tables
- Report reproducible failures upstream as Beam bugs
When it happens
Trigger: Constructing BeamFnDataReadRunner for a Fn Harness data channel where the built MonitoringInfo fails validate() — effectively only from inconsistent MonitoringInfoConstants URN/type/label tables or a corrupted build.
Common situations: Mixing Beam SDK/harness versions where monitoring info constants changed; custom forks altering Urns or type definitions; genuine Beam bug.
Understand the failure class
Background: "This is a bug, please report it": internal invariant violations, unreachable panics, and SNH errors explained — this error's family across 47 libraries.
Related errors
- Internal error: unexpected kind of Type:
- Attempt to case match on unknown %s subclass %s
- An unsupported type of cache was passed in. Received %s.
- Lazily observed byte size will be under reported due to exce
- Timing number 0b" + timingNumber.toString(2) + " has more th
AI-assisted analysis of apache/beam@12126d8942 (2026-09-13).
Data as JSON: /api/errors/b31a2d07319c7fb2.
Report an issue: GitHub.