enterprise_gateway icon indicating copy to clipboard operation
enterprise_gateway copied to clipboard

Win Support for LocalProcessProxy

Open HighKeys opened this issue 1 year ago • 1 comments

Hi,

As discussed in issue #1394 , I am submitting this Pull Request.

In the meantime, I managed to correctly link the win32_interrupt_event, resulting in a working patch. This implementation has been tested successfully on Windows Server 2019 and Windows 11.

Key Changes:

  1. Added the required environment variables in enterprise_gateway/services/kernels/handlers.py to provide users with an out-of-the-box experience.
  2. Linked the interrupt event for Windows in the LocalProcessProxy class.
    • This could potentially be refactored into the base class in the future. However, for now, I have implemented it in LocalProcessProxy, as I was only able to test local processes. I might be able to test RemoteProcessProxy soon.

Please let me know your thoughts on these changes or any adjustments you'd like to see.

Edit:

I initially made these changes to the PIP version of JEG and migrated them to the actual Git version, as I was not able to create an environment that runs the current Git version.

HighKeys avatar Nov 28 '24 14:11 HighKeys

I have encountered an issue with terminating the Kernel. While restarting the Kernel works fine, attempting to kill the Kernel results in the following error:

[I 241130 12:07:32 web:2271] 204 DELETE /api/kernels/84a3049b-0ccb-4bb6-9d80-03cccf4c8f4d (10.231.46.69) 1642.45ms [E 241130 12:07:32 base_events:1785] Exception in callback AddThreadSelectorEventLoop._handle_select([1820], []) handle: <Handle AddThreadSelectorEventLoop._handle_select([1820], [])> Traceback (most recent call last): File "C:\Program Files\Python311\Lib\asyncio\events.py", line 84, in _run self._context.run(self._callback, *self._args) File "C:\Program Files\Python311\Lib\site-packages\tornado\platform\asyncio.py", line 647, in _handle_select self._handle_event(r, self._readers) File "C:\Program Files\Python311\Lib\site-packages\tornado\platform\asyncio.py", line 661, in _handle_event callback() File "C:\Program Files\Python311\Lib\site-packages\tornado\platform\asyncio.py", line 206, in _handle_events handler_func(fileobj, events) File "C:\Program Files\Python311\Lib\site-packages\zmq\eventloop\zmqstream.py", line 571, in _handle_events zmq_events = self.socket.EVENTS ^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Python311\Lib\site-packages\zmq\sugar\attrsettr.py", line 55, in __getattr__ return self._get_attr_opt(upper_key, opt) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Python311\Lib\site-packages\zmq\sugar\attrsettr.py", line 67, in _get_attr_opt return self.get(opt) ^^^^^^^^^^^^^ File "zmq\backend\cython\socket.pyx", line 482, in zmq.backend.cython.socket.Socket.get File "zmq\backend\cython\socket.pyx", line 138, in zmq.backend.cython.socket._check_closed zmq.error.ZMQError: Unknown error

The Kernel gets killed, but after that I'm not able to create a new one.

I am unsure where to start with resolving this issue and would appreciate any guidance or direction on how to proceed.

Thank you for your assistance.

HighKeys avatar Nov 30 '24 11:11 HighKeys