이 콘텐츠는 선택한 언어로 제공되지 않습니다.

Chapter 9. Diagnose and resolve serverless workflow issues


Use the following information to diagnose and resolve serverless workflow and visibility issues.

9.1. Troubleshoot workflow HTTP error codes

Workflow operations fail when a service endpoint returns an HTTP error code. The user interface displays the HTTP code and error message. See external documentation for a complete list of HTTP status code meanings.

The following table lists common HTTP errors encountered during workflow execution:

Expand
HTTP codeDescriptionPossible cause

401

Unauthorized access

The token, password, or username provided for the endpoint might be incorrect or expired.

403

Forbidden

The server understood the request but refused to process it due to insufficient permissions to a resource or action.

409

Conflict

The workflow attempted to create or update a resource (for example, Kubernetes or OpenShift resources) that already exists.

9.2. Troubleshooting common workflow deployment errors

Use these steps to diagnose and resolve common workflow deployment, connectivity, or configuration failures.

Procedure

  1. If the workflow operation fails, examine the container log of the specific workflow instance to determine the cause by running the following command:

    $ oc logs my-workflow-xy73lj
    Copy to Clipboard Toggle word wrap
  2. If the workflow fails to reach an HTTPS endpoint, check the pod log for an SSL certificate verification failure. This occurs if the target endpoint uses a Certificate Authority (CA) that the workflow cannot verify. The resulting error resembles the following:

    sun.security.provider.certpath.SunCertPathBuilderException - unable to find valid certification path to requested target
    Copy to Clipboard Toggle word wrap
  3. To resolve the SSL certificate error, load the additional CA certificate into the running workflow container.

9.3. Troubleshooting cross-namespace SonataFlow configuration and deployment issues

Use this procedure to resolve configuration and deployment failures when SonataFlow workflows are installed in a namespace separate from the core services, or if the Data Index fails to connect to the PostgreSQL database.

Prerequisites

  • You have administrator privileges to access the OpenShift cluster.

