Logstash command not found - kibana

After installation I make config file in /etc/logstash/logstash.conf and try to run logstash command.
When I run following command
root#ip:~# logstash --version
always showing error:
showing command not found.

In this case do following thing:
Search the location of logstash using following command
root#whereis:~# whereis logstash
output:
logstash: /etc/logstash /usr/share/logstash
then goto
root#whereis:~# cd /usr/share/logstash
root#ip:/usr/share/logstash# cd bin
root#ip:/usr/share/logstash/bin#
Run command from here like:
root#ip:/usr/share/logstash/bin# logstash --version
If you still not able to run and getting error command not found then the current directory isn't listed in your path. If you want to run a program in the current directory you can use like ./program_name:
root#ip:~# ./logstash --version

Related

Jq command not found in SUSE [duplicate]

I am trying to read a yaml file in gitlab CI. I installed jq==1.0.2 and yq==2.10.1 using pip in my CI job and I use python:3.7 image. When I tried to read the yaml file, it has the error
yq: Error starting jq: FileNotFoundError: [Errno 2] No such file or directory: 'jq': 'jq'. Is jq installed and available on PATH?
My yaml file is not call jq and I do have this yaml file in my commit. I am able to do which yq, when I do which jq, the CI job failed. Anyone has any idea?
Your jq installation is not quite correct. Your version information jq==1.0.2 indicates that you have installed the python package jq - https://pypi.org/project/jq/ which is not the same as the executable binary jq that gets installed. You need the executable to be installed, before invoking the yq tool.
Since yq looks in PATH for availability of the jq binary, but doesn't find it, you get the runtime error indicating the absence. The fix will be setup your CI to download the jq binary from one of the steps mentioned in https://stedolan.github.io/jq/download/
Run sudo apt-get install jq not pip3 install jq.

How to install and use mirthSync on MacOS?

Setup
I'm following the installation directions in the mirthSync readme, which is to clone the repo. The next indication of usage that I can see is in the Examples section, which via CLI is to "pull Mirth Connect code from a Mirth Connect instance":
java -jar mirthsync.jar -s https://localhost:8443/api -u admin -p admin pull -t /home/user/
I'm assuming that after cloning the repo, one should cd into that directory and then run the java -jar... command with all the appropriate flag values (server, username, password, etc).
Error
After running the CLI command, I get this error:
Error: Unable to access jarfile mirthsync.jar
Question
Where is this mirthsync.jar file supposed to come from? Is there something I need to do in order to generate the mirthsync.jar file?
Generate it via lein uberjar (which creates target/uberjar/*-standalone.jar) or download it from a release.

Install nginx dynamic module using docker compose

Usually in nginx to compile a third part module you should use this command:
./configure --add--module=path/to/your/new/module/directory
Then using:
make
And finally:
make install
But using docker I can't go into nginx path and run these commands. How could I add "configure" command to my docker-compose.yml file?
EDIT:
I've tried to create a simple Dockerfile like this:
FROM nginx
RUN ./configure --add-module=./module/
make && \
make install
And including it into my docker-compose.yml.
And it gave me this error:
/bin/sh: 1: ./configure: not found The command '/bin/sh -c ./configure --add-module=./module/' returned a non-zero code: 127
I've also tried to use "configure" instead of "./configure", but same result. I don't know how to set configure command.
I am not sure I understand the question correctly, but I think configure, make and make install should be done as part of docker build using the RUN directive (in your Dockerfile). docker-compose will simply run the resultant image (probably in-tandem with other docker images).
Sample Dockerfile (not verified, may contain errors!):
FROM centos:latest
COPY nginx /root/nginx
WORKDIR /root/nginx
RUN ./configure && make && make install

php-cs-fixer got broken for linux users after fixing the issue 6 for windows users

I use Linux Ubuntu 16.04. I have well installed php-cs-fixer for atom 1.9.8.
$ php-cs-fixer
PHP CS Fixer version 1.11.6 by Fabien Potencier
Usage:
command [options] [arguments]
Options:
-h, --help Display this help message
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
-n, --no-interaction Do not ask any interactive question
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Available commands:
fix Fixes a directory or a file
help Displays help for a command
list Lists commands
readme Generates the README content, based on the fix command help
self-update Update php-cs-fixer.phar to the latest version.
selfupdate Update php-cs-fixer.phar to the latest version.
The problem comes with config of php-cs-fixer with atom. In fact, package requires:
a PHP Executable path (which is by defaut php) (for linux user it must be empty which is not possible with actual version of the package) (see isse #6 )
a PHP-CS fixer Executable path (which is simply for linux user php-cs-fixer (without the use of PHAR file))
Consequently, when I run php-cs-fixer from atom I get this error: Could not open input file: php-cs-fixer.
I can generate this error message with this console command:
php php-cs-fixer fix Class.php
Could not open input file: php-cs-fixer
So, can you make PHP Executable path optional (not compulsory) for that package of atom???
thanks,
Update on this issue:
I managed to download php-cs-fixer.phar from https://github.com/FriendsOfPHP/PHP-CS-Fixer and I put it in the folder ~/.composer/ so that:
a PHP Executable path is php
a PHP-CS fixer Executable path is: ~/.composer/php-cs-composer.phar
But now I am getting this error: Could not open input file: ~/.composer/php-cs-fixer.phar
So what's wrong??
For you information, running the console php ~/.composer/php-cs-composer.phar Class.php command is successful.
The solution is found on github:
a PHP Executable path is php
a PHP-CS fixer Executable path is: /home/username/.composer/php-cs-composer.phar and don't use the ~ in atom.

/usr/local/bin/node: not found

I kept getting the error above, when I do which node I got the following error:
/usr/bin/node
so in my .bash_profile, I've put in:
export PATH=/usr/bin:$PATH
but still the error doesn't go away
If you can not or do not want to change the program you are running. (you could just change the /usr/local/bin/node to /usr/bin/node in that program), an alternative solution is to create a link from your node installation to the path it is trying to load it from.
Run this as root:
ln -s /usr/bin/node /usr/local/bin/node
Where the first path parameter is the source, and second path parameter as destination
It is perfectly normal and it is not an error. When you run which, the result will be the location of the program if it is successfully installed.
you are trying to run node.js ?, in ubuntu 14.04 the node.js is installed at usr/bin/nodejs. So to run the programs you need use nodejs my_file.js instead of node node my_file.js like windows operation system.
you can confirm it using the command which as said above.

Resources