Не могу запустить эластичный поиск docker контейнер - PullRequest
1 голос
/ 29 января 2020



У меня был эластичный поиск под docker (windows 10), который был нормальным до сегодняшнего дня. Это было до энергетического сбоя в моем здании, и теперь я не могу больше его поднять. Мой самый большой индекс имеет 1,7 миллиона объектов, почти 3 ГБ, и я не хотел бы снова создавать его с нуля ...

Мой код:


docker -compose.yml:

version: '2.2'
services:
  persona01:
    image: docker.elastic.co/elasticsearch/elasticsearch:7.4.2
    container_name: persona01
    environment:
      - node.name=persona01
      - cluster.name=persona-docker-cluster
      - discovery.seed_hosts=persona02
      - cluster.initial_master_nodes=persona01,persona02
      - bootstrap.memory_lock=true
      - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
    ulimits:
      memlock:
        soft: -1
        hard: -1
    volumes:
      - D://Docker/diego/elastic/data/persona01:/usr/share/elasticsearch/data
    ports:
      - 9200:9200
    networks:
      - netPersona

  persona02:
    image: docker.elastic.co/elasticsearch/elasticsearch:7.4.2
    container_name: persona02
    environment:
      - node.name=persona02
      - cluster.name=persona-docker-cluster
      - discovery.seed_hosts=persona01
      - cluster.initial_master_nodes=persona01,persona02
      - bootstrap.memory_lock=true
      - "ES_JAVA_OPTS=-Xms512m -Xmx512m"

    ulimits:
      memlock:
        soft: -1
        hard: -1
    volumes:
      - D://Docker/diego/elastic/data/persona02:/usr/share/elasticsearch/data
    networks:
      - netPersona
volumes:
  elastic_data01:
    driver: local
  elastic_data02:
    driver: local
networks:
  netPersona:
    driver: bridge




Структура моих папок:

enter image description here




Сообщение об ошибке:

