Skip to content

[Windows] Service startup failing on CI with otel dependencies linked #4976

@michalpristas

Description

@michalpristas

At the moment, Agent is unable to run in OTel mode on Windows — support for Windows was explicitly removed by adding build constraints as part of #4908. If we remove these constraints we see failures in CI like so:
failed to start service (Elastic Agent): The service did not respond to the start or control request in a timely fashion.

One of the reason may be late reaction to the control events from a service manager and invocation of service.ProcessWindowsControlEvents as described in #4971

Failures are present even if we move this to init function of alphabetically very early dependencies in main.
Timing here is also tricky, as dependencies get initialized before package linking them. so calling something in init does not mean it's being called first.

Event Log for elastic agent seems empty. Occasionally in linked draft above we see
24304 Jun 21 05:05 Error Elastic Agent 1 The description for Event ID '1' in Source 'Ela...
that could uncover some failures, but this is not present everywhere. But as i had this timeboxed i stopped here

https://techcommunity.microsoft.com/t5/iis-support-blog/the-description-for-event-id-1-from-source-getaccess-iis-runtime/ba-p/3744637

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions