Some networks were defined but are not used by any service: elastic

hey, i have a little problem with elastic, i have a error message : some networks were defined but are not used by any service: elastic, i have install kibana and this error appeared. i want to create ELK server on docker. but when i look in docker ps -a i don't have my nodes, i have launch docker-compose up -d --remove-orphans but i noticed that this command has deleted my nodes.

Welcome to our community! :smiley:

It'd be useful if you could share the various config files you are using to try to make this work.

i fail my config this problem is resolute, but now i have a problem with kibana i have an error 64

Please don't post pictures of text, logs or code. They are difficult to read, impossible to search and replicate (if it's code), and some people may not be even able to see them :slight_smile:

okay it's a log start kibana

docker-compose.yml

version: '2.2'
services:
  kibana:
     image: docker.elastic.co/kibana/kibana:7.15.2
     volumes:
       - ./kibana.yml:/usr/share/kibana/config/kibana.yml
     environment:
       SERVER_NAME: kibana.example.org
       ELASTICSEARCH_HOSTS: '["http://es01:9200","http://es02:9200","http://es03:9200"]'

  es01:
    image: docker.elastic.co/elasticsearch/elasticsearch:7.15.2
    container_name: es01
    environment:
      - node.name=es01
      - cluster.name=es-docker-cluster
      - discovery.seed_hosts=es02,es03
      - cluster.initial_master_nodes=es01,es02,es03
      - bootstrap.memory_lock=true
      - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
    ulimits:
      memlock:
        soft: -1
        hard: -1
    volumes:
      - data01:/usr/share/elasticsearch/data
    ports:
      - 9200:9200
    networks:
      - elastic
  es02:
    image: docker.elastic.co/elasticsearch/elasticsearch:7.15.2
    container_name: es02
    environment:
      - node.name=es02
      - cluster.name=es-docker-cluster
      - discovery.seed_hosts=es01,es03
      - cluster.initial_master_nodes=es01,es02,es03
      - bootstrap.memory_lock=true
      - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
    ulimits:
      memlock:
        soft: -1
        hard: -1
    volumes:
      - data02:/usr/share/elasticsearch/data
    networks:
      - elastic
  es03:
    image: docker.elastic.co/elasticsearch/elasticsearch:7.15.2
    container_name: es03
    environment:
      - node.name=es03
      - cluster.name=es-docker-cluster
      - discovery.seed_hosts=es01,es02
      - cluster.initial_master_nodes=es01,es02,es03
      - bootstrap.memory_lock=true
      - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
    ulimits:
      memlock:
        soft: -1
        hard: -1

What is the content of the file ./kibana.yml that you are mapping as /usr/share/kibana/config/kibana.yml ?

There is something wrong with this file, are you sure this file is a Kibana configuration file?

From your error it seems to be trying to load configs from your docker-compose.yml file, you can see that it says that version, services.kibana.image and services.kibana.volumes are unknown configurations for kibana, those are the first lines of your docker-compose.yml file.

kibana.yml

version: '2'
services:
  kibana:
    image: docker.elastic.co/kibana/kibana:7.15.2
    volumes:
      - ./kibana.yml:/usr/share/kibana/config/kibana.yml


This file is wrong, it is not a Kibana configuration file, it is just part of docker-compose file.

Where did you get this from? You should pass a valid configuration to Kibana, only if you need to change anything from the default configuration.

Remove the volumes line below from the kibana service in your docker-compose and see if it starts.

     volumes:
       - ./kibana.yml:/usr/share/kibana/config/kibana.yml

I need modify the file kibana.yml, to make a good configuration ?

kibana start without the volume.

You do not need to mount a local kibana.yml unless you have some specific configuration that you want to change.

I would suggest that you take a look at this part of the documentation with an example of a docker-compose.yml to run an Elasticsearch cluster.

As you can see, there is no need to mount a volume with the kibana.yml file.

  kib01:
    image: docker.elastic.co/kibana/kibana:7.15.2
    container_name: kib01
    ports:
      - 5601:5601
    environment:
      ELASTICSEARCH_URL: http://es01:9200
      ELASTICSEARCH_HOSTS: '["http://es01:9200","http://es02:9200","http://es03:9200"]'
    networks:
      - elastic

This other part of the documentation explains that if you need you can configure Kibana using a bind-mount.

hey, thanks for helping, now i have a web interface. if i want logs i need install logstack ?

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