Skip to Content
OpenETL
Build a connector

Check reasons and protocol results

Look up standard failure reasons and check result behavior across hosts and languages.

Edit on GitHub

Use this reference when you implement or interpret connector check results.

The standard reasons

The check package has 17 standard reasons, and netcheck adds one. The toolkits and check.Classify fail with them, and your checks can too. Each expects the params that its message and fix use. A reason without a fix has none of its own: give the failure one where you can.

ReasonIn GoCodeMessageFixPlaceholders
dns_failedcheck.DNSFailedTRANSIENTThe host name {host} doesn't resolve.Check the host name in the config, and that the runner's network resolves it.host
connection_refusedcheck.ConnectionRefusedTRANSIENT{address} refused the connection.Check the host and port, and that the service listens there.address
timed_outcheck.TimedOutTRANSIENT{address} didn't answer in time.Check that firewalls, security groups and allowlists let the runner reach it.address
tls_failedcheck.TLSFailedTRANSIENTThe TLS handshake with {address} failed.Check the certificate the upstream presents, and the TLS settings in the config.address
unreachablecheck.UnreachableTRANSIENTCan't reach {address}.Check the address in the config, and the network path from the runner.address
credentials_rejectedcheck.CredentialsRejectedAUTH_INVALIDThe upstream rejected the credentials.Check the credentials in the config and the secrets they name.None
credentials_expiredcheck.CredentialsExpiredAUTH_EXPIREDThe credentials have expired.Renew the credentials and update their secret.None
permission_deniedcheck.PermissionDeniedPERMISSION_DENIEDThe upstream denied access.Grant the connector's identity the access this check names.None
privilege_missingcheck.PrivilegeMissingPERMISSION_DENIED{principal} has no {privilege} on {object}.Grant {privilege} on {object} to {principal}.principal, privilege, object
not_foundcheck.NotFoundCONFIG_INVALID{resource} doesn't exist.Check the name in the config, or create it.resource
config_invalidcheck.ConfigInvalidCONFIG_INVALIDThe config doesn't work with the upstream.Correct the config.None
unsupported_versioncheck.UnsupportedVersionCONFIG_INVALIDThe upstream's version is {found}, and the connector needs {required}.Nonefound, required
setting_mismatchcheck.SettingMismatchCONFIG_INVALID{setting} is {found}, and the connector needs {required}.Set {setting} to {required}.setting, found, required
rate_limitedcheck.RateLimitedRATE_LIMITEDThe upstream is limiting requests.Try again later, or raise the limit.None
quota_exceededcheck.QuotaExceededRESOURCE_EXHAUSTEDA quota of the upstream is used up.Free capacity, or raise the quota.None
unavailablecheck.UnavailableTRANSIENTThe upstream can't serve requests now.Try again later.None
unknowncheck.UnknownINTERNALThe check failed.NoneNone
certificate_expiringnetcheck.CertificateExpiringTRANSIENTThe certificate of {address} expires on {expires}.Renew the certificate.address, expires

On a warning, unknown's message is The check raised a warning. check.Classify can find a network error without an address. It then gives the reason a message without a placeholder, such as "The upstream refused the connection.".

What the platform does with the answer

sdk.Serve turns the report into the RPC's answer. These rules apply to every connector, and the SDK follows them for you:

  • The answer's error. If an item failed, the response's error is the first failed item's. Its code is the item's code, and its message is title: message: detail, with the placeholders filled in. A host from before items reads only this error.
  • An error without a failed item. The response's error is also set when the checks could not finish, because they ran out of time or were cancelled. The items they did not reach or finish are then skipped. It is also set, with no items, when the connector could not run its checks at all, such as for a list that check.Validate refuses. A response with an error has failed either way.
  • Failing closed. A host counts an item whose status is not passed, warning or skipped as failed. A failed item fails the answer even if the response has no error.
  • Failures in the answer. A failed check is an answer, not an RPC error. A connector that answers a preflight RPC with Unimplemented has no preflight: no items and no failure.
  • The deadline. If the RPC has a deadline, the SDK ends the run earlier: by a quarter of the time left, and by one second at most. It then answers in time with the items that finished, and the rest as Time limits describes.
  • Secrets. On the EgressProxy and EgressRaw tiers, the SDK puts the values of the config's x-secret fields in the config. It then replaces each such value with [redacted] in every item's name, text, reason, field, param names and values, detail and error. It finds the value as written, URL-escaped with uppercase or lowercase hex digits, and escaped as in a Go or JSON string, such as %q prints it. On the EgressHost tier, the connector gets only the secrets' names.

