# RuntimeError: Error streaming stdin to pod

**URL:** <https://forum.ansible.com/t/runtimeerror-error-streaming-stdin-to-pod/38220>\
**Category:** AWX Project\
**Tags:** awx, kubernetes\
**Created:** [July 12, 2023, 4:09pm UTC](https://forum.ansible.com/t/runtimeerror-error-streaming-stdin-to-pod/38220 "2023-07-12T16:09:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Caleb\_Brewer\_Archery](https://avatars.discourse-cdn.com/v4/letter/c/b5a626/32.png) [@Caleb\_Brewer\_Archery](https://forum.ansible.com/u/Caleb_Brewer_Archery)\
**Post date:** [July 12, 2023, 4:09pm UTC](https://forum.ansible.com/t/runtimeerror-error-streaming-stdin-to-pod/38220/1 "2023-07-12T16:09:41Z")

</div>

When running a playbook, I get this error…

RuntimeError: Error streaming stdin to pod awx/automation-job-96-p897n. Error: error sending request: Post “[https://10.0.0.1:443/api/v1/namespaces/awx/pods/automation-job-96-p897n/attach?container=worker&stdin=true](https://10.0.0.1:443/api/v1/namespaces/awx/pods/automation-job-96-p897n/attach?container=worker&stdin=true)”: read tcp 10.231.80.16:46144-\>10.0.0.1:443: read: connection timed out

- 10.231.80.16:46144 Is the IP of the task POD
- 10.0.0.1 is the K8S POD
- I have been able to test connectivity between the POD and the K8S server
- The automation-job-96-p897n is created and runs for the duration of the job  
**Contents of the playbook:**

---

<div class="post-metadata">

**Author:** ![AWX\_Project](https://avatars.discourse-cdn.com/v4/letter/a/eada6e/32.png) [@AWX\_Project](https://forum.ansible.com/u/AWX_Project)\
**Post date:** [July 14, 2023, 5:40pm UTC](https://forum.ansible.com/t/runtimeerror-error-streaming-stdin-to-pod/38220/2 "2023-07-14T17:40:42Z")

</div>

so did the job run successful or end in a failed / error state? In your awx-ee container logs do you see “retry” messages for this job? e.g.

Error streaming stdin to pod … Will retry 5 more times.

does this problem happen sporadically or every time?

what k8s cluster are you on (k3s, k3d, etc)

AWX Team

---

<div class="post-metadata">

**Author:** ![Caleb\_Brewer\_Archery](https://avatars.discourse-cdn.com/v4/letter/c/b5a626/32.png) [@Caleb\_Brewer\_Archery](https://forum.ansible.com/u/Caleb_Brewer_Archery)\
**Post date:** [July 14, 2023, 8:46pm UTC](https://forum.ansible.com/t/runtimeerror-error-streaming-stdin-to-pod/38220/3 "2023-07-14T20:46:18Z")

</div>

Thanks for your help.  
We are running AWX on Azure AKS.The job fails every time.

Here are the output logs from the job…

Traceback (most recent call last): File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/awx/main/tasks/receptor.py”, line 435, in \_run\_internal lines = resultfile.readlines() OSError: read() should have returned a bytes object, not ‘NoneType’ During handling of the above exception, another exception occurred: Traceback (most recent call last): File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/awx/main/tasks/jobs.py”, line 597, in run res = receptor\_job.run() File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/awx/main/tasks/receptor.py”, line 317, in run res = self.\_run\_internal(receptor\_ctl) File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/awx/main/tasks/receptor.py”, line 444, in \_run\_internal raise RuntimeError(detail) RuntimeError: Error streaming stdin to pod awx/automation-job-173-8rsrb. Error: error sending request: Post “[https://10.0.0.1:443/api/v1/namespaces/awx/pods/automation-job-173-8rsrb/attach?container=worker&stdin=true](https://10.0.0.1:443/api/v1/namespaces/awx/pods/automation-job-173-8rsrb/attach?container=worker&stdin=true)”: read tcp 10.231.80.47:44656-\>10.0.0.1:443: read: connection timed out

---

<div class="post-metadata">

**Author:** ![AWX\_Project](https://avatars.discourse-cdn.com/v4/letter/a/eada6e/32.png) [@AWX\_Project](https://forum.ansible.com/u/AWX_Project)\
**Post date:** [July 19, 2023, 6:43pm UTC](https://forum.ansible.com/t/runtimeerror-error-streaming-stdin-to-pod/38220/4 "2023-07-19T18:43:13Z")

</div>

At first glance this seems like a kubernetes level problem, not specifically AWX.

So the automation-job pods are staying up indefinitely, even after these stdin POST timeout errors?

does kubectl logs on that automation job pod show you stdout? do you see ansible events?

Also, as a side note, you may want to enabled RECEPTOR\_KUBE\_SUPPORT\_RECONNECT, see this PR [https://github.com/ansible/receptor/pull/683](https://github.com/ansible/receptor/pull/683) But I don’t think it is related to your current issue

AWX Team
