Skip to content

Elastic Agent fails to start using instructions for sysvinit systems #22360

@jsoriano

Description

@jsoriano

Elastic Agent fails to start on a sysvinit system when following the instructions for systems not based on systemd that can be found in the getting started docs:

# service elastic-agent start
Error: unknown command "test" for "elastic-agent"
Run 'elastic-agent --help' for usage.
unknown command "test" for "elastic-agent"
   ...fail!

Same happens when init.d script is called directly:

# /etc/init.d/elastic-agent start
Error: unknown command "test" for "elastic-agent"
Run 'elastic-agent --help' for usage.
unknown command "test" for "elastic-agent"
   ...fail!

The problem seems to be that this script calls the subcommand test config, that is not available in Agent:

TEST_ARGS="-e test config"

If this script is supposed to work, the test subcommand should be supported by Agent, or it shouldn't be called there. If only systemd is supported, the init script should be removed, and docs updated.

In principle all the Linux distributions supported by Agent, support systemd (see support matrix). Though SysV init can be used at least in Debian 9 and 10 (by installing the sysvinit-core package).

Reported in discuss: https://discuss.elastic.co/t/elastic-agent-init-script-calls-unavailable-test-command/253811

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions