Openshift problem with logstash in other server

2022-10-09T19:03:48,320][WARN ][logstash.outputs.elasticsearch][openshift1] Attempted to resurrect connection to dead ES instance, but got an error {:url=>"http://elastichttp2-n-turri-dev.apps.sandbox-m2.ll9k.p1.openshiftapps.com:80/", :exception=>LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError, :message=>"Elasticsearch Unreachable: [http://elastichttp2-n-turri-dev.apps.sandbox-m2.ll9k.p1.openshiftapps.com:80/][Manticore::ConnectTimeout] Connect to elastichttp2-n-turri-dev.apps.sandbox-m2.ll9k.p1.openshiftapps.com:80 [elastichttp2-n-turri-dev.apps.sandbox-m2.ll9k.p1.openshiftapps.com/18.219.121.107, elastichttp2-n-turri-dev.apps.sandbox-m2.ll9k.p1.openshiftapps.com/18.119.15.249] failed: connect timed out"}

this is host is open and response on browser

http://elastichttp2-n-turri-dev.apps.sandbox-m2.ll9k.p1.openshiftapps.com

{
  "name" : "elasticsearch-674bc84bfc-x87pm",
  "cluster_name" : "docker-cluster",
  "cluster_uuid" : "DdZD27mcTg2G3SAAyBJiKw",
  "version" : {
    "number" : "7.16.2",
    "build_flavor" : "default",
    "build_type" : "docker",
    "build_hash" : "2b937c44140b6559905130a8650c64dbd0879cfb",
    "build_date" : "2021-12-18T19:42:46.604893745Z",
    "build_snapshot" : false,
    "lucene_version" : "8.10.1",
    "minimum_wire_compatibility_version" : "6.8.0",
    "minimum_index_compatibility_version" : "6.0.0-beta1"
  },
  "tagline" : "You Know, for Search"
}

my logstash config file

input {
  file {

    path => [ "/logstash_dir/P2/*.*" ]
    
    
    start_position => "beginning"
  }
}



output {
    if " ERROR " in [message] {
		elasticsearch {
			hosts => ["elastichttp2-n-turri-dev.apps.sandbox-m2.ll9k.p1.openshiftapps.com:80"]
			index => "errori_p2"
		}
		
		
    }
    
		stdout { codec => rubydebug }
}

Can you curl from the logstash host to elasticsearch directly?

From the logstash host ... not a browser

curl http://elastichttp2-n-turri-dev.apps.sandbox-m2.ll9k.p1.openshiftapps.com:80

The error indicates a connectivity issues between the logstash host and your elasticsearch endpoint.

yes sir

You need to do this test from where your Logstash service is running.

Can you connect to the logstash container/server and run this curl from there?

hello yes is connect and now is ok

i think openshift have internal strange firewall

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