The SDK removes only the values it resolved, in those forms. It cannot find a secret that your connector changed in another way, such as one encoded in base64 or hashed, or one it got another way. Do not put a secret, or anything made from one, in a param, a template or a detail.

The runner's host then takes the answer, whatever language the connector is written in, and applies these rules:

  • Secrets. The host replaces the values of the secrets that it gave the connector with [redacted], in the same places and forms as the SDK. These are the values of the config's x-secret fields, the token of an AWS role that the runner leased for the connector, and the runner's own AWS secret key and session token when the connector inherits them.

  • Text. The host makes all text valid UTF-8. It replaces control characters, and bidirectional and other invisible formatting characters, with spaces. A detail keeps its line breaks and tabs.

  • Time. A connector's check has 1 minute, and its preflight has 2 minutes. The host passes the time as the RPC's deadline. In a preflight, a connector that does not answer in time fails its part with TRANSIENT, and a message such as the source's preflight didn't finish within 2m0s. A check of one source or destination that does not answer in time could not run: people get an error, not a result.

  • Limits. The host cuts each text that is longer than its limit, and ends it with …. It keeps the first 50 params of an item, in the order of their names. The limits are in bytes:

    WhatLimit
    Items in one answer2,000
    name200 bytes
    title, field300 bytes each
    reason100 bytes
    message, fix, description, and an item's error message2,000 bytes each
    detail, and the response's error message4,000 bytes each
    Params of one item50, each name at most 64 bytes and each value at most 1,000 bytes
    The text of all items in one answer, params included1 MiB

    An answer with more than 2,000 items, or more than 1 MiB of text, fails with INTERNAL, and the host keeps the items that fit. Its message is one of these, with the numbers filled in:

    • the connector answered with N items, and an answer has at most 2000: the first 2000 are kept
    • the connector answered with N bytes of items, and an answer has at most 1048576: the first K items are kept
    • the connector answered with N items and more than 1048576 bytes of them, and an answer has at most 2000 items and 1048576 bytes: the first K are kept

    The result of a whole operation has at most 1.5 MiB, as the runner encodes it. A larger result fails the operation, with a message such as the result of the preflight is N bytes, and a result has at most 1572864: the connectors answered with too much.

Design your checks for these limits. Report a bounded number of items, such as one item for each stream, not one for each column or file. openetl connector check does not apply the host's limits. It reads the answer as a host does, and fails closed: an item whose status is not passed, warning or skipped shows as failed. A failed item without an error code gets INTERNAL, and one without a reason gets unknown.

OpenETL keeps each item's templates and params apart, from the connector to the API. The CLI and the console fill the placeholders when they show an item. Under a failed or warning item, they show its message, detail, fix, field, code and reason. The console also shows each item's kind, and its description on request. Pipeline CLI commands and Use the console show what people see.

Connectors in other languages

A connector in another language serves the same RPCs and answers with CheckItem messages, defined in check.proto. CheckResponse is in connector.proto, and the preflight messages are in source.proto and destination.proto. Their comments are the contract.

FieldWhat it holds
nameUnique in the response and the same between releases: ^[a-z0-9]+([._-][a-z0-9]+)*$.
titleWhat was checked, for people. A template.
statusPASSED, WARNING, FAILED or SKIPPED.
messageWhat it found when passed, what failed when failed or warning, and why it was not checked when skipped. A template.
errorRequired when failed, optional when warning, and unset otherwise. Its message is the item's message with the placeholders filled in, without the detail.
fixFor a failure or a warning: what to do about it. A template.
fieldThe config field it concerns, as a dotted path. Empty for none.
kindWhat it verifies. UNSPECIFIED counts as CUSTOM.
descriptionWhat it verifies, and why the connector needs it. A template. Optional.
reasonFor a failure or a warning: a standard reason's name or your own, lowercase words joined by _. Empty counts as unknown.
paramsValues for the placeholders.
detailFor a failure or a warning: the cause's text. Not a template.
durationHow long the check of the item ran. Unset if it did not run.

Follow these rules:

  • A placeholder is {name}, with a name that matches [a-z][a-z0-9_]*, filled from params. A placeholder without a param stays as written. Text without placeholders is plain text.
  • Send the items in the order they ran.
  • When an item failed, set the response's error to the first failed item's code. Set its message to title: message, with the placeholders filled in, then : and the detail if there is one.
  • If the checks ran out of time or were cancelled, mark the items they did not reach or finish SKIPPED. Set the response's error even if no item failed.
  • If the connector could not run its checks at all, send no items and set the response's error.
  • Leave the response's error unset in every other case.
  • Report a failed check in the response, not as an RPC error.
  • Answer before the RPC's deadline, with the items that finished.
  • No item text, param or detail holds a secret or record contents.

On this page