Exception in thread "main" java.nio.file.FileSystemException: /usr/share/elasticsearch/config/elasticsearch.yml.Dym72YkCRZ-GMAliqWE2IA.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.UnixCopyFile.move(UnixCopyFile.java:416)
at java.base/sun.nio.fs.UnixFileSystemProvider.move(UnixFileSystemProvider.java:266)
at java.base/java.nio.file.Files.move(Files.java:1432)
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:161)
at org.elasticsearch.server.cli.ServerCli.execute(ServerCli.java:85)
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)
原因:估計是配置文件的掛載有問題
我的解決方法:docker 啟動時先不加配置文件的掛載,就能成功運(yùn)行
1、地址欄無法訪問9200端口
需要在容器內(nèi)的elasticsearch.yml中加入
http.host: 0.0.0.0
2、上述方法配置后,訪問9200端口需要輸入賬號密碼
查找了一些解決辦法后,需要在容器內(nèi)的配置文件內(nèi)配置如下內(nèi)容
xpack.secruity.enabled: false
這樣重啟容器之后便能成功運(yùn)行es
注:編輯容器內(nèi)文件時需要先安裝vim文章來源:http://www.zghlxwxcb.cn/news/detail-535606.html
以上是我在安裝過程中遇到的問題及相應(yīng)的解決辦法,如果有遇到同樣問題的朋友,有更優(yōu)雅的解決辦法的話,歡迎留言~文章來源地址http://www.zghlxwxcb.cn/news/detail-535606.html
到了這里,關(guān)于Docker 運(yùn)行Elasticsearch8.4.0報錯FileSystemException的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!