Procedure

  1. Identify required namespaces.

    • Retrieve the namespace value where RHDH is running using oc get backstage -A.
    • Identify the SonataFlow Services Namespace by checking for either a sonataflowclusterplatform or sonataflowplatform instance.

      Note

      By default, the SonataFlow namespace must be the same as the RHDH namespace.

  2. If the workflow is deployed to a namespace outside the core SonataFlow services, configure network policies to permit the necessary inter-namespace traffic.

    # Example NetworkPolicy configuration to ingress traffic into the workflow namespace
    apiVersion: networking.k8s.io/v1
    kind: NetworkPolicy
    metadata:
      name: {{ .Release.Name }}-allow-infra-ns-to-workflow-ns
      # Sonataflow and Workflows are using the RHDH target namespace.
      namespace: {{ .Release.Namespace | quote }}
    spec:
      podSelector: {}
      ingress:
        - from:
          - namespaceSelector:
              matchLabels:
                # Allow knative events to be delivered to workflows.
                kubernetes.io/metadata.name: knative-eventing
          - namespaceSelector:
              matchLabels:
                # Allow auxiliary knative function for workflow (such as m2k-save-transformation)
                kubernetes.io/metadata.name: knative-serving
          - namespaceSelector:
              matchLabels:
                # Allow communication between the serverless logic operator and the workflow namespace.
                kubernetes.io/metadata.name: openshift-serverless-logic
    Copy to Clipboard Toggle word wrap
  3. Add SonataFlowClusterPlatform Custom Resource as shown in the following configuration:

    oc create -f - <<EOF
    apiVersion: sonataflow.org/v1alpha08
    kind: SonataFlowClusterPlatform
    metadata:
      name: cluster-platform
    spec:
      platformRef:
        name: sonataflow-platform
        namespace: $RHDH_NAMESPACE
    Copy to Clipboard Toggle word wrap
  4. To allow communication between RHDH namespace and the workflow namespace, create the following network policies:

    1. Allow RHDH services to accept traffic from workflows. Create an additional network policy within the RHDH instance namespace as shown in the following configuration::

      oc create -f - <<EOF
      apiVersion: networking.k8s.io/v1
      kind: NetworkPolicy
      metadata:
        name: allow-external-workflows-to-rhdh
        # Namespace where network policies are deployed
        namespace: $RHDH_NAMESPACE
      spec:
        podSelector: {}
        ingress:
          - from:
            - namespaceSelector:
                matchLabels:
                  # Allow SonataFlow services to communicate with new/additional workflow namespace.
                  kubernetes.io/metadata.name: $ADDITIONAL_WORKFLOW_NAMESPACE
      Copy to Clipboard Toggle word wrap
    2. Allow traffic from RHDH, SonataFlow and Knative. Create a network policy within the additional workflow namespace as shown in the following configuration:

      oc create -f - <<EOF
      apiVersion: networking.k8s.io/v1
      kind: NetworkPolicy
      metadata:
        name: allow-rhdh-and-knative-to-workflows
        namespace: $ADDITIONAL_WORKFLOW_NAMESPACE
      spec:
        podSelector: {}
        ingress:
          - from:
            - namespaceSelector:
                matchLabels:
                  # Allows traffic from pods in the {product-very-short} namespace.
                  kubernetes.io/metadata.name: $RHDH_NAMESPACE
            - namespaceSelector:
                matchLabels:
                  # Allows traffic from pods in the Knative Eventing namespace.
                  kubernetes.io/metadata.name: knative-eventing
            - namespaceSelector:
                matchLabels:
                  # Allows traffic from pods in the Knative Serving namespace.
                  kubernetes.io/metadata.name: knative-serving
      Copy to Clipboard Toggle word wrap
  5. (Optional) Create an allow-intra-namespace policy in the workflow namespace to enable unrestricted communication among all pods within that namespace.
  6. If workflow persistence is required, perform the following configuration steps:

    1. Create a dedicated PostgreSQL Secret containing database credentials within the workflow namespace as shown in the following configuration:

      oc get secret sonataflow-psql-postgresql -n <your_namespace> -o yaml > secret.yaml
      sed -i '/namespace: <your_namespace>/d' secret.yaml
      oc apply -f secret.yaml -n $ADDITIONAL_NAMESPACE
      Copy to Clipboard Toggle word wrap
    2. Configure the workflow serviceRef property to correctly reference the PostgreSQL service namespace as shown in the following configuration:

      apiVersion: sonataflow.org/v1alpha08
      kind: SonataFlow
        ...
      spec:
        ...
        persistence:
          postgresql:
            secretRef:
              name: sonataflow-psql-postgresql
              passwordKey: postgres-password
              userKey: postgres-username
            serviceRef:
              databaseName: sonataflow
              databaseSchema: greeting
              name: sonataflow-psql-postgresql
              namespace: $POSTGRESQL_NAMESPACE
              port: 5432
      Copy to Clipboard Toggle word wrap
      namespace
      Enter the namespace where the PostgreSQL server is deployed.
  7. If the sonataflow-platform-data-index-service cannot connect to the PostgreSQL database on startup, perform the following diagnostic checks:

    1. Verify that the PostgreSQL Pod has fully transitioned to a running and operational status. Allow additional time for database initialization before expecting related service pods (DataIndex, JobService) to establish a connection.
    2. If the PostgreSQL Server operates in a dedicated namespace (for example, outside RHDH), verify that network policies are configured to allow ingress traffic from the SonataFlow services namespace. Network policies might prevent the Data Index and Job Service pods from connecting to the database.

9.4. Troubleshooting workflows missing from the RHDH UI

You can perform the following checks to verify the workflow status and connectivity when the deployed workflow is missing from the RHDH Orchestrator UI.

Prerequisites

  • You have administrator privileges to access the OpenShift cluster where RHDH and SonataFlow services are running.

