title: Kibana and Elasticsearch in Docker, coexist with standard install
body: <p>I am trying to setup a new version of Kibana and Elasticsearch on my server. I have an existing K and E running with default ports (5601, 9200) and upgrading the existing data is not an option. I'd like to run newer versions (7.4.2) of K and E in Docker, using different ports (5611:5601, 9211:9200) to access the containers. I have new data area available.  </p>
  
  <p>I believe I have Elasticsearch running correctly, but Kibana's overrides for finding Elasticsearch are not working for me. I've attached my docker-compose.yml file.</p>
  
  <p>Thank you in advance for your help.</p>
  
  <pre><code>version: '3'
  
  networks:
    elk01:
      driver: bridge
  
  services:
    es01:
      image: elasticsearch:7.4.2
      container_name: es01
      user: "983"
      networks:
        - elk01
      environment:
        #- cluster.initial_master_nodes=es01
        - cluster.name=docker-cluster
        - discovery.type=single-node
        - bootstrap.memory_lock=true
        - "ES_JAVA_OPTS=-Xms4g -Xmx4g -XX:-HeapDumpOnOutOfMemoryError"
        #- ES_JAVA_OPTS: "-Xms4g -Xmx4g -XX:-HeapDumpOnOutOfMemoryError"
      ulimits:
        memlock:
          soft: -1
          hard: -1
      ports:
        - "9211:9200"
        - "9311:9300"
      expose:
        - "9211"
      volumes:
        - /elk/elk7_4_2/elasticsearch/data:/usr/share/elasticsearch/data
        - /elk/elk7_4_2/elasticsearch/logs:/usr/share/elasticsearch/logs
  
    k01:
      depends_on:
      - es01
      image: kibana:7.4.2
      container_name: k01
      user: "981"
      networks:
        - elk01
      environment:
        - SERVER_NAME=kibana.localhost
        - ELASTICSEARCH_URL=http://es01:9211
        - ELASTICSEARCH_HOST=es01
        - ELASTICSEARCH_PORT=9211
        #- ELASTICSEARCH_USERNAME=elastic
        #- ELASTIC_PWD=changeme
        #- KIBANA_PWD=changeme
        - xpack.security.enabled=false
      ports:
        - "5611:5601"
      expose:
        - "5611"
  </code></pre>
  
  <p>Kibana errors </p>
  
  <pre><code>k01     | {"type":"log","@timestamp":"2019-11-22T22:08:58Z","tags":["reporting","browser-driver","warning"],"pid":8,"message":"Enabling the Chromium sandbox provides an additional layer of protection."}
  k01     | {"type":"log","@timestamp":"2019-11-22T22:08:59Z","tags":["error","elasticsearch","admin"],"pid":8,"message":"Request error, retrying\nHEAD http://elasticsearch:9200/.apm-agent-configuration =&gt; getaddrinfo ENOTFOUND elasticsearch elasticsearch:9200"}
  k01     | {"type":"log","@timestamp":"2019-11-22T22:08:59Z","tags":["error","elasticsearch","admin"],"pid":8,"message":"Request error, retrying\nGET http://elasticsearch:9200/_nodes?filter_path=nodes.*.version%2Cnodes.*.http.publish_address%2Cnodes.*.ip =&gt; getaddrinfo ENOTFOUND elasticsearch elasticsearch:9200"}
  k01     | {"type":"log","@timestamp":"2019-11-22T22:08:59Z","tags":["warning","elasticsearch","admin"],"pid":8,"message":"Unable to revive connection: http://elasticsearch:9200/"}
  k01     | {"type":"log","@timestamp":"2019-11-22T22:08:59Z","tags":["warning","elasticsearch","admin"],"pid":8,"message":"No living connections"}
  k01     | {"type":"log","@timestamp":"2019-11-22T22:08:59Z","tags":["status","plugin:xpack_main@7.4.2","error"],"pid":8,"state":"red","message":"Status changed from yellow to red - No Living connections","prevState":"yellow","prevMsg":"Waiting for Elasticsearch"}
  k01     | {"type":"log","@timestamp":"2019-11-22T22:08:59Z","tags":["status","plugin:graph@7.4.2","error"],"pid":8,"state":"red","message":"Status changed from yellow to red - No Living connections","prevState":"yellow","prevMsg":"Waiting for Elasticsearch"}
  </code></pre>