infiniflow/ragflow · error · ConnectorMissingCredentialError

Jira: {exc}

Error message

Jira: {exc}

What it means

ConnectorMissingCredentialError raised when the jira library's JIRA(...) constructor itself throws while building the client (network error, credentials rejected at first contact, invalid server URL, unsupported rest_api_version). The original message is preserved as 'Jira: {exc}'. The comment 'pragma: no cover - jira lib raises many types' signals the library has a wide exception surface, so the message text is the best diagnostic.

Source

Thrown at common/data_source/jira/connector.py:181

                    basic_auth=(user_email, api_token),
                    options=options,
                )
            elif api_token:
                self.jira_client = JIRA(
                    server=jira_url_for_client,
                    token_auth=api_token,
                    options=options,
                )
            elif user_email and password:
                self.jira_client = JIRA(
                    server=jira_url_for_client,
                    basic_auth=(user_email, password),
                    options=options,
                )
            else:
                raise ConnectorMissingCredentialError("Jira credentials must include either an API token or username/password.")
        except Exception as exc:  # pragma: no cover - jira lib raises many types
            raise ConnectorMissingCredentialError(f"Jira: {exc}") from exc
        self._sync_timezone_from_server()
        return None

    def validate_connector_settings(self) -> None:
        """Validate connectivity by fetching basic Jira info."""
        if not self.jira_client:
            raise ConnectorMissingCredentialError("Jira")

        try:
            if self.jql_query:
                dummy_checkpoint = self.build_dummy_checkpoint()
                checkpoint_callback = self._make_checkpoint_callback(dummy_checkpoint)
                iterator = self._perform_jql_search(
                    jql=self.jql_query,
                    start=0,
                    max_results=1,
                    fields="key",
                    all_issue_ids=dummy_checkpoint.all_issue_ids,

View on GitHub (pinned to 554fb1133a)

Solutions

  1. Read the text after 'Jira: ' - it is the underlying cause (e.g. 401 from Atlassian, connection refused, SSLError).
  2. Verify the token and credentials with curl against the same REST endpoint the client would use.
  3. Confirm network reachability (VPN, firewall, DNS) from the host running the connector.
  4. If rest_api_version was supplied in credentials, try omitting it so the default is used.

Example fix

# before
creds = {'jira_api_token': 'expired-token', 'rest_api_version': '2'}
connector.load_credentials(creds)  # Jira: 401 ...

# after
creds = {'jira_api_token': os.environ['JIRA_API_TOKEN']}  # fresh token, default API version
connector.load_credentials(creds)
Defensive patterns

Strategy: try-catch

Validate before calling

def jira_server_reachable(base_url: str, timeout: float = 5.0) -> bool:
    import requests
    try:
        return requests.get(base_url, timeout=timeout).status_code < 500
    except requests.RequestException:
        return False

Try / catch

try:
    connector.load_credentials(creds)
except ConnectorMissingCredentialError as e:
    cause = e.__cause__
    log.error('Jira client construction failed: %s', cause)
    if jira_server_reachable(connector.jira_base_url):
        mark_token_invalid(creds)  # server up but auth rejected -> rotate token
    raise

Prevention

When it happens

Trigger: JIRA(server=..., token_auth=...) with an unreachable server, an expired or revoked token, a rest_api_version the server rejects, or SSL failures. Any Exception escaping the two JIRA(...) construction branches lands here.

Common situations: Atlassian token rotated or expired without updating config; on-prem Jira behind a VPN not reachable from the worker; rest_api_version forced to a value the instance does not support.

Related errors


AI-assisted analysis of infiniflow/ragflow@554fb1133a (2026-08-15). Data as JSON: /api/errors/533735932af921a4. Report an issue: GitHub.