Elastic Agent init script calls unavailable test command

Elastic Agent service is unable to start via init script due to call of unavailable "test" command.
Environment: Ubuntu 14.04 + Agent 7.9.3

Steps to reproduce:

curl -L -O https://artifacts.elastic.co/downloads/beats/elastic-agent/elastic-agent-7.9.3-amd64.deb
sudo dpkg -i elastic-agent-7.9.3-amd64.deb
elastic-agent enroll https://DEPLOYMENT_ID.eu-west-1.aws.found.io:443 ENROLL_TOKEN
update-rc.d elastic-agent defaults 95 10
service elastic-agent start


root@node1:~# service elastic-agent start
Error: unknown command "test" for "elastic-agent"
Run 'elastic-agent --help' for usage.
unknown command "test" for "elastic-agent"

I suppose the issue is that init script in agent .deb package calls test instead of inspect method.

line 21 in elastic-agent-7.9.3-amd64.deb -> data.tar.gz -> etc/init.d/elastic-agent

Hey @SergeyD, welcome to discuss :slight_smile:

Elastic Agent is not supported in Ubuntu 14.04 as you can see in the support matrix https://www.elastic.co/support/matrix#matrix_os

But, I think this shouldn't fail like this. If this is not supposed to work, the init.d script shouldn't be included. I have created an issue for that: https://github.com/elastic/beats/issues/22360

Thanks for reporting!

As workaround, you can remove the body of the do_test function in /etc/init.d/elastic-agent.

Hi Jamie,

Thanks you for the update!


This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.