PS D:\docker\diego\elastic> docker-compose up
Starting persona02 ... done                                                                                                                                                         Starting persona01 ... done                                                                                                                                                         Attaching to persona02, persona01
persona02    | OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
persona01    | OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
persona01    | {"type": "server", "timestamp": "2020-01-28T21:21:14,351Z", "level": "WARN", "component": "o.e.b.ElasticsearchUncaughtExceptionHandler", "cluster.name": "persona-docker-cluster", "node.name": "persona01", "message": "uncaught exception in thread [main]",
persona01    | "stacktrace": ["org.elasticsearch.bootstrap.StartupException: ElasticsearchException[failed to bind service]; nested: AccessDeniedException[/usr/share/elasticsearch/data/nodes];",
persona01    | "at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:163) ~[elasticsearch-7.4.2.jar:7.4.2]",
persona01    | "at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:150) ~[elasticsearch-7.4.2.jar:7.4.2]",
persona01    | "at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) ~[elasticsearch-7.4.2.jar:7.4.2]",
persona01    | "at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:125) ~[elasticsearch-cli-7.4.2.jar:7.4.2]",
persona01    | "at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-cli-7.4.2.jar:7.4.2]",
persona01    | "at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:115) ~[elasticsearch-7.4.2.jar:7.4.2]",
persona01    | "at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92) ~[elasticsearch-7.4.2.jar:7.4.2]",
persona01    | "Caused by: org.elasticsearch.ElasticsearchException: failed to bind service",
persona01    | "at org.elasticsearch.node.Node.<init>(Node.java:614) ~[elasticsearch-7.4.2.jar:7.4.2]",
persona01    | "at org.elasticsearch.node.Node.<init>(Node.java:255) ~[elasticsearch-7.4.2.jar:7.4.2]",
persona01    | "at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:221) ~[elasticsearch-7.4.2.jar:7.4.2]",
persona01    | "at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:221) ~[elasticsearch-7.4.2.jar:7.4.2]",
persona01    | "at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:349) ~[elasticsearch-7.4.2.jar:7.4.2]",
persona01    | "at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:159) ~[elasticsearch-7.4.2.jar:7.4.2]",
persona01    | "... 6 more",
persona01    | "Caused by: java.nio.file.AccessDeniedException: /usr/share/elasticsearch/data/nodes",
persona01    | "at sun.nio.fs.UnixException.translateToIOException(UnixException.java:90) ~[?:?]",
persona01    | "at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111) ~[?:?]",
persona01    | "at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116) ~[?:?]",
persona01    | "at sun.nio.fs.UnixFileSystemProvider.createDirectory(UnixFileSystemProvider.java:389) ~[?:?]",
persona01    | "at java.nio.file.Files.createDirectory(Files.java:693) ~[?:?]",
persona01    | "at java.nio.file.Files.createAndCheckIsDirectory(Files.java:800) ~[?:?]",
persona01    | "at java.nio.file.Files.createDirectories(Files.java:786) ~[?:?]",
persona01    | "at org.elasticsearch.env.NodeEnvironment.lambda$new$0(NodeEnvironment.java:272) ~[elasticsearch-7.4.2.jar:7.4.2]",
persona01    | "at org.elasticsearch.env.NodeEnvironment$NodeLock.<init>(NodeEnvironment.java:209) ~[elasticsearch-7.4.2.jar:7.4.2]",
persona01    | "at org.elasticsearch.env.NodeEnvironment.<init>(NodeEnvironment.java:269) ~[elasticsearch-7.4.2.jar:7.4.2]",
persona01    | "at org.elasticsearch.node.Node.<init>(Node.java:275) ~[elasticsearch-7.4.2.jar:7.4.2]",
persona01    | "at org.elasticsearch.node.Node.<init>(Node.java:255) ~[elasticsearch-7.4.2.jar:7.4.2]",
persona01    | "at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:221) ~[elasticsearch-7.4.2.jar:7.4.2]",
persona01    | "at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:221) ~[elasticsearch-7.4.2.jar:7.4.2]",
persona01    | "at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:349) ~[elasticsearch-7.4.2.jar:7.4.2]",
persona01    | "at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:159) ~[elasticsearch-7.4.2.jar:7.4.2]",
persona01    | "... 6 more"] }
persona02    | {"type": "server", "timestamp": "2020-01-28T21:21:14,454Z", "level": "WARN", "component": "o.e.b.ElasticsearchUncaughtExceptionHandler", "cluster.name": "persona-docker-cluster", "node.name": "persona02", "message": "uncaught exception in thread [main]",
persona02    | "stacktrace": ["org.elasticsearch.bootstrap.StartupException: ElasticsearchException[failed to bind service]; nested: AccessDeniedException[/usr/share/elasticsearch/data/nodes];",
persona02    | "at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:163) ~[elasticsearch-7.4.2.jar:7.4.2]",
persona02    | "at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:150) ~[elasticsearch-7.4.2.jar:7.4.2]",
persona02    | "at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) ~[elasticsearch-7.4.2.jar:7.4.2]",
persona02    | "at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:125) ~[elasticsearch-cli-7.4.2.jar:7.4.2]",
persona02    | "at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-cli-7.4.2.jar:7.4.2]",
persona02    | "at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:115) ~[elasticsearch-7.4.2.jar:7.4.2]",
persona02    | "at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92) ~[elasticsearch-7.4.2.jar:7.4.2]",
persona02    | "Caused by: org.elasticsearch.ElasticsearchException: failed to bind service",
persona02    | "at org.elasticsearch.node.Node.<init>(Node.java:614) ~[elasticsearch-7.4.2.jar:7.4.2]",
persona02    | "at org.elasticsearch.node.Node.<init>(Node.java:255) ~[elasticsearch-7.4.2.jar:7.4.2]",
persona02    | "at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:221) ~[elasticsearch-7.4.2.jar:7.4.2]",
persona02    | "at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:221) ~[elasticsearch-7.4.2.jar:7.4.2]",
persona02    | "at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:349) ~[elasticsearch-7.4.2.jar:7.4.2]",
persona02    | "at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:159) ~[elasticsearch-7.4.2.jar:7.4.2]",
persona02    | "... 6 more",
persona02    | "Caused by: java.nio.file.AccessDeniedException: /usr/share/elasticsearch/data/nodes",
persona02    | "at sun.nio.fs.UnixException.translateToIOException(UnixException.java:90) ~[?:?]",
persona02    | "at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111) ~[?:?]",
persona02    | "at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116) ~[?:?]",
persona02    | "at sun.nio.fs.UnixFileSystemProvider.createDirectory(UnixFileSystemProvider.java:389) ~[?:?]",
persona02    | "at java.nio.file.Files.createDirectory(Files.java:693) ~[?:?]",
persona02    | "at java.nio.file.Files.createAndCheckIsDirectory(Files.java:800) ~[?:?]",
persona02    | "at java.nio.file.Files.createDirectories(Files.java:786) ~[?:?]",
persona02    | "at org.elasticsearch.env.NodeEnvironment.lambda$new$0(NodeEnvironment.java:272) ~[elasticsearch-7.4.2.jar:7.4.2]",
persona02    | "at org.elasticsearch.env.NodeEnvironment$NodeLock.<init>(NodeEnvironment.java:209) ~[elasticsearch-7.4.2.jar:7.4.2]",
persona02    | "at org.elasticsearch.env.NodeEnvironment.<init>(NodeEnvironment.java:269) ~[elasticsearch-7.4.2.jar:7.4.2]",
persona02    | "at org.elasticsearch.node.Node.<init>(Node.java:275) ~[elasticsearch-7.4.2.jar:7.4.2]",
persona02    | "at org.elasticsearch.node.Node.<init>(Node.java:255) ~[elasticsearch-7.4.2.jar:7.4.2]",
persona02    | "at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:221) ~[elasticsearch-7.4.2.jar:7.4.2]",
persona02    | "at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:221) ~[elasticsearch-7.4.2.jar:7.4.2]",
persona02    | "at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:349) ~[elasticsearch-7.4.2.jar:7.4.2]",
persona02    | "at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:159) ~[elasticsearch-7.4.2.jar:7.4.2]",
persona02    | "... 6 more"] }
persona02 exited with code 1
persona01 exited with code 1




Я также заметил следующие ошибки :

"persona01", "message": "uncaught exception in thread [main]",
persona01    | "stacktrace": ["org.elasticsearch.bootstrap.StartupException: ElasticsearchException[failed to bind service]; nested: AccessDeniedException[/usr/share/elasticsearch/data/nodes];",
...
"persona02", "message": "uncaught exception in thread [main]",
persona02    | "stacktrace": ["org.elasticsearch.bootstrap.StartupException: ElasticsearchException[failed to bind service]; nested: AccessDeniedException[/usr/share/elasticsearch/data/nodes];",

Но я действительно не знаю, как их решить.
Так что я ценю любую помощь.

Заранее спасибо.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...