Logstash command not found


(Guta Saputra) #1

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

https://www.elastic.co/guide/en/logstash/current/installing-logstash.html

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


(Magnus Bäck) #2

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.


(Guta Saputra) #3

i tried this one several time magnusbaeck.

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


(Guta Saputra) #4

i tried this one several time magnusbaeck.

this is my command.

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


(Magnus Bäck) #5

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.


(Guta Saputra) #6

thank you magnusbaeck.
thanks alot.


(system) #7

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