我正在使用一个docker图像,其中包含elasticsearch和kibana,我想添加一些本地文件到docker使用 volumes
,将此行添加到 docker-compose.yml
文件:
volumes:
- /home/myUsername/elasticsearch/config:/usr/share/elasticsearch/config
我跑的时候犯了这个错误 docker-compose up
:
[...]
elasticsearch | [2019-01-02T13:16:27,809][INFO ][o.e.p.PluginsService ] [node_1] loaded module [x-pack-watcher]
elasticsearch | [2019-01-02T13:16:27,810][INFO ][o.e.p.PluginsService ] [node_1] loaded plugin [ingest-geoip]
elasticsearch | [2019-01-02T13:16:27,813][INFO ][o.e.p.PluginsService ] [node_1] loaded plugin [ingest-user-agent]
elasticsearch | [2019-01-02T13:16:29,504][WARN ][o.e.b.ElasticsearchUncaughtExceptionHandler] [node_1] uncaught exception in thread [main]
elasticsearch | org.elasticsearch.bootstrap.StartupException: java.lang.RuntimeException: java.nio.file.NoSuchFileException: /usr/share/elasticsearch/config/ingest-geoip
elasticsearch | at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:140) ~[elasticsearch-6.3.1.jar:6.3.1]
elasticsearch | at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:127) ~[elasticsearch-6.3.1.jar:6.3.1]
elasticsearch | at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) ~[elasticsearch-6.3.1.jar:6.3.1]
elasticsearch | at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124) ~[elasticsearch-cli-6.3.1.jar:6.3.1]
elasticsearch | at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-cli-6.3.1.jar:6.3.1]
elasticsearch | at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:93) ~[elasticsearch-6.3.1.jar:6.3.1]
elasticsearch | at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:86) ~[elasticsearch-6.3.1.jar:6.3.1]
elasticsearch | Caused by: java.lang.RuntimeException: java.nio.file.NoSuchFileException: /usr/share/elasticsearch/config/ingest-geoip
elasticsearch | at org.elasticsearch.ingest.geoip.IngestGeoIpPlugin.getProcessors(IngestGeoIpPlugin.java:74) ~[?:?]
elasticsearch | at org.elasticsearch.ingest.IngestService.<init>(IngestService.java:49) ~[elasticsearch-6.3.1.jar:6.3.1]
elasticsearch | at org.elasticsearch.node.Node.<init>(Node.java:351) ~[elasticsearch-6.3.1.jar:6.3.1]
elasticsearch | at org.elasticsearch.node.Node.<init>(Node.java:252) ~[elasticsearch-6.3.1.jar:6.3.1]
elasticsearch | at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:213) ~[elasticsearch-6.3.1.jar:6.3.1]
elasticsearch | at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:213) ~[elasticsearch-6.3.1.jar:6.3.1]
elasticsearch | at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:326) ~[elasticsearch-6.3.1.jar:6.3.1]
elasticsearch | at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:136) ~[elasticsearch-6.3.1.jar:6.3.1]
elasticsearch | ... 6 more
elasticsearch | Caused by: java.nio.file.NoSuchFileException: /usr/share/elasticsearch/config/ingest-geoip
elasticsearch | at sun.nio.fs.UnixException.translateToIOException(UnixException.java:92) ~[?:?]
elasticsearch | at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111) ~[?:?]
elasticsearch | at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116) ~[?:?]
elasticsearch | at sun.nio.fs.UnixFileSystemProvider.newDirectoryStream(UnixFileSystemProvider.java:428) ~[?:?]
elasticsearch | at java.nio.file.Files.newDirectoryStream(Files.java:465) ~[?:?]
elasticsearch | at java.nio.file.Files.list(Files.java:3527) ~[?:?]
elasticsearch | at org.elasticsearch.ingest.geoip.IngestGeoIpPlugin.loadDatabaseReaders(IngestGeoIpPlugin.java:85) ~[?:?]
elasticsearch | at org.elasticsearch.ingest.geoip.IngestGeoIpPlugin.getProcessors(IngestGeoIpPlugin.java:72) ~[?:?]
elasticsearch | at org.elasticsearch.ingest.IngestService.<init>(IngestService.java:49) ~[elasticsearch-6.3.1.jar:6.3.1]
elasticsearch | at org.elasticsearch.node.Node.<init>(Node.java:351) ~[elasticsearch-6.3.1.jar:6.3.1]
elasticsearch | at org.elasticsearch.node.Node.<init>(Node.java:252) ~[elasticsearch-6.3.1.jar:6.3.1]
elasticsearch | at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:213) ~[elasticsearch-6.3.1.jar:6.3.1]
elasticsearch | at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:213) ~[elasticsearch-6.3.1.jar:6.3.1]
elasticsearch | at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:326) ~[elasticsearch-6.3.1.jar:6.3.1]
elasticsearch | at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:136) ~[elasticsearch-6.3.1.jar:6.3.1]
elasticsearch | ... 6 more
elasticsearch exited with code 1
我退房了 /usr/share/elasticsearch/config
找到了 ingest-geoip
已经在里面了:
sh-4.2# ls
elasticsearch.yml ingest-geoip jvm.options log4j2.properties role_mapping.yml roles.yml users users_roles
我做错什么了吗?
暂无答案!
目前还没有任何答案,快来回答吧!