# Logstash could not be started because there is already another instance

**URL:** <https://discuss.elastic.co/t/logstash-could-not-be-started-because-there-is-already-another-instance/171306>\
**Category:** Logstash\
**Created:** [March 7, 2019, 12:52pm UTC](https://discuss.elastic.co/t/logstash-could-not-be-started-because-there-is-already-another-instance/171306 "2019-03-07T12:52:12Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![kharvey](https://avatars.discourse-cdn.com/v4/letter/k/d07c76/32.png) [@kharvey](https://discuss.elastic.co/u/kharvey)\
**Post date:** [March 8, 2019, 5:03pm UTC](https://discuss.elastic.co/t/logstash-could-not-be-started-because-there-is-already-another-instance/171306/5 "2019-03-08T17:03:18Z")

</div>

The error that you have is:

```auto
 Logstash could not be started because there is already another instance using the configured data directory.
```

That is because you already have logstash running in the background as a service. We verified this using the systemctl status logstash command.  
So if you want to run you command

```auto
sudo bin/logstash --path.settings /etc/logstash/ --path.data sensor39 -f /home/Data/syslog.conf
```

Then you will need to stop the already running logstash service. To stop the service you would run

```auto
systemctl stop logstash
```

That will stop the logstash service running in the background, which will allow you to run your logstash command.

I am assuming that you are just testing using the logstash command. Whenever you are done testing, you can just do

```auto
systemctl start logstash
```

To start the logstash service again.

You can only have 1 logstash running at a time pointing to the same data directory (/etc/logstash)

Also, if you are just testing, I would recommend adding this to your command

```auto
--config.reload.automatic
sudo bin/logstash --path.settings /etc/logstash/ --path.data sensor39 -f /home/Data/syslog.conf --config.reload.automatic
```

The reload.automatic will allow you to make live changes to your logstash configuration file without having to stop and start logstash to test.

I hope this helps.

---

_[View the full topic](https://discuss.elastic.co/t/logstash-could-not-be-started-because-there-is-already-another-instance/171306)._
