# Logstash unrecognized service

**URL:** <https://discuss.elastic.co/t/logstash-unrecognized-service/119839>\
**Category:** Logstash\
**Created:** [February 14, 2018, 4:05pm UTC](https://discuss.elastic.co/t/logstash-unrecognized-service/119839 "2018-02-14T16:05:46Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![motts](https://avatars.discourse-cdn.com/v4/letter/m/839c29/32.png) [@motts](https://discuss.elastic.co/u/motts)\
**Post date:** [February 14, 2018, 4:05pm UTC](https://discuss.elastic.co/t/logstash-unrecognized-service/119839/1 "2018-02-14T16:05:46Z")

</div>

Hello there,

I am working on upgrading Elastic from 2.4 to 5.6. Elasticsearch and Kibana seem to be fine, but when I installed LogStash, I can no longer seem to start logstash.

When I try 'service logstash status' I get a return of 'logstash: unrecognized service'. I am not sure If I did something wrong here. This is on a CentOS 6.9 virtual machine.

I have checked the startup.options file and it lists the service name as 'logstash'

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![motts](https://avatars.discourse-cdn.com/v4/letter/m/839c29/32.png) [@motts](https://discuss.elastic.co/u/motts)\
**Post date:** [February 14, 2018, 4:08pm UTC](https://discuss.elastic.co/t/logstash-unrecognized-service/119839/2 "2018-02-14T16:08:19Z")

</div>

I also check 'service --status-all' and I do not see a logstash service running either. Logs are being sent though. I am not sure if there was a change in how it runs in 5.6, but I couldn't seem to find anything related to that. I did find an article on here with someone having a similar issue, but they did not reply after the initial opening, so it closed out.

---

<div class="post-metadata">

**Author:** ![motts](https://avatars.discourse-cdn.com/v4/letter/m/839c29/32.png) [@motts](https://discuss.elastic.co/u/motts)\
**Post date:** [February 14, 2018, 5:47pm UTC](https://discuss.elastic.co/t/logstash-unrecognized-service/119839/3 "2018-02-14T17:47:03Z")

</div>

I was able to find how to do a config test in 5.6. It is slightly different from 2.4, but its output says

```
/opt/logstash/bin/logstash: No such file or directory

```

Still looking into that part

---

<div class="post-metadata">

**Author:** ![motts](https://avatars.discourse-cdn.com/v4/letter/m/839c29/32.png) [@motts](https://discuss.elastic.co/u/motts)\
**Post date:** [February 14, 2018, 7:44pm UTC](https://discuss.elastic.co/t/logstash-unrecognized-service/119839/4 "2018-02-14T19:44:20Z")

</div>

Ok so I fixed that issue by setting the config file to point at /usr/share/logstash/bin/logstash instead, but now I am stuck again. I get this error:

`WARNING: Could not find logstash.yml which is typically located in $LS_HOME/config or /etc/logstash. You can specify the path using --path.settings. Continuing using the defaults`

but my startup.options specify /etc/logstash for the yml file

```
# Set a home directory
LS_HOME=/etc/logstash

# logstash settings directory, the path which contains logstash.yml
LS_SETTINGS_DIR=/etc/logstash

```

and here is my yml file in /etc/logstash

```
[root@localhost logstash]# ls -la /etc/logstash/
total 32
drwxr-xr-x 3 root root 4096 Feb 14 14:43 .
drwxr-xr-x. 89 root root 4096 Feb 14 12:32 ..
drwxrwxr-x 2 root root 4096 Feb 14 14:14 conf.d
-rw-r--r-- 1 root root 1736 Feb 14 12:34 jvm.options
-rw-r--r-- 1 root root 1334 Jan 25 17:40 log4j2.properties
-rw-r--r-- 1 root root 5806 Feb 14 12:42 logstash.yml
-rw-r--r-- 1 root root 1653 Feb 14 14:05 startup.options

```

There must be something else I am missing somewhere.

---

<div class="post-metadata">

**Author:** ![motts](https://avatars.discourse-cdn.com/v4/letter/m/839c29/32.png) [@motts](https://discuss.elastic.co/u/motts)\
**Post date:** [February 14, 2018, 9:11pm UTC](https://discuss.elastic.co/t/logstash-unrecognized-service/119839/5 "2018-02-14T21:11:48Z")

</div>

Ah so I guess that is a common thing to see, but I cannot seem to get logstash to start. when I try

`/etc/init.d/logstash start logstash`

I get an error saying `configuration error. Not restart. Re-run with config test parameter for details.`

The only errors that show are

```
[root@localhost ~]# /etc/init.d/logstash.rpmsave configtest logstash
WARNING: Could not find logstash.yml which is typically located in $LS_HOME/config or /etc/logstash. You can specify the path using --path.settings. Continuing using the defaults
ERROR: Unrecognised option '--configtest'

```

I am not sure where the --configtest error is coming from as I did not modify that at all.

---

<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:** [March 14, 2018, 9:12pm UTC](https://discuss.elastic.co/t/logstash-unrecognized-service/119839/6 "2018-03-14T21:12:45Z")

</div>

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