question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

error=>"Elasticsearch Unreachable: [http://elasticsearch:9200/]

See original GitHub issue

Chart version: 7.7.1 Kubernetes version: 1.16 Kubernetes provider: E.g. GKE (Google Kubernetes Engine) eks Helm Version:

2.16.10 helm get release output

e.g. helm get elasticsearch (replace elasticsearch with the name of your helm release)

Be careful to obfuscate every secrets (credentials, token, public IP, …) that could be visible in the output before copy-pasting.

If you find some secrets in plain text in helm get release output you should use Kubernetes Secrets to managed them is a secure way (see Security Example).

Output of helm get release
$ helm get logstash
REVISION: 1
RELEASED: Thu Aug 13 20:48:50 2020
CHART: logstash-7.7.1
USER-SUPPLIED VALUES:
{}

COMPUTED VALUES:
antiAffinity: hard
antiAffinityTopologyKey: kubernetes.io/hostname
envFrom: []
extraContainers: ""
extraEnvs: []
extraInitContainers: ""
extraPorts: []
extraVolumeMounts: ""
extraVolumes: ""
fullnameOverride: ""
httpPort: 9600
image: docker.elastic.co/logstash/logstash
imagePullPolicy: IfNotPresent
imagePullSecrets: []
imageTag: 7.7.1
labels: {}
lifecycle: {}
livenessProbe:
  failureThreshold: 3
  httpGet:
    path: /
    port: http
  initialDelaySeconds: 300
  periodSeconds: 10
  successThreshold: 1
  timeoutSeconds: 5
logstashConfig: {}
logstashJavaOpts: -Xmx1g -Xms1g
logstashPipeline: {}
maxUnavailable: 1
nameOverride: ""
nodeAffinity: {}
nodeSelector: {}
persistence:
  annotations: {}
  enabled: false
podAnnotations: {}
podManagementPolicy: Parallel
podSecurityContext:
  fsGroup: 1000
  runAsUser: 1000
podSecurityPolicy:
  create: false
  name: ""
  spec:
    fsGroup:
      rule: RunAsAny
    privileged: true
    runAsUser:
      rule: RunAsAny
    seLinux:
      rule: RunAsAny
    supplementalGroups:
      rule: RunAsAny
    volumes:
    - secret
    - configMap
    - persistentVolumeClaim
priorityClassName: ""
rbac:
  create: false
  serviceAccountName: ""
readinessProbe:
  failureThreshold: 3
  httpGet:
    path: /
    port: http
  initialDelaySeconds: 60
  periodSeconds: 10
  successThreshold: 3
  timeoutSeconds: 5
replicas: 1
resources:
  limits:
    cpu: 1000m
    memory: 1536Mi
  requests:
    cpu: 100m
    memory: 1536Mi
schedulerName: ""
secretMounts: []
securityContext:
  capabilities:
    drop:
    - ALL
  runAsNonRoot: true
  runAsUser: 1000
service: {}
terminationGracePeriod: 120
tolerations: []
updateStrategy: RollingUpdate
volumeClaimTemplate:
  accessModes:
  - ReadWriteOnce
  resources:
    requests:
      storage: 1Gi

HOOKS:
MANIFEST:

---
# Source: logstash/templates/poddisruptionbudget.yaml
apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
  name: "logstash-logstash-pdb"
  labels:
    app: "logstash-logstash"
    chart: "logstash"
    heritage: "Tiller"
    release: "logstash"
spec:
  maxUnavailable: 1
  selector:
    matchLabels:
      app: "logstash-logstash"
---
# Source: logstash/templates/statefulset.yaml
apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: logstash-logstash
  labels:
    app: "logstash-logstash"
    chart: "logstash"
    heritage: "Tiller"
    release: "logstash"
