Docker Caused by: java.nio.file.AccessDeniedException: /usr/share/elasticsearch/plugins/ik-analyzer/plugin-descriptor.properties

The following error occurs when using the installation Elasticsearch Docker's IK-Analyzer Chinese word breaker

Error message: Caused by: java.nio.file.AccessDeniedException: /usr/share/elasticsearch/plugins/ik-analyzer/plugin-descriptor.properties

Cause: After the copy IK-analzyer Chinese word elasticsearch to plug in, reboot Docker vessel reported the following error:

Caused by: java.nio.file.AccessDeniedException: /usr/share/elasticsearch/plugins/ik-analyzer/plugin-descriptor.properties
    at sun.nio.fs.UnixException.translateToIOException(UnixException.java:84) ~[?:1.8.0_181]
    at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) ~[?:1.8.0_181]
    at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) ~[?:1.8.0_181]
    at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:214) ~[?:1.8.0_181]
    at java.nio.file.Files.newByteChannel(Files.java:361) ~[?:1.8.0_181]
    at java.nio.file.Files.newByteChannel(Files.java:407) ~[?:1.8.0_181]
    at java.nio.file.spi.FileSystemProvider.newInputStream(FileSystemProvider.java:384) ~[?:1.8.0_181]
    at java.nio.file.Files.newInputStream(Files.java:152) ~[?:1.8.0_181]
    at org.elasticsearch.plugins.PluginInfo.readFromProperties(PluginInfo.java:114) ~[elasticsearch-5.6.12.jar:5.6.12]
    at org.elasticsearch.bootstrap.Spawner.spawnNativePluginControllers(Spawner.java:80) ~[elasticsearch-5.6.12.jar:5.6.12]
    at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:168) ~[elasticsearch-5.6.12.jar:5.6.12]
    at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:342) ~[elasticsearch-5.6.12.jar:5.6.12]
    at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:132) ~[elasticsearch-5.6.12.jar:5.6.12]
    ... 6 more

 

The reason: lack of directory permissions within the target vessel

Solution: can give 777 first host plug-in directory, then copy

$ Sudo  chmod -R 777 / Users / yans / Downloads / I- analyzer (插件目录)
 $ sudo docker cp / Users / yans / Downloads / I-analyzer容器ID: / usr / share / elasticsearch / plugins / I-analyzer

After the restart of the container

$ Docker start container ID

 

Guess you like

Origin www.cnblogs.com/eanson/p/12396981.html