# Job for opensearch.service failed because a timeout was exceeded

**URL:** <https://forum.opensearch.org/t/job-for-opensearch-service-failed-because-a-timeout-was-exceeded/18102>\
**Category:** OpenSearch\
**Tags:** troubleshoot\
**Created:** [February 27, 2024, 10:15am UTC](https://forum.opensearch.org/t/job-for-opensearch-service-failed-because-a-timeout-was-exceeded/18102 "2024-02-27T10:15:06Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![KamiKaramazov](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/kamikaramazov/32/7093_2.png) [@KamiKaramazov](https://forum.opensearch.org/u/KamiKaramazov)\
**Post date:** [February 27, 2024, 10:15am UTC](https://forum.opensearch.org/t/job-for-opensearch-service-failed-because-a-timeout-was-exceeded/18102/1 "2024-02-27T10:15:06Z")

</div>

I tried to try to give more permissions to read and write for the following file /var/log/opensearch/opensearch.log but every time I get the same error.

```auto
$ sudo systemctl daemon-reload
$ sudo systemctl enable opensearch.service
Synchronizing state of opensearch.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable opensearch
$ sudo systemctl start opensearch
Job for opensearch.service failed because a timeout was exceeded.
See "systemctl status opensearch.service" and "journalctl -xeu opensearch.service" for details.
$ sudo systemctl status opensearch.service
× opensearch.service - OpenSearch
     Loaded: loaded (/lib/systemd/system/opensearch.service; enabled; vendor preset: enabled)
     Active: failed (Result: timeout) since Tue 2024-02-27 09:45:19 UTC; 8min ago
       Docs: https://opensearch.org/
    Process: 185867 ExecStart=/usr/share/opensearch/bin/systemd-entrypoint -p ${PID_DIR}/opensearch.pid --quiet (code=ex>
   Main PID: 185867 (code=exited, status=143)
        CPU: 43.135s

Feb 27 09:44:20 graylog systemd-entrypoint[185867]: at org.opensearch.cli.EnvironmentAwareCommand.execute(Enviro>
Feb 27 09:44:20 graylog systemd-entrypoint[185867]: at org.opensearch.cli.Command.mainWithoutErrorHandling(Comma>
Feb 27 09:44:20 graylog systemd-entrypoint[185867]: at org.opensearch.cli.Command.main(Command.java:101)
Feb 27 09:44:20 graylog systemd-entrypoint[185867]: at org.opensearch.bootstrap.OpenSearch.main(OpenSearch.java:>
Feb 27 09:44:20 graylog systemd-entrypoint[185867]: at org.opensearch.bootstrap.OpenSearch.main(OpenSearch.java:>
Feb 27 09:44:20 graylog systemd-entrypoint[185867]: For complete error details, refer to the log at /var/log/opensearch/>
Feb 27 09:45:18 graylog systemd[1]: opensearch.service: start operation timed out. Terminating.
Feb 27 09:45:19 graylog systemd[1]: opensearch.service: Failed with result 'timeout'.
Feb 27 09:45:19 graylog systemd[1]: Failed to start OpenSearch.
Feb 27 09:45:19 graylog systemd[1]: opensearch.service: Consumed 43.135s CPU time.
lines 1-18/18 (END)

```

---

<div class="post-metadata">

**Author:** ![Gsmitt](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/gsmitt/32/1718_2.png) [@Gsmitt](https://forum.opensearch.org/u/Gsmitt)\
**Post date:** [February 28, 2024, 5:42am UTC](https://forum.opensearch.org/t/job-for-opensearch-service-failed-because-a-timeout-was-exceeded/18102/2 "2024-02-28T05:42:53Z")

</div>

Hey @KamiKaramazov

What does `journalctl -xeu opensearch.service ` show?

---

<div class="post-metadata">

**Author:** ![KamiKaramazov](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/kamikaramazov/32/7093_2.png) [@KamiKaramazov](https://forum.opensearch.org/u/KamiKaramazov)\
**Post date:** [February 28, 2024, 7:58am UTC](https://forum.opensearch.org/t/job-for-opensearch-service-failed-because-a-timeout-was-exceeded/18102/3 "2024-02-28T07:58:06Z")

</div>

> [@KamiKaramazov](#):
>
> `journalctl -xeu opensearch.service`

```auto
$ journalctl -xeu opensearch.service
Feb 28 07:55:45 graylog systemd-entrypoint[371003]: at org.opensearch.bootstrap.OpenSearch.init(OpenSearch.java:>
Feb 28 07:55:45 graylog systemd-entrypoint[371003]: at org.opensearch.bootstrap.OpenSearch.execute(OpenSearch.ja>
Feb 28 07:55:45 graylog systemd-entrypoint[371003]: at org.opensearch.cli.EnvironmentAwareCommand.execute(Enviro>
Feb 28 07:55:45 graylog systemd-entrypoint[371003]: at org.opensearch.cli.Command.mainWithoutErrorHandling(Comma>
Feb 28 07:55:45 graylog systemd-entrypoint[371003]: at org.opensearch.cli.Command.main(Command.java:101)
Feb 28 07:55:45 graylog systemd-entrypoint[371003]: at org.opensearch.bootstrap.OpenSearch.main(OpenSearch.java:>
Feb 28 07:55:45 graylog systemd-entrypoint[371003]: at org.opensearch.bootstrap.OpenSearch.main(OpenSearch.java:>
Feb 28 07:55:45 graylog systemd-entrypoint[371003]: For complete error details, refer to the log at /var/log/opensearch/>
Feb 28 07:56:44 graylog systemd[1]: opensearch.service: start operation timed out. Terminating.
Feb 28 07:56:45 graylog systemd[1]: opensearch.service: Failed with result 'timeout'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ The unit opensearch.service has entered the 'failed' state with result 'timeout'.
Feb 28 07:56:45 graylog systemd[1]: Failed to start OpenSearch.
░░ Subject: A start job for unit opensearch.service has failed
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ A start job for unit opensearch.service has finished with a failure.
░░
░░ The job identifier is 1018759 and the job result is failed.
Feb 28 07:56:45 graylog systemd[1]: opensearch.service: Consumed 47.640s CPU time.
░░ Subject: Resources consumed by unit runtime
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ The unit opensearch.service completed and consumed the indicated resources.

```

---

<div class="post-metadata">

**Author:** ![Gsmitt](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/gsmitt/32/1718_2.png) [@Gsmitt](https://forum.opensearch.org/u/Gsmitt)\
**Post date:** [February 28, 2024, 9:57pm UTC](https://forum.opensearch.org/t/job-for-opensearch-service-failed-because-a-timeout-was-exceeded/18102/4 "2024-02-28T21:57:13Z")

</div>

You may need to scroll up on journalctl. Looks like the tail end of the log. If you could show any configurations that would help. How did you install opensearch?

---

<div class="post-metadata">

**Author:** ![KamiKaramazov](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/kamikaramazov/32/7093_2.png) [@KamiKaramazov](https://forum.opensearch.org/u/KamiKaramazov)\
**Post date:** [February 29, 2024, 8:09am UTC](https://forum.opensearch.org/t/job-for-opensearch-service-failed-because-a-timeout-was-exceeded/18102/5 "2024-02-29T08:09:51Z")

</div>

Those are the command I used to install opensearch:

```auto
wget --inet4-only https://artifacts.opensearch.org/releases/bundle/opensearch/2.5.0/opensearch-2.5.0-linux-x64.deb

sudo dpkg -i opensearch-2.5.0-linux-x64.deb

sudo nano /etc/opensearch/opensearch.yml

action.auto_create_index: false
plugins.security.disable: true

sudo systemctl daemon-reload
sudo systemctl enable opensearch.service
sudo systemctl start opensearch
sudo systemctl status opensearch

```

Also I followed this video : [https://youtu.be/O83aKtv1ZJI?t=388](https://youtu.be/O83aKtv1ZJI?t=388)

---

<div class="post-metadata">

**Author:** ![pablo](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/pablo/32/10363_2.png) [@pablo](https://forum.opensearch.org/u/pablo)\
**Post date:** [February 29, 2024, 12:44pm UTC](https://forum.opensearch.org/t/job-for-opensearch-service-failed-because-a-timeout-was-exceeded/18102/6 "2024-02-29T12:44:17Z")

</div>

> [@KamiKaramazov](#):
>
> `plugins.security.disable: true`

It should be

```auto
plugins.security.disabled: true

```

---

<div class="post-metadata">

**Author:** ![KamiKaramazov](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/kamikaramazov/32/7093_2.png) [@KamiKaramazov](https://forum.opensearch.org/u/KamiKaramazov)\
**Post date:** [March 1, 2024, 9:16pm UTC](https://forum.opensearch.org/t/job-for-opensearch-service-failed-because-a-timeout-was-exceeded/18102/7 "2024-03-01T21:16:03Z")

</div>

Thanks for help! Following your solution, it got fixed. I really don’t understand how I missed something like that. From now on, I’ll pay attention to everything I write 😄
