docker安装8版本elasticsearch遇到的问题FileSystemException

docker安装8版本elasticsearch遇到的问题

Exception in thread "main" java.nio.file.FileSystemException: /usr/share/elasticsearch/config/elasticsearch.yml.vxt5sWMES_eRFvPQPfckLQ.tmp -> /usr/share/elasticsearch/config/elasticsearch.yml: Device or resource busy
	at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:100)
	at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
	at java.base/sun.nio.fs.UnixFileSystem.move(UnixFileSystem.java:874)
	at java.base/sun.nio.fs.UnixFileSystemProvider.move(UnixFileSystemProvider.java:309)
	at java.base/java.nio.file.Files.move(Files.java:1429)
	at org.elasticsearch.xpack.security.cli.AutoConfigureNode.fullyWriteFile(AutoConfigureNode.java:1127)
	at org.elasticsearch.xpack.security.cli.AutoConfigureNode.fullyWriteFile(AutoConfigureNode.java:1139)
	at org.elasticsearch.xpack.security.cli.AutoConfigureNode.execute(AutoConfigureNode.java:687)
	at org.elasticsearch.server.cli.ServerCli.autoConfigureSecurity(ServerCli.java:165)
	at org.elasticsearch.server.cli.ServerCli.execute(ServerCli.java:86)
	at org.elasticsearch.common.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:54)
	at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:85)
	at org.elasticsearch.cli.Command.main(Command.java:50)
	at org.elasticsearch.launcher.CliToolLauncher.main(CliToolLauncher.java:64)

以上是遇到的exception

重点在这:

Device or resource busy

这是8以后才有的问题

由于这个视频是观看谷粒商城时出的问题,所以其他大佬未必能从我这收益

解决问题

  1. 是否elasticsearch.yml里有http.host: 0.0.0.0?
  2. 是否对elasticsearch给足了权限?
    1. chmod -R 777 /mydata/elasticsearch/
  3. 8的特有问题解法:elasticsearch.yml里添加上:xpack.security.enabled: false
    1. echo "xpack.security.enabled: false" >> /mydata/elasticsearch/config/elasticsearch.yml

获取解法的原文地址:http://www.rply.cn/news/124098.html

posted @ 2023-07-17 17:56  海山了-  阅读(342)  评论(0编辑  收藏  举报