apache/seatunnel · error · IOException

SNMP agent returned error status {errorStatus} ({errorStatus

Error message

SNMP agent returned error status {errorStatus} ({errorStatusText}) at index {errorIndex}

What it means

Snmp4jClient.get() checks the GET response PDU's errorStatus. Any status other than PDU.noError is rethrown as this IOException with the numeric status, text, and varbind index. The agent responded but refused or could not satisfy the GET for at least one OID.

Source

Thrown at seatunnel-connectors-v2/connector-snmp/src/main/java/org/apache/seatunnel/connectors/seatunnel/snmp/source/Snmp4jClient.java:76

            throw e;
        }
        this.snmp = snmp;
    }

    @Override
    public List<SnmpRecord> get(List<OID> oids) throws IOException {
        ResponseEvent event = snmp.send(buildGetRequest(oids), target);
        if (event == null || event.getResponse() == null) {
            throw new IOException(
                    "SNMP request timed out for agent "
                            + config.getHost()
                            + ":"
                            + config.getPort());
        }

        PDU response = event.getResponse();
        if (response.getErrorStatus() != PDU.noError) {
            throw new IOException(
                    "SNMP agent returned error status "
                            + response.getErrorStatus()
                            + " ("
                            + response.getErrorStatusText()
                            + ") at index "
                            + response.getErrorIndex());
        }
        return extractRecords(response);
    }

    @Override
    public void close() throws IOException {
        snmp.close();
    }

    static PDU buildGetRequest(List<OID> oids) {
        PDU pdu = new PDU();
        pdu.setType(PDU.GET);

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Identify the failing varbind from errorIndex and verify that OID exists on the agent (snmpwalk).
  2. Use SNMPv2c/v3 instead of v1 to get noSuchInstance/noSuchObject instead of blunt noSuchName failures.
  3. If errorStatus is tooBig, request fewer OIDs per GET.
  4. Confirm the community has read access to that subtree of the MIB.
  5. Cross-check OIDs in the config against the agent's actual MIB (vendor MIB files).

Example fix

// before
oids = [1.3.6.1.2.1.1.1.0, 1.3.6.1.4.1.9999.99.1.0] // second OID absent on agent
// after
snmpwalk to confirm; keep only 1.3.6.1.2.1.1.1.0 or install/point to correct vendor MIB OID
Defensive patterns

Strategy: validation

Validate before calling

// validate all configured OIDs exist on the agent before the job
for (String oid : config.getOids()) {
    String out = snmpCli("snmpget -v2c -c " + community + " " + host + " " + oid);
    if (out.contains("No Such")) throw new IllegalArgumentException("OID missing on agent: " + oid);
}

Try / catch

try {
    records = client.get(oids);
} catch (IOException e) {
    AgentError ae = parseAgentStatus(e);
    if (ae != null && ae.status == PDU.tooBig) shrinkBatchAndRetry(oids);
    else throw e;
}

Prevention

When it happens

Trigger: Calling get(List<OID>) where the response has getErrorStatus() != PDU.noError — e.g. noSuchName for a nonexistent OID, tooBig for an oversized PDU, genErr inside the agent.

Common situations: OIDs in the source config not present on that agent; requesting OIDs from the wrong MIB version (v1 noSuchName vs v2 noSuchInstance); PDU too big for the agent's max message size; agent internal errors under load.

Related errors


AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10). Data as JSON: /api/errors/97bb4032821494d1. Report an issue: GitHub.