I installed x-pack on logstash. logstash was running successfully before x-pack. After installation of x-pack, I disable seucirty in elasticseach and logstash by using below command in .yml file
xpack.security.enabled: false
I directed logstash as below
xpack.monitoring.elasticsearch.url: ["http://x.x.x.x:9200"]
x.x.x.x is the elasticsearch server
Logstash is not running and when I run the below command for test
bin/logstash -f /etc/logstash/conf.d/sample.conf
The result is as below
WARNING: Could not find logstash.yml which is typically located in $LS_HOME/config or /etc/logstash. You can specify the path using --path.settings. Continuing using the defaults
Could not find log4j2 configuration at path /usr/share/logstash/config/log4j2.properties. Using default config which logs errors to the console
Elasticsearch Unreachable: [http://localhost:9200/][Manticore::SocketException] Connection refused
[ERROR] 2017-11-24 09:17:41.606 [[.monitoring-logstash]-pipeline-manager] licensemanager - Unable to retrieve license information from license server {:message=>"Elasticsearch Unreachable: [http://localhost:9200/][Manticore::SocketException] Connection refused", :class=>"LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError"}
The stdin plugin is now waiting for input:
[ERROR] 2017-11-24 09:17:43.431 [Ruby-0-Thread-1: /usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/stud-0.0.23/lib/stud/task.rb:22] metrics - Monitoring is not available: License information is currently unavailable. Please make sure you have added your production elasticsearch connection info in the xpack.monitoring.elasticsearch settings.
No Available connections
[ERROR] 2017-11-24 09:18:11.634 [monitoring-license-manager] licensemanager - Unable to retrieve license information from license server {:message=>"No Available connections", :class=>"LogStash::Outputs::ElasticSearch::HttpClient::Pool::NoConnectionAvailableError"}
No Available connections
WARNING: Could not find logstash.yml which is typically located in $LS_HOME/config or /etc/logstash. You can specify the path using --path.settings. Continuing using the defaults
So logstash can't find the logstash.yml where you set the xpack.monitoring.elasticsearch.url and it attempts to use default value for the elasticsearch url, which is http://localhost:9200 . No, nothing is listening on 9200 on your machine, hence you get a
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.