Procedure

  1. Verify if the workflow uses GitOps profile. The RHDH Orchestrator UI displays only the workflows that use this profile. Make sure the workflow definition and the SonataFlow manifests use the GitOps profile.
  2. Verify that the workflow pod has started and is ready. The readiness of a workflow pod depends on its successful registration with the Data Index. When a workflow initializes, it performs the following actions:

    1. It attempts to create its schema in the database (if persistence is active).
    2. It attempts to register itself to the Data Index. The workflow pod remains in an unready state until it successfully registers to the Data Index.

      Check the workflow deployment for additional status and error messages that might be unavailable in the pod log.

  3. Check if the workflow pod can reach the Data Index service. Connect to the workflows pod and send the following GraphQL request to the Data Index:

    curl -g -k  -X POST  -H "Content-Type: application/json" \
                        -d '{"query":"query{ ProcessDefinitions  { id, serviceUrl, endpoint } }"}' \
                        http://sonataflow-platform-data-index-service.<your_namespace>/graphql
    Copy to Clipboard Toggle word wrap

    Use the Data Index service and namespace as defined in your environment. By default, this is the same namespace where RHDH is installed. If your SonataFlow resources are installed in a separate namespace, use <your_namespace>. Check if the RHDH pod can reach the workflow service by running the following command:

    curl http://<workflow_service>.<workflow_namespace>/management/processes
    Copy to Clipboard Toggle word wrap
  4. Connect to the RHDH pod. Verify its connection to the Data Index service and inspect the RHDH pod logs for messages from the Orchestrator plugin.

    To inspect the logs, identify the RHDH pod and run the following oc logs command:

    oc get pods -n <your_namespace>
    oc logs <rhdh_pod_name> -n <your_namespace>
    Copy to Clipboard Toggle word wrap

    You must find messages indicating it is attempting to fetch workflow information from the Data Index, similar to the following:

    {"level":"\u001b[32minfo\u001b[39m","message":"fetchWorkflowInfos() called: http://sonataflow-platform-data-index-service.<your_namespace>","plugin":"orchestrator","service":"backstage","span_id":"fca4ab29f0a7aef9","timestamp":"2025-08-04 17:58:26","trace_flags":"01","trace_id":"5408d4b06373ff8fb34769083ef771dd"}
    Copy to Clipboard Toggle word wrap

    Notice the "plugin":"orchestrator" that can help to filter the messages.

  5. Make sure the Data Index properties are set in the -managed-props ConfigMap of the workflow as shown in the following configuration:

    kogito.data-index.health-enabled = true
    kogito.data-index.url = http://sonataflow-platform-data-index-service.<your_namespace>
    ...
    mp.messaging.outgoing.kogito-processdefinitions-events.url = http://sonataflow-platform-data-index-service.<your_namespace>/definitions
    mp.messaging.outgoing.kogito-processinstances-events.url = http://sonataflow-platform-data-index-service.<your_namespace>/processes
    Copy to Clipboard Toggle word wrap
    Note

    The -managed-props ConfigMap is located in the same namespace as the workflow and is generated by the Openshift Serverless Logic (OSL) Operator.

    These properties, along with similar settings for the Job Services, indicate that the (OSL) Operator successfully registered the Data Index service.

  6. Confirm that the workflow is registered in the Data Index database. Connect to the database used by the Data Index and run the following command from the PSQL instance pod:

    PGPASSWORD=<psql password> psql -h localhost -p 5432 -U < user> -d sonataflow
    Copy to Clipboard Toggle word wrap

    Replace <psql password> and <user> with your database credentials.

    Run the following SQL commands to query the registered workflow definitions:

    sonataflow=# SET search_path TO "sonataflow-platform-data-index-service";
    sonataflow=# select id, name from definitions;
    Copy to Clipboard Toggle word wrap

    You must see your workflows listed in the query results.

  7. Make sure you have enabled Data Index and Job Service in the SonataFlowPlatform custom resource (CR) as shown in the following configuration:

    services:
        dataIndex:
          enabled: true
        jobService:
          enabled: true
    Copy to Clipboard Toggle word wrap

    If you fail to enable the Data Index and the Job Services in the SonataFlowPlatform custom resource (CR), the Orchestrator plugin fails to fetch the available workflows.

    Note

    You can also manually edit the SonataFlowPlatform CR instance to trigger the re-creation of workflow-related manifests.

  8. Set the RBAC permissions correctly. For more information, see RBAC documentation.
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2026 Red Hat
맨 위로 이동