Exception in thread "main" java.nio.file.: /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以后才有的问题
由于这个视频是观看谷粒商城时出的问题,所以其他大佬未必能从我这收益
解决问题
- 是否elasticsearch.yml里有
http.host: 0.0.0.0
? - 是否对elasticsearch给足了权限?
- chmod -R 777 /mydata/elasticsearch/
- 8的特有问题解法:elasticsearch.yml里添加上:xpack.security.enabled: false
echo "xpack.security.enabled: false" >> /mydata/elasticsearch/config/elasticsearch.yml
转载自https://www.cnblogs.com/seamount3/p/17560829.html
标签:FileSystemException,java,cli,AutoConfigureNode,elasticsearch,org,报错,nio From: https://www.cnblogs.com/wuxizhangjf/p/17771328.html