我正在运行一个带有postgresql数据库和elasticsearch服务器的rubyonrails应用程序。我在单独的docker容器中使用docker compose在网络中一起工作,它托管在digital ocean droplet(Ubuntu20.04.1 lts)上,我以root身份登录。以下是使用命令“docker compose ps”列出的容器,以供参考:
Name Command State Ports
---------------------------------------------------------------------------
database docker-entrypoint.sh postgres Exit 0
proptrics_elasticsearch_1 /tini -- /usr/local/bin/do ... Exit 1
proptrics_web_1 entrypoint.sh bash -c rm - ... Exit 1
当我使用命令时:
docker-compose up
应用程序和数据库正常运行,但elasticsearch服务器出现错误并停止运行。输出中最相关的部分似乎是:
ElasticsearchException[failed to bind service]; nested: AccessDeniedException[/usr/share/elasticsearch/data/nodes];
Likely root cause: java.nio.file.AccessDeniedException: /usr/share/elasticsearch/data/nodes
对于这个错误,我已经查看了类似的答案,它似乎与linux文件系统和用户访问权限有关,但是我不确定如何解决这个问题,因为我缺乏linux文件系统和用户权限方面的经验。
这个答案使用持久主机卷与docker compose的elasticsearch似乎是最相似的,但是我仍然不知道如何将其应用于我的问题。
谢谢你的帮助。
我的docker-compose.yml文件如下:
version: "3.8"
services:
web:
build: .
command: bash -c "rm -f tmp/pids/server.pid && bundle exec rails s -p 3000 -b '0.0.0.0'"
volumes:
- bundle-volume:/usr/local/bundle
ports:
- "3000:3000"
depends_on:
- database
- elasticsearch
environment:
RAILS_ENV: development
DATABASE_NAME: proptrics_development
DATABASE_USER: postgres
DATABASE_PASSWORD:**********
POSTGRES_PASSWORD:**********
DATABASE_HOST: database
ELASTICSEARCH_URL: http://elasticsearch:9200
database:
image: postgres:12.3
container_name: database
volumes:
- db_volume:/var/lib/postgresql/data
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
ports:
- "5432:5432"
environment:
DATABASE_PASSWORD:**********
POSTGRES_PASSWORD:**********
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.9.3
volumes:
- ./docker_data/elasticsearch/data:/usr/share/elasticsearch/data
environment:
- cluster.name=docker-cluster
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- discovery.type=single-node
ports:
- 9200:9200
ulimits:
memlock:
soft: -1
hard: -1
volumes:
bundle-volume:
db_volume:
data:
我的dockerfile如下:
FROM ruby:2.6.6-buster
RUN apt-get update -qq && \
apt-get install -y curl \
build-essential \
libpq-dev \
postgresql \
postgresql-contrib \
postgresql-client
RUN mkdir /proptrics
RUN mkdir -p /usr/local/nvm
WORKDIR /proptrics
RUN curl -sL https://deb.nodesource.com/setup_15.x | bash -
RUN apt-get install -y nodejs
RUN node -v
RUN npm -v
COPY Gemfile Gemfile.lock package.json yarn.lock ./
RUN gem install bundler && bundle update --bundler && bundle install
RUN npm install -g yarn && yarn install --check-files
COPY . /proptrics
COPY entrypoint.sh /usr/bin/
RUN chmod +x /usr/bin/entrypoint.sh
ENTRYPOINT ["entrypoint.sh"]
EXPOSE 3000
CMD ["rails", "server", "-b", "0.0.0.0"]
完整的elasticsearch响应,包括下面显示的错误,以供参考。
elasticsearch_1 | {"type": "server", "timestamp": "2020-12-14T19:38:02,394Z", "level": "INFO", "component": "o.e.n.Node", "cluster.name": "docker-cluster", "node.name": "e33ecad0776c", "message": "version[7.9.3], pid[6], build[default/docker/c4138e51121ef06a6404866cddc601906fe5c868/2020-10-16T10:36:16.141335Z], OS[Linux/5.4.0-52-generic/amd64], JVM[Oracle Corporation/OpenJDK 64-Bit Server VM/15/15+36-1562]" }
elasticsearch_1 | {"type": "server", "timestamp": "2020-12-14T19:38:02,400Z", "level": "INFO", "component": "o.e.n.Node", "cluster.name": "docker-cluster", "node.name": "e33ecad0776c", "message": "JVM home [/usr/share/elasticsearch/jdk]" }
elasticsearch_1 | {"type": "server", "timestamp": "2020-12-14T19:38:02,401Z", "level": "INFO", "component": "o.e.n.Node", "cluster.name": "docker-cluster", "node.name": "e33ecad0776c", "message": "JVM arguments [-Xshare:auto, -Des.networkaddress.cache.ttl=60, -Des.networkaddress.cache.negative.ttl=10, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -XX:-OmitStackTraceInFastThrow, -XX:+ShowCodeDetailsInExceptionMessages, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dio.netty.allocator.numDirectArenas=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Djava.locale.providers=SPI,COMPAT, -Xms1g, -Xmx1g, -XX:+UseG1GC, -XX:G1ReservePercent=25, -XX:InitiatingHeapOccupancyPercent=30, -Djava.io.tmpdir=/tmp/elasticsearch-15197622989873108878, -XX:+HeapDumpOnOutOfMemoryError, -XX:HeapDumpPath=data, -XX:ErrorFile=logs/hs_err_pid%p.log, -Xlog:gc*,gc+age=trace,safepoint:file=logs/gc.log:utctime,pid,tags:filecount=32,filesize=64m, -Des.cgroups.hierarchy.override=/, -Xms512m, -Xmx512m, -XX:MaxDirectMemorySize=268435456, -Des.path.home=/usr/share/elasticsearch, -Des.path.conf=/usr/share/elasticsearch/config, -Des.distribution.flavor=default, -Des.distribution.type=docker, -Des.bundled_jdk=true]" }
elasticsearch_1 | {"type": "server", "timestamp": "2020-12-14T19:38:05,138Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e33ecad0776c", "message": "loaded module [aggs-matrix-stats]" }
elasticsearch_1 | {"type": "server", "timestamp": "2020-12-14T19:38:05,138Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e33ecad0776c", "message": "loaded module [analysis-common]" }
elasticsearch_1 | {"type": "server", "timestamp": "2020-12-14T19:38:05,140Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e33ecad0776c", "message": "loaded module [constant-keyword]" }
elasticsearch_1 | {"type": "server", "timestamp": "2020-12-14T19:38:05,140Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e33ecad0776c", "message": "loaded module [flattened]" }
elasticsearch_1 | {"type": "server", "timestamp": "2020-12-14T19:38:05,141Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e33ecad0776c", "message": "loaded module [frozen-indices]" }
elasticsearch_1 | {"type": "server", "timestamp": "2020-12-14T19:38:05,142Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e33ecad0776c", "message": "loaded module [ingest-common]" }
elasticsearch_1 | {"type": "server", "timestamp": "2020-12-14T19:38:05,142Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e33ecad0776c", "message": "loaded module [ingest-geoip]" }
elasticsearch_1 | {"type": "server", "timestamp": "2020-12-14T19:38:05,143Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e33ecad0776c", "message": "loaded module [ingest-user-agent]" }
elasticsearch_1 | {"type": "server", "timestamp": "2020-12-14T19:38:05,143Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e33ecad0776c", "message": "loaded module [kibana]" }
elasticsearch_1 | {"type": "server", "timestamp": "2020-12-14T19:38:05,145Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e33ecad0776c", "message": "loaded module [lang-expression]" }
elasticsearch_1 | {"type": "server", "timestamp": "2020-12-14T19:38:05,147Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e33ecad0776c", "message": "loaded module [lang-mustache]" }
elasticsearch_1 | {"type": "server", "timestamp": "2020-12-14T19:38:05,148Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e33ecad0776c", "message": "loaded module [lang-painless]" }
elasticsearch_1 | {"type": "server", "timestamp": "2020-12-14T19:38:05,148Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e33ecad0776c", "message": "loaded module [mapper-extras]" }
elasticsearch_1 | {"type": "server", "timestamp": "2020-12-14T19:38:05,149Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e33ecad0776c", "message": "loaded module [parent-join]" }
elasticsearch_1 | {"type": "server", "timestamp": "2020-12-14T19:38:05,149Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e33ecad0776c", "message": "loaded module [percolator]" }
elasticsearch_1 | {"type": "server", "timestamp": "2020-12-14T19:38:05,150Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e33ecad0776c", "message": "loaded module [rank-eval]" }
elasticsearch_1 | {"type": "server", "timestamp": "2020-12-14T19:38:05,150Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e33ecad0776c", "message": "loaded module [reindex]" }
elasticsearch_1 | {"type": "server", "timestamp": "2020-12-14T19:38:05,151Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e33ecad0776c", "message": "loaded module [repository-url]" }
elasticsearch_1 | {"type": "server", "timestamp": "2020-12-14T19:38:05,152Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e33ecad0776c", "message": "loaded module [search-business-rules]" }
elasticsearch_1 | {"type": "server", "timestamp": "2020-12-14T19:38:05,152Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e33ecad0776c", "message": "loaded module [searchable-snapshots]" }
elasticsearch_1 | {"type": "server", "timestamp": "2020-12-14T19:38:05,153Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e33ecad0776c", "message": "loaded module [spatial]" }
elasticsearch_1 | {"type": "server", "timestamp": "2020-12-14T19:38:05,153Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e33ecad0776c", "message": "loaded module [tasks]" }
elasticsearch_1 | {"type": "server", "timestamp": "2020-12-14T19:38:05,154Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e33ecad0776c", "message": "loaded module [transform]" }
elasticsearch_1 | {"type": "server", "timestamp": "2020-12-14T19:38:05,155Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e33ecad0776c", "message": "loaded module [transport-netty4]" }
elasticsearch_1 | {"type": "server", "timestamp": "2020-12-14T19:38:05,155Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e33ecad0776c", "message": "loaded module [vectors]" }
elasticsearch_1 | {"type": "server", "timestamp": "2020-12-14T19:38:05,156Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e33ecad0776c", "message": "loaded module [wildcard]" }
elasticsearch_1 | {"type": "server", "timestamp": "2020-12-14T19:38:05,156Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e33ecad0776c", "message": "loaded module [x-pack-analytics]" }
elasticsearch_1 | {"type": "server", "timestamp": "2020-12-14T19:38:05,156Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e33ecad0776c", "message": "loaded module [x-pack-async]" }
elasticsearch_1 | {"type": "server", "timestamp": "2020-12-14T19:38:05,157Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e33ecad0776c", "message": "loaded module [x-pack-async-search]" }
elasticsearch_1 | {"type": "server", "timestamp": "2020-12-14T19:38:05,157Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e33ecad0776c", "message": "loaded module [x-pack-autoscaling]" }
elasticsearch_1 | {"type": "server", "timestamp": "2020-12-14T19:38:05,158Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e33ecad0776c", "message": "loaded module [x-pack-ccr]" }
elasticsearch_1 | {"type": "server", "timestamp": "2020-12-14T19:38:05,158Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e33ecad0776c", "message": "loaded module [x-pack-core]" }
elasticsearch_1 | {"type": "server", "timestamp": "2020-12-14T19:38:05,159Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e33ecad0776c", "message": "loaded module [x-pack-data-streams]" }
elasticsearch_1 | {"type": "server", "timestamp": "2020-12-14T19:38:05,159Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e33ecad0776c", "message": "loaded module [x-pack-deprecation]" }
elasticsearch_1 | {"type": "server", "timestamp": "2020-12-14T19:38:05,159Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e33ecad0776c", "message": "loaded module [x-pack-enrich]" }
elasticsearch_1 | {"type": "server", "timestamp": "2020-12-14T19:38:05,160Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e33ecad0776c", "message": "loaded module [x-pack-eql]" }
elasticsearch_1 | {"type": "server", "timestamp": "2020-12-14T19:38:05,160Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e33ecad0776c", "message": "loaded module [x-pack-graph]" }
elasticsearch_1 | {"type": "server", "timestamp": "2020-12-14T19:38:05,161Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e33ecad0776c", "message": "loaded module [x-pack-identity-provider]" }
elasticsearch_1 | {"type": "server", "timestamp": "2020-12-14T19:38:05,161Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e33ecad0776c", "message": "loaded module [x-pack-ilm]" }
elasticsearch_1 | {"type": "server", "timestamp": "2020-12-14T19:38:05,162Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e33ecad0776c", "message": "loaded module [x-pack-logstash]" }
elasticsearch_1 | {"type": "server", "timestamp": "2020-12-14T19:38:05,162Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e33ecad0776c", "message": "loaded module [x-pack-ml]" }
elasticsearch_1 | {"type": "server", "timestamp": "2020-12-14T19:38:05,163Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e33ecad0776c", "message": "loaded module [x-pack-monitoring]" }
elasticsearch_1 | {"type": "server", "timestamp": "2020-12-14T19:38:05,164Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e33ecad0776c", "message": "loaded module [x-pack-ql]" }
elasticsearch_1 | {"type": "server", "timestamp": "2020-12-14T19:38:05,164Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e33ecad0776c", "message": "loaded module [x-pack-rollup]" }
elasticsearch_1 | {"type": "server", "timestamp": "2020-12-14T19:38:05,164Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e33ecad0776c", "message": "loaded module [x-pack-security]" }
elasticsearch_1 | {"type": "server", "timestamp": "2020-12-14T19:38:05,165Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e33ecad0776c", "message": "loaded module [x-pack-sql]" }
elasticsearch_1 | {"type": "server", "timestamp": "2020-12-14T19:38:05,165Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e33ecad0776c", "message": "loaded module [x-pack-stack]" }
elasticsearch_1 | {"type": "server", "timestamp": "2020-12-14T19:38:05,166Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e33ecad0776c", "message": "loaded module [x-pack-voting-only-node]" }
elasticsearch_1 | {"type": "server", "timestamp": "2020-12-14T19:38:05,166Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e33ecad0776c", "message": "loaded module [x-pack-watcher]" }
elasticsearch_1 | {"type": "server", "timestamp": "2020-12-14T19:38:05,167Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e33ecad0776c", "message": "no plugins loaded" }
elasticsearch_1 | {"type": "server", "timestamp": "2020-12-14T19:38:05,281Z", "level": "ERROR", "component": "o.e.b.ElasticsearchUncaughtExceptionHandler", "cluster.name": "docker-cluster", "node.name": "e33ecad0776c", "message": "uncaught exception in thread [main]",
elasticsearch_1 | "stacktrace": ["org.elasticsearch.bootstrap.StartupException: ElasticsearchException[failed to bind service]; nested: AccessDeniedException[/usr/share/elasticsearch/data/nodes];",
elasticsearch_1 | "at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:174) ~[elasticsearch-7.9.3.jar:7.9.3]",
elasticsearch_1 | "at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:161) ~[elasticsearch-7.9.3.jar:7.9.3]",
elasticsearch_1 | "at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) ~[elasticsearch-7.9.3.jar:7.9.3]",
elasticsearch_1 | "at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:127) ~[elasticsearch-cli-7.9.3.jar:7.9.3]",
elasticsearch_1 | "at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-cli-7.9.3.jar:7.9.3]",
elasticsearch_1 | "at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:126) ~[elasticsearch-7.9.3.jar:7.9.3]",
elasticsearch_1 | "at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92) ~[elasticsearch-7.9.3.jar:7.9.3]",
elasticsearch_1 | "Caused by: org.elasticsearch.ElasticsearchException: failed to bind service",
elasticsearch_1 | "at org.elasticsearch.node.Node.<init>(Node.java:695) ~[elasticsearch-7.9.3.jar:7.9.3]",
elasticsearch_1 | "at org.elasticsearch.node.Node.<init>(Node.java:277) ~[elasticsearch-7.9.3.jar:7.9.3]",
elasticsearch_1 | "at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:227) ~[elasticsearch-7.9.3.jar:7.9.3]",
elasticsearch_1 | "at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:227) ~[elasticsearch-7.9.3.jar:7.9.3]",
elasticsearch_1 | "at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:393) ~[elasticsearch-7.9.3.jar:7.9.3]",
elasticsearch_1 | "at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:170) ~[elasticsearch-7.9.3.jar:7.9.3]",
elasticsearch_1 | "... 6 more",
elasticsearch_1 | "Caused by: java.nio.file.AccessDeniedException: /usr/share/elasticsearch/data/nodes",
elasticsearch_1 | "at sun.nio.fs.UnixException.translateToIOException(UnixException.java:90) ~[?:?]",
elasticsearch_1 | "at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106) ~[?:?]",
elasticsearch_1 | "at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111) ~[?:?]",
elasticsearch_1 | "at sun.nio.fs.UnixFileSystemProvider.createDirectory(UnixFileSystemProvider.java:388) ~[?:?]",
elasticsearch_1 | "at java.nio.file.Files.createDirectory(Files.java:694) ~[?:?]",
elasticsearch_1 | "at java.nio.file.Files.createAndCheckIsDirectory(Files.java:801) ~[?:?]",
elasticsearch_1 | "at java.nio.file.Files.createDirectories(Files.java:787) ~[?:?]",
elasticsearch_1 | "at org.elasticsearch.env.NodeEnvironment.lambda$new$0(NodeEnvironment.java:274) ~[elasticsearch-7.9.3.jar:7.9.3]",
elasticsearch_1 | "at org.elasticsearch.env.NodeEnvironment$NodeLock.<init>(NodeEnvironment.java:211) ~[elasticsearch-7.9.3.jar:7.9.3]",
elasticsearch_1 | "at org.elasticsearch.env.NodeEnvironment.<init>(NodeEnvironment.java:271) ~[elasticsearch-7.9.3.jar:7.9.3]",
elasticsearch_1 | "at org.elasticsearch.node.Node.<init>(Node.java:344) ~[elasticsearch-7.9.3.jar:7.9.3]",
elasticsearch_1 | "at org.elasticsearch.node.Node.<init>(Node.java:277) ~[elasticsearch-7.9.3.jar:7.9.3]",
elasticsearch_1 | "at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:227) ~[elasticsearch-7.9.3.jar:7.9.3]",
elasticsearch_1 | "at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:227) ~[elasticsearch-7.9.3.jar:7.9.3]",
elasticsearch_1 | "at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:393) ~[elasticsearch-7.9.3.jar:7.9.3]",
elasticsearch_1 | "at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:170) ~[elasticsearch-7.9.3.jar:7.9.3]",
elasticsearch_1 | "... 6 more"] }
elasticsearch_1 | uncaught exception in thread [main]
elasticsearch_1 | ElasticsearchException[failed to bind service]; nested: AccessDeniedException[/usr/share/elasticsearch/data/nodes];
elasticsearch_1 | Likely root cause: java.nio.file.AccessDeniedException: /usr/share/elasticsearch/data/nodes
elasticsearch_1 | at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:90)
elasticsearch_1 | at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
elasticsearch_1 | at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
elasticsearch_1 | at java.base/sun.nio.fs.UnixFileSystemProvider.createDirectory(UnixFileSystemProvider.java:388)
elasticsearch_1 | at java.base/java.nio.file.Files.createDirectory(Files.java:694)
elasticsearch_1 | at java.base/java.nio.file.Files.createAndCheckIsDirectory(Files.java:801)
elasticsearch_1 | at java.base/java.nio.file.Files.createDirectories(Files.java:787)
elasticsearch_1 | at org.elasticsearch.env.NodeEnvironment.lambda$new$0(NodeEnvironment.java:274)
elasticsearch_1 | at org.elasticsearch.env.NodeEnvironment$NodeLock.<init>(NodeEnvironment.java:211)
elasticsearch_1 | at org.elasticsearch.env.NodeEnvironment.<init>(NodeEnvironment.java:271)
elasticsearch_1 | at org.elasticsearch.node.Node.<init>(Node.java:344)
elasticsearch_1 | at org.elasticsearch.node.Node.<init>(Node.java:277)
elasticsearch_1 | at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:227)
elasticsearch_1 | at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:227)
elasticsearch_1 | at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:393)
elasticsearch_1 | at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:170)
elasticsearch_1 | at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:161)
elasticsearch_1 | at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86)
elasticsearch_1 | at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:127)
elasticsearch_1 | at org.elasticsearch.cli.Command.main(Command.java:90)
elasticsearch_1 | at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:126)
elasticsearch_1 | at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92)
elasticsearch_1 | For complete error details, refer to the log at /usr/share/elasticsearch/logs/docker-cluster.log
proptrics_elasticsearch_1 exited with code 1
暂无答案!
目前还没有任何答案,快来回答吧!