spec:
  selector:
    matchLabels:
      app: "logstash-logstash"
      release: "logstash"
  replicas: 1
  podManagementPolicy: Parallel
  updateStrategy:
    type: RollingUpdate
  template:
    metadata:
      name: "logstash-logstash"
      labels:
        app: "logstash-logstash"
        chart: "logstash"
        heritage: "Tiller"
        release: "logstash"
      annotations:
        
        
    spec:
      securityContext:
        fsGroup: 1000
        runAsUser: 1000
        
      affinity:
        podAntiAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
          - labelSelector:
              matchExpressions:
              - key: app
                operator: In
                values:
                - "logstash-logstash"
            topologyKey: kubernetes.io/hostname
      terminationGracePeriodSeconds: 120
      volumes:
      containers:
      - name: "logstash"
        securityContext:
          capabilities:
            drop:
            - ALL
          runAsNonRoot: true
          runAsUser: 1000
          
        image: "docker.elastic.co/logstash/logstash:7.7.1"
        imagePullPolicy: "IfNotPresent"
        livenessProbe:
          failureThreshold: 3
          httpGet:
            path: /
            port: http
          initialDelaySeconds: 300
          periodSeconds: 10
          successThreshold: 1
          timeoutSeconds: 5
          
        readinessProbe:
          failureThreshold: 3
          httpGet:
            path: /
            port: http
          initialDelaySeconds: 60
          periodSeconds: 10
          successThreshold: 3
          timeoutSeconds: 5
          
        ports:
        - name: http
          containerPort: 9600
        resources:
          limits:
            cpu: 1000m
            memory: 1536Mi
          requests:
            cpu: 100m
            memory: 1536Mi
          
        env:
          - name: LS_JAVA_OPTS
            value: "-Xmx1g -Xms1g"
        volumeMounts:

Describe the bug:

$ kubectl logs logstash-logstash-0

[2020-08-14T03:51:17,479][ERROR][logstash.licensechecker.licensereader] Unable to retrieve license information from license server {:message=>"No Available connections"}
[2020-08-14T03:51:17,569][WARN ][logstash.licensechecker.licensereader] Attempted to resurrect connection to dead ES instance, but got an error. {:url=>"http://elasticsearch:9200/", :error_type=>LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError, :error=>"Elasticsearch Unreachable: [http://elasticsearch:9200/][Manticore::ResolutionFailure] elasticsearch: Name or service not known"}

**Steps to reproduce:**

1.
helm install --name elasticsearch ./elasticsearch --namespace elk
2.
$ helm install --name kibana ./kibana --namespace elk
3.
$ helm install --name logstash ./logstash --namespace elk
**Expected behavior:**

**Provide logs and/or server output (if relevant):**

*Be careful to obfuscate every secrets (credentials, token, public IP, ...) that could be visible in the output before copy-pasting*


**Any additional context:**

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
jmlrtcommented, Oct 30, 2020

Hi @abbbhardwaj, if you want to use Logstash monitoring with a different Elasticsearch URL, you can override it with the following setting:

logstashConfig:
  logstash.yml: |
    monitoring.elasticsearch.hosts: http://elasticsearch:9200

source: https://www.elastic.co/guide/en/logstash/current/docker-config.html#_docker_defaults

0reactions
jmlrtcommented, Feb 24, 2021

closing as stale

Read more comments on GitHub >

github_iconTop Results From Across the Web

Elasticsearch Unreachable error in Logstash - Elastic Discuss
Hi, I have just upgraded from ELK 5.0.0 to 5.2.0. I have installed and set X-Pack 5.2.0 for Elasticsearch, Logstash and Kibana, and...
Read more >
elasticsearch - Running 2 separate ELK stacks on docker
On my AWS EC2 linux server I'am running one ELK stack, where logstash is transforming postgress database and importing into Elasticsearch. This ...
Read more >
error type LogStash Outputs ElasticSearch HttpClient Pool ...
Hi Guys, I am trying to run the Logstash server, but it is showing me the below error. How can I solve this...
Read more >
elasticsearch - Bountysource
This is my code, but when I try to do a search I have got the error "Elasticsearch.Net.UnexpectedElasticsearchClientException: Unable to retrieve ...
Read more >
ELK on docker-compose - 简书
... :error=>"Elasticsearch Unreachable: [http://elasticsearch:9200/][Manticore::ConnectTimeout] connect timed out"} [2019-04-07T16:32:06 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found