# Elastic Agent init script calls unavailable test command

**URL:** <https://discuss.elastic.co/t/elastic-agent-init-script-calls-unavailable-test-command/253811>\
**Category:** Beats\
**Tags:** filebeat, elastic-agent\
**Created:** [October 30, 2020, 12:00pm UTC](https://discuss.elastic.co/t/elastic-agent-init-script-calls-unavailable-test-command/253811 "2020-10-30T12:00:30Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![SergeyD](https://avatars.discourse-cdn.com/v4/letter/s/2bfe46/32.png) [@SergeyD](https://discuss.elastic.co/u/SergeyD)\
**Post date:** [October 30, 2020, 12:00pm UTC](https://discuss.elastic.co/t/elastic-agent-init-script-calls-unavailable-test-command/253811/1 "2020-10-30T12:00:30Z")

</div>

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

```

Output:

```
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"
   ...fail!

```

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`

---

<div class="post-metadata">

**Author:** ![jsoriano](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsoriano/32/27920_2.png) [@jsoriano](https://discuss.elastic.co/u/jsoriano)\
**Post date:** [November 2, 2020, 7:10pm UTC](https://discuss.elastic.co/t/elastic-agent-init-script-calls-unavailable-test-command/253811/2 "2020-11-02T19:10:16Z")

</div>

Hey @SergeyD, welcome to discuss 🙂

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](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](https://github.com/elastic/beats/issues/22360)

Thanks for reporting!

---

<div class="post-metadata">

**Author:** ![jsoriano](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsoriano/32/27920_2.png) [@jsoriano](https://discuss.elastic.co/u/jsoriano)\
**Post date:** [November 2, 2020, 7:16pm UTC](https://discuss.elastic.co/t/elastic-agent-init-script-calls-unavailable-test-command/253811/3 "2020-11-02T19:16:55Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![SergeyD](https://avatars.discourse-cdn.com/v4/letter/s/2bfe46/32.png) [@SergeyD](https://discuss.elastic.co/u/SergeyD)\
**Post date:** [November 4, 2020, 6:34am UTC](https://discuss.elastic.co/t/elastic-agent-init-script-calls-unavailable-test-command/253811/4 "2020-11-04T06:34:52Z")

</div>

Hi Jamie,

Thanks you for the update!

Regards,  
Sergey,

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 2, 2020, 8:34am UTC](https://discuss.elastic.co/t/elastic-agent-init-script-calls-unavailable-test-command/253811/5 "2020-12-02T08:34:54Z")

</div>

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