elastic / connectors

Source code for all Elastic connectors, developed by the Search team at Elastic, and home of our Python connector development framework
https://www.elastic.co/guide/en/enterprise-search/master/index.html
Other
75 stars 128 forks source link

Connectors Service is unable to start on Windows #1159

Open artem-shelkovnikov opened 1 year ago

artem-shelkovnikov commented 1 year ago

Bug Description

Due to our signal handling, connector service is unable to start on Windows without usage of Unix Subsystem. It happens because our signal handling (Ctrl+C and killing with kill command) is unix-specific.

We need to add support for windows-specific signals to the framework.

To Reproduce

Steps to reproduce the behavior:

  1. Have a Windows machine
  2. Pull repo and attempt to run it
  3. See error

Expected behavior

Service just runs

Screenshots

image

DianaJourdan commented 1 year ago

@artem-shelkovnikov do you already have an idea of the impact? Is it just a matter of adding some conditions and OS specific signals? If there is a simple way to fix it, I would suggest to just do it. If now, we may want to remove Windows from the support matrix and work on it in the next release

jmb2154 commented 1 year ago

Relevant discussion here: https://stackoverflow.com/questions/45987985/asyncio-loops-add-signal-handler-in-windows/45991505#45991505

artem-shelkovnikov commented 1 year ago

@jmb2154 what's the use-case for you for running connectors on Windows?

We normally recommend running them from Docker on Windows.

jmb2154 commented 1 year ago

@artem-shelkovnikov Docker only runs on Windows under 3 conditions:

  1. It is version >= 10
  2. HyperV/Containerization is enabled.
  3. Need a Docker license. These are big hurdles for enterprise customers. In my customer's particular case, they are running Windows Server 2016, which is very common on enterprise customers.
artem-shelkovnikov commented 1 year ago

@jmb2154 I see.

Also a question - do these enterprise customers work with only Windows servers? Spinning a small unix machine should be relatively easy, but I could see people on Microsoft. stack having only Windows machines in their data centers.

jmb2154 commented 1 year ago

@artem-shelkovnikov They only have Windows servers.