# Returning from Bug#77302.  Bad file descriptor

**URL:** <https://forum.ansible.com/t/returning-from-bug-77302-bad-file-descriptor/36462>\
**Category:** Ansible Project\
**Created:** [March 19, 2022, 8:58pm UTC](https://forum.ansible.com/t/returning-from-bug-77302-bad-file-descriptor/36462 "2022-03-19T20:58:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shifa\_Shaikh](https://avatars.discourse-cdn.com/v4/letter/s/b2d939/32.png) [@Shifa\_Shaikh](https://forum.ansible.com/u/Shifa_Shaikh)\
**Post date:** [March 19, 2022, 8:58pm UTC](https://forum.ansible.com/t/returning-from-bug-77302-bad-file-descriptor/36462/1 "2022-03-19T20:58:20Z")

</div>

Dear Team,

I’m returning fro BUG # [https://github.com/ansible/ansible/issues/77302](https://github.com/ansible/ansible/issues/77302)

The issue is specific to a specific version of platform. On different version the code works fine.

On RedHat linux 7.9

$ ansible --version

ansible [core 2.12.3]

config file = /etc/ansible/ansible.cfg

configured module search path = [‘/home/u1220753/.ansible/plugins/modules’, ‘/usr/share/ansible/plugins/modules’]

ansible python module location = /home/u1220753/.local/lib/python3.8/site-packages/ansible

ansible collection location = /home/u1220753/.ansible/collections:/usr/share/ansible/collections

executable location = /usr/local/bin/ansible

python version = 3.8.12 (default, Mar 19 2022, 02:24:23) [GCC 4.8.5 20150623 (Red Hat 4.8.5-44)]

jinja version = 3.0.3

libyaml = True

Running the below play gives `Bad File Descriptor` issue.

I wish to get the listen-port printed while keeping in mind that the position of listen-port element may change in the array.

---

<div class="post-metadata">

**Author:** ![felixfontein](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/felixfontein/32/7530_2.png) [@felixfontein](https://forum.ansible.com/u/felixfontein)\
**Post date:** [March 20, 2022, 3:52pm UTC](https://forum.ansible.com/t/returning-from-bug-77302-bad-file-descriptor/36462/2 "2022-03-20T15:52:27Z")

</div>

Hi,

if you look at the information you sent, you might notice that the task  
that has the error is called "create YML for server name with Listen  
port" (and it looks like it is a `shell` task), but you do not show  
that task.

Also when you would actually look at the output, you could see that you  
are trying to run

&nbsp;&nbsp;echo AdminServer\_httpport: 12400\>\>/web/aes/admin/playbooks/Migrator/wlsdatadump.yml

on the server. The error message `/bin/sh: 12400: Bad file descriptor`  
gives you a pretty good hint at what goes wrong: you do not have a  
space between 12400 and `\>\>`. Thus you are telling the shell that you  
want to redirect file descriptor 12400 to the file  
/web/aes/admin/playbooks/Migrator/wlsdatadump.yml.

Inserting a space should solve your problem.

Regards,  
Felix
