Git Product home page Git Product logo

Comments (7)

elasticmachine avatar elasticmachine commented on July 22, 2024

Pinging @elastic/ingest-management (Team:Ingest Management)

from elastic-agent.

ph avatar ph commented on July 22, 2024

@michalpristas or @blakerouse you know more windows than me. Can you take a look?

from elastic-agent.

ThorbenJ avatar ThorbenJ commented on July 22, 2024

Please note if you don't have $ErrorActionPreference = "Stop" (PS equiv of Bash's set -e), then PS will treat the STDERR output as an error and display it, but it wont immediately kill elastic-agent.exe. Tested under PowerShell ISE.
Why not under PowerShell interactive? I am no PS expert, but reading up on this it seems, ISE, PS Remote, and I assume task scheduled instances wrap STDERR with System.Management.Automation.ErrorRecord.

from elastic-agent.

elasticmachine avatar elasticmachine commented on July 22, 2024

Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane)

from elastic-agent.

michalpristas avatar michalpristas commented on July 22, 2024

closing, even with the options set i was not able to repro
Win 11 64bit

from elastic-agent.

ThorbenJ avatar ThorbenJ commented on July 22, 2024

image

As I document you will not trip this issue in a normal powershell console. This error handling is only on by default in PS Remote, PS ISE and certain ways of scheduling PS scripts. Search for System.Management.Automation.ErrorRecord - If this error handling is enabled any line sent to STDERR becomes an ErrorRecord that needs to be handled. If not you get the NativeCommandError, and with $ErrorActionPreference = "Stop" the exe is stopped/killed.

 [System.Environment]::OSVersion.Version

Major  Minor  Build  Revision
-----  -----  -----  --------
10     0      19042  0       

from elastic-agent.

jlind23 avatar jlind23 commented on July 22, 2024

@michalpristas could you please take a look again.

from elastic-agent.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.