Highlighted
Contributor
Contributor

'OSError: [Errno 38] Function not implemented' for python command 'asyncio.get_event_loop ()'

Hi,

I do not know if this is a bug or such a feature of ESXi 6.5, but I decided to write on the forum. The bottom line is that on ESXi 6.5, if you run the following commands in python, we get an exception:

>>> import asyncio

>>> loop = asyncio.get_event_loop ()

Traceback (most recent call last):

  File "<stdin>", line 1, in <module>

  File "/build/mts/release/bora-8294253/bora/build/esx/release/vmvisor/sys-boot/lib64/python3.5/asyncio/events.py", line 671, in get_event_loop

  File "/build/mts/release/bora-8294253/bora/build/esx/release/vmvisor/sys-boot/lib64/python3.5/asyncio/events.py", line 580, in get_event_loop

  File "/build/mts/release/bora-8294253/bora/build/esx/release/vmvisor/sys-boot/lib64/python3.5/asyncio/events.py", line 598, in new_event_loop

  File "/build/mts/release/bora-8294253/bora/build/esx/release/vmvisor/sys-boot/lib64/python3.5/asyncio/unix_events.py", line 56, in __init__

  File "/build/mts/release/bora-8294253/bora/build/esx/release/vmvisor/sys-boot/lib64/python3.5/asyncio/selector_events.py", line 64, in __init__

  File "/build/mts/release/bora-8294253/bora/build/esx/release/vmvisor/sys-boot/lib64/python3.5/selectors.py", line 399, in __init__

OSError: [Errno 38] Function not implemented

Exception ignored in: <bound method BaseEventLoop .__ del__ of <_UnixSelectorEventLoop running = False closed = False debug = False >>

Traceback (most recent call last):

  File "/build/mts/release/bora-8294253/bora/build/esx/release/vmvisor/sys-boot/lib64/python3.5/asyncio/base_events.py", line 510, in __del__

  File "/build/mts/release/bora-8294253/bora/build/esx/release/vmvisor/sys-boot/lib64/python3.5/asyncio/unix_events.py", line 63, in close

  File "/build/mts/release/bora-8294253/bora/build/esx/release/vmvisor/sys-boot/lib64/python3.5/asyncio/selector_events.py", line 110, in close

  File "/build/mts/release/bora-8294253/bora/build/esx/release/vmvisor/sys-boot/lib64/python3.5/asyncio/selector_events.py", line 120, in _close_self_pipe

AttributeError: '_UnixSelectorEventLoop' object has no attribute '_ssock'

This works for ESXi 6.7 and ESXi 7.0

Command result of 'esxcli system version get':

   Product: VMware ESXi

   Version: 6.5.0

   Build: Releasebuild-8294253

   Update: 2

   Patch: 50

Thank you for attention,

Oleg.

0 Kudos
3 Replies
Highlighted
Contributor
Contributor

It turned out that on ESXi 6.7 (Releasebuild-8169922) and ESXi 7.0 (Releasebuild-15843807) there is a different kind of error:

>>> import asyncio

>>> loop = asyncio.get_event_loop()

>>> loop.run_forever()

Traceback (most recent call last):

  File "<stdin>", line 1, in <module>

  File "/build/mts/release/bora-15843807/bora/build/esx/release/vmvisor/sys-boot/lib64/python3.5/asyncio/base_events.py", line 421, in run_forever

  File "/build/mts/release/bora-15843807/bora/build/esx/release/vmvisor/sys-boot/lib64/python3.5/asyncio/base_events.py", line 1389, in _run_once

  File "/build/mts/release/bora-15843807/bora/build/esx/release/vmvisor/sys-boot/lib64/python3.5/selectors.py", line 445, in select

OSError: [Errno 22] Invalid argument

0 Kudos
Highlighted
VMware Employee
VMware Employee

Is this associated with the vSphere Automation SDK for Python?


Forum Usage Guidelines: https://communities.vmware.com/docs/DOC-12286
VMware Training & Certification blog: http://vmwaretraining.blogspot.com
0 Kudos
Highlighted
Contributor
Contributor

scott28tt​ no, this is part of a self-created python script that runs on the ESXi host.

0 Kudos