Data ingestion fails when run outside the pod

The data ingestion command fails when it is run from outside the pod.

Problem

When you attempt to run the data ingestion command from outside the pod, the command times out after some time and fails to ingest the entire data set. This issue is observed on smaller deployments (trial size clusters).

Symptoms

When you run the data ingestion command from outside the pod, the command fails with the write: broken pipe error:
2021-06-07 13:17:43,089 INFO com.ibm.itom.ea.events.tooling.utils.EventsApplication Events processed = 41000
E0607 06:17:45.963976 61347 v2.go:105] write tcp 9.46.198.223:47672->9.46.198.223:6443: write: broken pipe
error: timed out waiting for the condition

Cause

The ingestion command fails because of the write: broken pipe error.

Resolution

To resolve this issue, run the data ingestion command from within the pod by completing the following steps:
  1. Run the ingestion command:
    kubectl delete pod ingesthttp; kubectl run ingesthttp -i --restart=Never --env=RUNNING_IN_CONTAINER=true --image=$TOOL_VERSION --env=INPUT_FILE_NAME=stdin --env=LICENSE=accept --env=HTTP_USERNAME=$HTTP_USERNAME --env=HTTP_PASSWORD=$HTTP_PASSWORD --command sleep infinity
    The command times out, which is expected behavior. When the command times out, output similar to the following is displayed:
    kubectl delete pod trainer; kubectl run trainer -it --command=true --restart=Never --env=LICENSE=accept --env=RUNNING_IN_CONTAINER=true  --image=$TOOL_VERSION --command sleep infinity
    pod "trainer" deleted
    If you don't see a command prompt, try pressing enter.
    error: timed out waiting for the condition 
  2. Verify that the pod is running by running the command:
    oc get pods |grep ingesthttp
  3. Copy the data set into the pod by running the command:
    oc cp <dataset_name> ingesthttp:/tmp
    Where <dataset_name> is the name of your data set.
  4. Log in to the pod by running the command:
    oc exec -it ingesthttp /bin/bash
  5. Run the ingestion command from within the pod:
    cd bin ; cat /tmp/<dataset_name>| ./filetoingestionservice.sh evtmanager