[root@localhost ~]# systemctl start logstash
Failed to start logstash.service: Unit not found.
Issue 1:
First problem: Failed to start logstash.service: Unit not found.
Solution idea.
Generate logstash.service file
[root@localhost ~]# sudo /usr/share/logstash/bin/system-install /etc/logstash/startup.options systemd
Check if the service can be opened normally
Issue 2:
The second problem: If you use this access could not find any executable java binary. Please install java in your PATH or set JAVA_HOME.
[root@localhost ~]# sudo /usr/share/logstash/bin/system-install /etc/logstash/startup.options systemd
Could not find any executable java binary. Please install java in your PATH or set JAVA_HOME.
Reason: logstash can’t get to AVA_HOME variable, need to add refresh profile in the configuration file
Solution.
[root@localhost ~]# vi /etc/profile #Add the specified version of the JDK directory installed on the local machine
export JAVA_HOME=/usr/local/jdk1.8
export CLASSPATH=$JAVA_HOME/lib:$JAVA_HOME/jre/lib
export PATH=$JAVA_HOME/lib:$JAVA_HOME/jre/bin:$PATH:$HOME/bin[root@localhost ~]# vi /usr/share/logstash/bin/logstash.lib.sh
Add source /etc/profile in the last line
[root@localhost ~]# vi /usr/share/logstash/bin/logstash
Add source /etc/profile in the last line
Refresh the configuration file, and then see if the service can be opened normally
Issue 3:
Third problem : /usr/share/logstash/vendor/jruby/bin/jruby:line 388: /usr/bin/java: No that file or directory
Unable to install system startup script for Logstash.
Reason: Can’t get the java executable file
Solution:
[root@localhost ~]# ln -s /usr/local/jdk1.8/bin/java /usr/bin/java
Reinstall the service to install.
[root@localhost ~]# rpm -e logstash
Error: package logstash is not installed
[root@localhost ~]# rpm -ivh /mnt/logstash-5.5.1.rpm
Warning: /mnt/logstash-5.5.1.rpm: Head V4 RSA/SHA512 Signature, key ID d88e42b4: NOKEY
In preparation… ################################# [100%]
Package logstash-1:5.5.1-1.noarch is installed
Generate logstash.service file
[root@localhost ~]# sudo /usr/share/logstash/bin/system-install /etc/logstash/startup.options systemd
Using provided startup.options file: /etc/logstash/startup.options
Start successfully!
[root@localhost ~]# systemctl start logstash
Read More:
- How to Solve elk7.7.1 logstash Install Error
- How to Solve elasticSearch8.1.2 Install Error in Win10
- How to Solve Logstash error: failed to execute action
- [Solved] Arm Server kibana7.4.1 Error: Sending Logstash logs to /home/logstash-6.8.4/logs which is now configured via log4j2.properties
- How to Solve elasticsearch-7.15.1 operation errors
- How to Solve elasticsearch root user start Error
- How to Solve creating bean with name ‘mappingjackson2httpmessageconverter’ error when elasticsearch advanced client starts‘
- How to Solve Docker Error: elasticsearch exception: type=cluster_block_exception, reason=blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];
- How to Solve jmeter Install Error (Three Common Errors)
- How to Solve ruby rails Install Error [Windows]
- How to Solve Brew install golangci-lint Error
- [app] install and compile libimobililedevice, How to solve the error
- How to Solve install dm.xmlsec.binding Error
- VScode: How to Solve golong plug-in install Error
- R language: How to Solve DMwR Install Error
- IDEA: How to Solve Springboot Project install Error
- How to Solve Excel Error Log 0: Install Error
- Exception: logstash:: pluginloadingerror when importing MySQL data into es in Windows
- [Solved] Elasticsearch.service failed after enable elasticsearch security features
- After configuring the ES password, logstash starts with error 401?