Skip to content

Errors in CI build running docker command (fork/exec errors) #2537

@mrodm

Description

@mrodm

There are some steps in CI builds in the integrations repository that fail related to an error trying to execute a docker command.
Mainly related to unable to determine Docker compose version in the context of fetching the logs after running the tests.

Examples of these errors:

Error: error running package system tests: could not complete test run: dump failed: can't dump Elastic stack logs: can't fetch service logs (service: elasticsearch): could not create docker compose project: unable to determine Docker Compose version: running Docker Compose version command failed: failed to start command with pseudo-tty: fork/exec /usr/bin/docker: operation not permitted

Error: error running package system tests: could not complete test run: dump failed: can't dump Elastic stack logs: can't copy internal logs (service: fleet-server): could not create docker compose project: unable to determine Docker Compose version: running Docker Compose version command failed: failed to start command with pseudo-tty: fork/exec /usr/bin/docker: operation not permitted

Some Buildkite builds where this error is raised in the last days:

This error is not raised in elastic-package CI builds.

This is related to the usage of PTY in docker compose commands. Related PRs:

For now this dependency is set to be ignored for this current minor version:

Related also to: creack/pty#196

Tried to repeat the execution of the failed command in case of that kind of errors in #2534, but the error keeps being raised. The difference is that in the second iteration the message changes from operation not permitted to bad file descriptor (Buildkite build):

2025/04/11 10:32:46 DEBUG Dump stack logs for elastic-agent
2025/04/11 10:32:47 DEBUG running command: /usr/bin/docker compose version --short
2025/04/11 10:32:47 DEBUG Determined Docker Compose version: 2.24.1
2025/04/11 10:32:47 DEBUG running command: /usr/bin/docker compose -f /opt/buildkite-agent/.elastic-package/profiles/default/stack/docker-compose.yml --progress plain -p elastic-package-stack logs elastic-agent
2025/04/11 10:32:47 DEBUG Repeating docker command (failure fork/exec): /usr/bin/docker compose version --short (Error: fork/exec /usr/bin/docker: operation not permitted)
2025/04/11 10:32:48 DEBUG Repeating docker command (failure fork/exec): /usr/bin/docker compose version --short (Error: fork/exec /usr/bin/docker: bad file descriptor)
2025/04/11 10:32:49 DEBUG Repeating docker command (failure fork/exec): /usr/bin/docker compose version --short (Error: fork/exec /usr/bin/docker: bad file descriptor)
2025/04/11 10:32:50 DEBUG Repeating docker command (failure fork/exec): /usr/bin/docker compose version --short (Error: fork/exec /usr/bin/docker: bad file descriptor)
2025/04/11 10:32:51 DEBUG Repeating docker command (failure fork/exec): /usr/bin/docker compose version --short (Error: fork/exec /usr/bin/docker: bad file descriptor)
2025/04/11 10:32:52 DEBUG Uninstalling package...
2025/04/11 10:32:52 DEBUG GET https://127.0.0.1:5601/api/fleet/epm/packages/windows
2025/04/11 10:32:52 DEBUG DELETE https://127.0.0.1:5601/api/fleet/epm/packages/windows/2.5.2
Error: error running package system tests: could not complete test run: dump failed: can't dump Elastic stack logs: can't copy internal logs (service: elastic-agent): could not create docker compose project: unable to determine Docker Compose version: running Docker Compose version command failed: failed to start command with pseudo-tty: fork/exec /usr/bin/docker: bad file descriptor

Metadata

Metadata

Assignees

No one assigned

    Labels

    Team:EcosystemLabel for the Packages Ecosystem team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions