# Not able to connect to Elastic search from logstash

**URL:** <https://discuss.elastic.co/t/not-able-to-connect-to-elastic-search-from-logstash/326267>\
**Category:** Logstash\
**Tags:** docker\
**Created:** [February 23, 2023, 6:52am UTC](https://discuss.elastic.co/t/not-able-to-connect-to-elastic-search-from-logstash/326267 "2023-02-23T06:52:08Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![vijay78](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vijay78/32/117388_2.png) [@vijay78](https://discuss.elastic.co/u/vijay78)\
**Post date:** [February 23, 2023, 6:52am UTC](https://discuss.elastic.co/t/not-able-to-connect-to-elastic-search-from-logstash/326267/1 "2023-02-23T06:52:08Z")

</div>

iam getting below error after running logstash pod

Using bundled JDK: /usr/share/logstash/jdk  
Sending Logstash logs to /usr/share/logstash/logs which is now configured via log4j2.properties  
[2023-02-23T06:44:35,912][INFO][logstash.runner] Log4j configuration path used is: /usr/share/logstash/config/log4j2.properties  
[2023-02-23T06:44:35,917][INFO][logstash.runner] Starting Logstash {"logstash.version"=\>"8.6.2", "jruby.version"=\>"jruby 9.3.10.0 (2.6.8) 2023-02-01 107b2e6697 OpenJDK 64-Bit Server VM 17.0.6+10 on 17.0.6+10 +indy +jit [x86\_64-linux]"}  
[2023-02-23T06:44:35,919][INFO][logstash.runner] JVM bootstrap flags: [-Xms1g, -Xmx1g, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djruby.compile.invokedynamic=true, -XX:+HeapDumpOnOutOfMemoryError, -Djava.security.egd=file:/dev/urandom, -Dlog4j2.isThreadContextMapInheritable=true, -Dls.cgroup.cpuacct.path.override=/, -Dls.cgroup.cpu.path.override=/, -Djruby.regexp.interruptible=true, -Djdk.io.File.enableADS=true, --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED, --add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED, --add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED, --add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED, --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED, --add-opens=java.base/java.security=ALL-UNNAMED, --add-opens=java.base/java.io=ALL-UNNAMED, --add-opens=java.base/java.nio.channels=ALL-UNNAMED, --add-opens=java.base/sun.nio.ch=ALL-UNNAMED, --add-opens=java.management/sun.management=ALL-UNNAMED]  
[2023-02-23T06:44:35,930][INFO][logstash.settings] Creating directory {:setting=\>"path.queue", :path=\>"/usr/share/logstash/data/queue"}  
[2023-02-23T06:44:35,931][INFO][logstash.settings] Creating directory {:setting=\>"path.dead\_letter\_queue", :path=\>"/usr/share/logstash/data/dead\_letter\_queue"}  
[2023-02-23T06:44:36,106][INFO][logstash.agent] No persistent UUID file found. Generating new UUID {:uuid=\>"0f93cced-be57-4a6a-a2ca-716204a6fed9", :path=\>"/usr/share/logstash/data/uuid"}  
[2023-02-23T06:44:36,638][WARN][logstash.monitoringextension.pipelineregisterhook] xpack.monitoring.enabled has not been defined, but found elasticsearch configuration. Please explicitly set `xpack.monitoring.enabled: true` in logstash.yml  
[2023-02-23T06:44:36,640][WARN][deprecation.logstash.monitoringextension.pipelineregisterhook] Internal collectors option for Logstash monitoring is deprecated and targeted for removal in the next major version.  
Please configure Metricbeat to monitor Logstash. Documentation can be found at:

> **[Collect Logstash monitoring data with Metricbeat | Logstash](https://www.elastic.co/docs/reference/logstash/monitoring-with-metricbeat)**
>
> You can use Metricbeat to collect data about Logstash and ship it to the monitoring cluster. The benefit of Metricbeat collection is that the monitoring...

[2023-02-23T06:44:36,964][INFO][logstash.licensechecker.licensereader] Elasticsearch pool URLs updated {:changes=\>{:removed=\>, :added=\>[[http://elasticsearch:9200/](http://elasticsearch:9200/)]}}  
[2023-02-23T06:44:37,008][INFO][logstash.licensechecker.licensereader] Failed to perform request {:message=\>"elasticsearch: Name or service not known", :exception=\>Manticore::ResolutionFailure, :cause=\>#\<Java::JavaNet::UnknownHostException: elasticsearch: Name or service not known\>}  
[2023-02-23T06:44:37,009][WARN][logstash.licensechecker.licensereader] Attempted to resurrect connection to dead ES instance, but got an error {:url=\>"[http://elasticsearch:9200/](http://elasticsearch:9200/)", :exception=\>LogStash::Outputs::Elasticsearch::HttpClient::Pool::HostUnreachableError, :message=\>"Elasticsearch Unreachable: [[http://elasticsearch:9200/](http://elasticsearch:9200/)][Manticore::ResolutionFailure] elasticsearch: Name or service not known"}  
[2023-02-23T06:44:37,015][INFO][logstash.licensechecker.licensereader] Failed to perform request {:message=\>"elasticsearch", :exception=\>Manticore::ResolutionFailure, :cause=\>#\<Java::JavaNet::UnknownHostException: elasticsearch\>}  
[2023-02-23T06:44:37,018][WARN][logstash.licensechecker.licensereader] Marking url as dead. Last error: [LogStash::Outputs::Elasticsearch::HttpClient::Pool::HostUnreachableError] Elasticsearch Unreachable: [[http://elasticsearch:9200/\_xpack](http://elasticsearch:9200/_xpack)][Manticore::ResolutionFailure] elasticsearch {:url=\>[http://elasticsearch:9200/](http://elasticsearch:9200/), :error\_message=\>"Elasticsearch Unreachable: [[http://elasticsearch:9200/\_xpack](http://elasticsearch:9200/_xpack)][Manticore::ResolutionFailure] elasticsearch", :error\_class=\>"LogStash::Outputs::Elasticsearch::HttpClient::Pool::HostUnreachableError"}  
[2023-02-23T06:44:37,019][WARN][logstash.licensechecker.licensereader] Attempt to validate Elasticsearch license failed. Sleeping for 0.02 {:fail\_count=\>1, :exception=\>"Elasticsearch Unreachable: [[http://elasticsearch:9200/\_xpack](http://elasticsearch:9200/_xpack)][Manticore::ResolutionFailure] elasticsearch"}  
[2023-02-23T06:44:37,042][ERROR][logstash.licensechecker.licensereader] Unable to retrieve license information from license server {:message=\>"No Available connections"}  
[2023-02-23T06:44:37,050][ERROR][logstash.monitoring.internalpipelinesource] Failed to fetch X-Pack information from Elasticsearch. This is likely due to failure to reach a live Elasticsearch cluster.  
[2023-02-23T06:44:37,214][INFO][logstash.agent] Successfully started Logstash API endpoint {:port=\>9600, :ssl\_enabled=\>false}  
[2023-02-23T06:44:37,578][INFO][org.reflections.Reflections] Reflections took 123 ms to scan 1 urls, producing 127 keys and 444 values  
[2023-02-23T06:44:37,612][ERROR][logstash.plugins.registry] Unable to load plugin. {:type=\>"input", :name=\>"azureblob"}  
[2023-02-23T06:44:37,620][ERROR][logstash.agent] Failed to execute action {:action=\>LogStash::PipelineAction::Create/pipeline\_id:main, :exception=\>"Java::JavaLang::IllegalStateException", :message=\>"Unable to configure plugins: (PluginLoadingError) Couldn't find any input plugin named 'azureblob'. Are you sure this is correct? Trying to load the azureblob input plugin resulted in this error: Unable to load the requested plugin named azureblob of type input. The plugin is not installed.", :backtrace=\>["org.logstash.config.ir.CompiledPipeline.(CompiledPipeline.java:120)", "org.logstash.execution.AbstractPipelineExt.initialize(AbstractPipelineExt.java:181)", "org.logstash.execution.AbstractPipelineExt$INVOKER$i$initialize.call(AbstractPipelineExt$INVOKER$i$initialize.gen)", "org.jruby.internal.runtime.methods.JavaMethod$JavaMethodN.call(JavaMethod.java:846)", "org.jruby.ir.runtime.IRRuntimeHelpers.instanceSuper(IRRuntimeHelpers.java:1229)", "org.jruby.ir.instructions.InstanceSuperInstr.interpret(InstanceSuperInstr.java:131)", "org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:361)", "org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)", "org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET\_METHOD(MixedModeIRMethod.java:128)", "org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:115)", "org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:329)", "org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:87)", "org.jruby.RubyClass.newInstance(RubyClass.java:911)", "org.jruby.RubyClass$INVOKER$i$newInstance.call(RubyClass$INVOKER$i$newInstance.gen)", "org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:329)", "org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:87)", "org.jruby.ir.instructions.CallBase.interpret(CallBase.java:549)", "org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:361)", "org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)", "org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:92)", "org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET\_METHOD(MixedModeIRMethod.java:238)", "org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:225)", "org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:226)", "org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:393)", "org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:206)", "org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:325)", "org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)", "org.jruby.ir.interpreter.Interpreter.INTERPRET\_BLOCK(Interpreter.java:116)", "org.jruby.runtime.MixedModeIRBlockBody.commonYieldPath(MixedModeIRBlockBody.java:136)", "org.jruby.runtime.IRBlockBody.call(IRBlockBody.java:66)", "org.jruby.runtime.IRBlockBody.call(IRBlockBody.java:58)", "org.jruby.runtime.Block.call(Block.java:143)", "org.jruby.RubyProc.call(RubyProc.java:309)", "org.jruby.internal.runtime.RubyRunnable.run(RubyRunnable.java:107)", "java.base/java.lang.Thread.run(Thread.java:833)"]}  
[2023-02-23T06:44:37,632][INFO][logstash.runner] Logstash shut down.  
[2023-02-23T06:44:37,638][FATAL][org.logstash.Logstash] Logstash stopped processing because of an error: (SystemExit) exit  
org.jruby.exceptions.SystemExit: (SystemExit) exit  
at org.jruby.RubyKernel.exit(org/jruby/RubyKernel.java:790) ~[jruby.jar:?]  
at org.jruby.RubyKernel.exit(org/jruby/RubyKernel.java:753) ~[jruby.jar:?]  
at usr.share.logstash.lib.bootstrap.environment.(/usr/share/logstash/lib/bootstrap/environment.rb:91) ~[?:?]

find the logstash.yaml file below

## apiVersion: apps/v1 kind: Deployment metadata: name: logstash spec: replicas: 1 selector: matchLabels: app: logstash template: metadata: labels: app: logstash spec: containers: - name: logstash image: [docker.elastic.co/logstash/logstash:8.6.2](http://docker.elastic.co/logstash/logstash:8.6.2) volumeMounts: - name: config-volume mountPath: /usr/share/logstash/pipeline/logstash.conf subPath: logstash.conf ports: - containerPort: 5044 name: tcp - containerPort: 9600 name: http volumes: - name: config-volume configMap: name: logstash-config

apiVersion: v1  
kind: ConfigMap  
metadata:  
name: logstash-config  
data:  
logstash.conf: |  
input {  
azureblob {  
storage\_account\_name =\> "elkstoragefreetrail"  
storage\_access\_key =\> "3Rg57GPSFEo7JRyo+wHM8zwzY7i0cKjUC7aYMYIEMH2zilxyrQsKgqMmTmybpb15bsASDIB6whDA+AStndxo1g=="  
container =\> "elktest"  
path =\> "bwappnode4.log"  
}  
}  
filter {  
json {  
source =\> "message"  
}  
}  
output {  
elasticsearch {  
hosts =\> "[https://quickstart-es-http:9200](https://quickstart-es-http:9200)"  
index =\> "my\_index"  
}  
}

Here i have tried giving Elasticsearch IP instead of service name as well but still same error not sure why its taking bydefault "[https://elasticsearch:9200](https://elasticsearch:9200)"

---

<div class="post-metadata">

**Author:** ![mverbeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mverbeek/32/101709_2.png) [@mverbeek](https://discuss.elastic.co/u/mverbeek)\
**Post date:** [February 23, 2023, 7:59am UTC](https://discuss.elastic.co/t/not-able-to-connect-to-elastic-search-from-logstash/326267/2 "2023-02-23T07:59:56Z")

</div>

Hello,

The error comes from the pipeline:  
`Couldn't find any input plugin named 'azureblob'`

The input "Azure blob" does not exist in the Logstash documentation, are you trying to use: [Azure event hub](https://www.elastic.co/guide/en/logstash/current/plugins-inputs-azure_event_hubs.html)?

See that part of your code:

```auto
input {
  azureblob {
    storage_account_name => "elkstoragefreetrail"
    storage_access_key => "3Rg57GPSFEo7JRyo+wHM8zwzY7i0cKjUC7aYMYIEMH2zilxyrQsKgqMmTmybpb15bsASDIB6whDA+AStndxo1g=="
    container => "elktest"
    path => "bwappnode4.log"
  }
}

```

---

<div class="post-metadata">

**Author:** ![vijay78](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vijay78/32/117388_2.png) [@vijay78](https://discuss.elastic.co/u/vijay78)\
**Post date:** [February 23, 2023, 9:06am UTC](https://discuss.elastic.co/t/not-able-to-connect-to-elastic-search-from-logstash/326267/3 "2023-02-23T09:06:33Z")

</div>

Hi @mverbeek the error startin from X-pack "[2023-02-23T08:56:58,894][WARN][logstash.monitoringextension.pipelineregisterhook] xpack.monitoring.enabled has not been defined, but found elasticsearch configuration. Please explicitly set `xpack.monitoring.enabled: true` in logstash.yml  
[2023-02-23T08:56:58,896][WARN][deprecation.logstash.monitoringextension.pipelineregisterhook] Internal collectors option for Logstash monitoring is deprecated and targeted for removal in the next major version.

can u pls suggest me on this ? not able to set true as pod itself not getting creating is der any way to set "`xpack.monitoring.enabled: true`" ?  
"

---

<div class="post-metadata">

**Author:** ![mverbeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mverbeek/32/101709_2.png) [@mverbeek](https://discuss.elastic.co/u/mverbeek)\
**Post date:** [February 23, 2023, 9:19am UTC](https://discuss.elastic.co/t/not-able-to-connect-to-elastic-search-from-logstash/326267/4 "2023-02-23T09:19:26Z")

</div>

Hello,

That is just a warning, the reason your pipeline is not starting is at the end.

```auto
[2023-02-23T06:44:37,620][ERROR][logstash.agent] Failed to execute action {:action=>LogStash::PipelineAction::Create/pipeline_id:main, :exception=>"Java::JavaLang::IllegalStateException", :message=>"Unable to configure plugins: (PluginLoadingError) Couldn't find any input plugin named 'azureblob'. Are you sure this is correct? Trying to load the azureblob input plugin resulted in this error: Unable to load the requested plugin named azureblob of type input. The plugin is not installed."

```

---

<div class="post-metadata">

**Author:** ![vijay78](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vijay78/32/117388_2.png) [@vijay78](https://discuss.elastic.co/u/vijay78)\
**Post date:** [February 24, 2023, 1:11pm UTC](https://discuss.elastic.co/t/not-able-to-connect-to-elastic-search-from-logstash/326267/5 "2023-02-24T13:11:51Z")

</div>

@mverbeek thanks for your reply now i have set Xpack is true which i was not able to earlier  
find the below logs logstash not able to connect to Elasticsearch it says un reachable

[2023-02-24T12:00:22,441][WARN][logstash.licensechecker.licensereader] Attempted to resurrect connection to dead ES instance, but got an error {:url=\>"[https://20.120.49.206:9200/](https://20.120.49.206:9200/)", :exception=\>LogStash::Outputs::Elasticsearch::HttpClient::Pool::HostUnreachableError, :message=\>"Elasticsearch Unreachable: [[https://20.120.49.206:9200/](https://20.120.49.206:9200/)][Manticore::ClientProtocolException] PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target"}  
[2023-02-24T12:00:40,462][ERROR][logstash.licensechecker.licensereader] Unable to retrieve license information from license server {:message=\>"No Available connections"}  
[2023-02-24T12:00:52,464][INFO][logstash.licensechecker.licensereader] Failed to perform request {:message=\>"PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target", :exception=\>Manticore::ClientProtocolException, :cause=\>#\<Java::JavaxNetSsl::SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target\>}  
[2023-02-24T12:00:52,464][WARN][logstash.licensechecker.licensereader] Attempted to resurrect connection to dead ES instance, but got an error {:url=\>"[https://20.120.49.206:9200/](https://20.120.49.206:9200/)", :exception=\>LogStash::Outputs::Elasticsearch::HttpClient::Pool::HostUnreachableError, :message=\>"Elasticsearch Unreachable: [[https://20.120.49.206:9200/](https://20.120.49.206:9200/)][Manticore::ClientProtocolException] PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target"}  
[2023-02-24T12:01:10,462][ERROR][logstash.licensechecker.licensereader] Unable to retrieve license information from license server {:message=\>"No Available connections"}  
[2023-02-24T12:01:22,481][INFO][logstash.licensechecker.licensereader] Failed to perform request {:message=\>"PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target", :exception=\>Manticore::ClientProtocolException, :cause=\>#\<Java::JavaxNetSsl::SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target\>}  
[2023-02-24T12:01:22,481][WARN][logstash.licensechecker.licensereader] Attempted to resurrect connection to dead ES instance, but got an error {:url=\>"[https://20.120.49.206:9200/](https://20.120.49.206:9200/)", :exception=\>LogStash::Outputs::Elasticsearch::HttpClient::Pool::HostUnreachableError, :message=\>"Elasticsearch Unreachable: [[https://20.120.49.206:9200/](https://20.120.49.206:9200/)][Manticore::ClientProtocolException] PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target"}  
[2023-02-24T12:01:40,462][ERROR][logstash.licensechecker.licensereader] Unable to retrieve license information from license server {:message=\>"No Available connections"}  
[2023-02-24T12:01:52,499][INFO][logstash.licensechecker.licensereader] Failed to perform request {:message=\>"PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target", :exception=\>Manticore::ClientProtocolException, :cause=\>#\<Java::JavaxNetSsl::SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target\>}  
[2023-02-24T12:01:52,499][WARN][logstash.licensechecker.licensereader] Attempted to resurrect connection to dead ES instance, but got an error {:url=\>"[https://20.120.49.206:9200/](https://20.120.49.206:9200/)", :exception=\>LogStash::Outputs::Elasticsearch::HttpClient::Pool::HostUnreachableError, :message=\>"Elasticsearch Unreachable: [[https://20.120.49.206:9200/](https://20.120.49.206:9200/)][Manticore::ClientProtocolException] PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target"}  
[2023-02-24T12:02:10,462][ERROR][logstash.licensechecker.licensereader] Unable to retrieve license information from license server {:message=\>"No Available connections"}  
[2023-02-24T12:02:22,516][INFO][logstash.licensechecker.licensereader] Failed to perform request {:message=\>"PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target", :exception=\>Manticore::ClientProtocolException, :cause=\>#\<Java::JavaxNetSsl::SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target\>}  
[2023-02-24T12:02:22,516][WARN][logstash.licensechecker.licensereader] Attempted to resurrect connection to dead ES instance, but got an error {:url=\>"[https://20.120.49.206:9200/](https://20.120.49.206:9200/)", :exception=\>LogStash::Outputs::Elasticsearch::HttpClient::Pool::HostUnreachableError, :message=\>"Elasticsearch Unreachable: [[https://20.120.49.206:9200/](https://20.120.49.206:9200/)][Manticore::ClientProtocolException] PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target"}  
[2023-02-24T12:02:40,462][ERROR][logstash.licensechecker.licensereader] Unable to retrieve license information from license server {:message=\>"No Available connections"}  
[2023-02-24T12:02:52,533][INFO][logstash.licensechecker.licensereader] Failed to perform request {:message=\>"PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target", :exception=\>Manticore::ClientProtocolException, :cause=\>#\<Java::JavaxNetSsl::SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target\>}  
[2023-02-24T12:02:52,533][WARN][logstash.licensechecker.licensereader] Attempted to resurrect connection to dead ES instance, but got an error {:url=\>"[https://20.120.49.206:9200/](https://20.120.49.206:9200/)", :exception=\>LogStash::Outputs::Elasticsearch::HttpClient::Pool::HostUnreachableError, :message=\>"Elasticsearch Unreachable: [[https://20.120.49.206:9200/](https://20.120.49.206:9200/)][Manticore::ClientProtocolException] PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target"}  
[2023-02-24T12:03:10,462][ERROR][logstash.licensechecker.licensereader] Unable to retrieve license information from license server {:message=\>"No Available connections"}  
[2023-02-24T12:03:22,550][INFO][logstash.licensechecker.licensereader] Failed to perform request {:message=\>"PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target", :exception=\>Manticore::ClientProtocolException, :cause=\>#\<Java::JavaxNetSsl::SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target\>}  
[2023-02-24T12:03:22,550][WARN][logstash.licensechecker.licensereader] Attempted to resurrect connection to dead ES instance, but got an error {:url=\>"[https://20.120.49.206:9200/](https://20.120.49.206:9200/)", :exception=\>LogStash::Outputs::Elasticsearch::HttpClient::Pool::HostUnreachableError, :message=\>"Elasticsearch Unreachable: [[https://20.120.49.206:9200/](https://20.120.49.206:9200/)][Manticore::ClientProtocolException] PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target"}  
[2023-02-24T12:03:40,462][ERROR][logstash.licensechecker.licensereader] Unable to retrieve license information from license server {:message=\>"No Available connections"}  
[2023-02-24T12:03:52,568][INFO][logstash.licensechecker.licensereader] Failed to perform request {:message=\>"PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target", :exception=\>Manticore::ClientProtocolException, :cause=\>#\<Java::JavaxNetSsl::SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target\>}  
[2023-02-24T12:03:52,568][WARN][logstash.licensechecker.licensereader] Attempted to resurrect connection to dead ES instance, but got an error {:url=\>"[https://20.120.49.206:9200/](https://20.120.49.206:9200/)", :exception=\>LogStash::Outputs::Elasticsearch::HttpClient::Pool::HostUnreachableError, :message=\>"Elasticsearch Unreachable: [[https://20.120.49.206:9200/](https://20.120.49.206:9200/)][Manticore::ClientProtocolException] PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target"}

logstash.yaml  
apiVersion: apps/v1  
kind: Deployment  
metadata:  
name: logstash01  
spec:  
replicas: 1  
selector:  
matchLabels:  
app: logstash01  
template:  
metadata:  
labels:  
app: logstash01  
spec:  
nodeSelector:  
"[beta.kubernetes.io/os](http://beta.kubernetes.io/os)": linux  
volumes:  
containers:  
- name: logstash01  
image: [docker.elastic.co/logstash/logstash:8.6.2](http://docker.elastic.co/logstash/logstash:8.6.2)  
env:  
- name: xpack.monitoring.elasticsearch.hosts  
value: "[https://20.120.49.206:9200/](https://20.120.49.206:9200/)"  
- name: ELASTICSEARCH\_USERNAME  
value: "elastic"  
- name: ELASTICSEARCH\_PASSWORD  
value: "65jeyzS7N9T9OvZu4I2wS548"  
- name: XPACK\_MONITORING\_ENABLED  
value: "true"  
ports:  
- containerPort: 8082  
name: logstash01  
- containerPort: 5044  
name: tcp  
- containerPort: 9600  
name: http

Elastic search setup was done by using below  
kubectl create -f [https://download.elastic.co/downloads/eck/2.6.1/crds.yaml](https://download.elastic.co/downloads/eck/2.6.1/crds.yaml)  
kubectl apply -f [https://download.elastic.co/downloads/eck/2.6.1/operator.yaml](https://download.elastic.co/downloads/eck/2.6.1/operator.yaml)

elasticsearch yaml file:  
cat \<\<EOF | kubectl apply -f -  
apiVersion: [elasticsearch.k8s.elastic.co/v1](http://elasticsearch.k8s.elastic.co/v1)  
kind: Elasticsearch  
metadata:  
name: quickstart  
spec:  
version: 8.6.2  
nodeSets:

- name: default  
count: 1  
config:  
node.store.allow\_mmap: false  
EOF

referred below official Doc for kibana,Elasticsearch setup on AKS

> **[Deploy an Elasticsearch cluster | Elastic Cloud on Kubernetes \[2.6\] | Elastic](https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-deploy-elasticsearch.html)**

Kindly check and let me know where I am missing.(Elasticsearch and kibana running fine and able to access it)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 24, 2023, 1:12pm UTC](https://discuss.elastic.co/t/not-able-to-connect-to-elastic-search-from-logstash/326267/6 "2023-03-24T13:12:46Z")

</div>

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