Skip to content

[Windows] Agent silently hangs forever if hook script doesn't close STDOUT #288

Closed as not planned
@moloch--

Description

@moloch--

On Windows I need the CodeDeploy Agent to simply start a plain .exe (non-service) process on the server for the ApplicationStart, but this does not seem to be possible. It seems to be related to how the Agent runs the deployment scripts, similar issues here.

However, the problem doesn't seem to have ever been fixed, and the only workarounds I can find are for Linux (the AWS documentation also only provides work around examples for Linux).

I have a script that invokes the server process in what should be a non-blocking way, it works fine when running the script from the command line:

start.bat

start C:\server.exe

Output:

Script at specified location: scripts/start.bat failed to close STDOUT

I've also tried these but they don't work:

cmd.exe /c "start C:\server.exe"
start C:\server.exe 2>NUL

What's really annoying is that the process gets created but the Agent still reports the deployment as a failure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Researching

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions