Logstash command not found

hi there, i want to deploy logstash in ubuntu server.
i follow this tutorial :

Installing Logstash | Logstash Reference [8.11] | Elastic

i start running logstash by using this comand :

sudo systemctl start logstash.service

and then i try to see the logstash status :

sudo systemctl status logstash.service

● logstash.service - logstash
Loaded: loaded (/etc/systemd/system/logstash.service; disabled; vendor preset: e
Active: active (running) since Thu 2017-01-19 04:44:35 UTC; 27s ago
Main PID: 10599 (java)
Tasks: 15
Memory: 369.6M
CPU: 21.081s
CGroup: /system.slice/logstash.service
└─10599 /usr/bin/java -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSIn

and then i want to create my first stash.
but when i want to execute my conf file.
l> ogstash -f first-pipeline.conf --config.test_and_exit

i will always get error like this

logstash command not found

my ubuntu version :

Distributor ID: Ubuntu
Description: Ubuntu 16.04.1 LTS
Release: 16.04
Codename: xenial

i install ELK on my osx environment, everything goes in right direction.
idk why this happen on ubunut. please help me.

thank you

1 Like

I suppose your Logstash binary is installed in /usr/share/logstash/bin which isn't in your PATH so you have to specify the full path to it in your command.

4 Likes

i tried this one several time magnusbaeck.

root@research02:/usr/share/logstash/bin# logstash --version
logstash: command not found

i tried this one several time magnusbaeck.

this is my command.

root@research02:/usr/share/logstash/bin# logstash --version
logstash: command not found

The current directory isn't listed in your path. If you want to run a program in the current directory you can use ./name-of-program to reference it.

Over and out.

2 Likes

thank you magnusbaeck.
thanks alot.

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