[Solved] Docker Elasticsearch8.4.0 Error: Exception in thread “main” java.nio.file.FileSystemException

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 useful resource busy
	at java.base/solar.nio.fs.UnixException.translateToIOException(UnixException.java:100)
	at java.base/solar.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
	at java.base/solar.nio.fs.UnixCopyFile.transfer(UnixCopyFile.java:416)
	at java.base/solar.nio.fs.UnixFileSystemProvider.transfer(UnixFileSystemProvider.java:266)
	at java.base/java.nio.file.Files.transfer(Files.java:1432)
	at org.elasticsearch.xpack.safety.cli.AutoConfigureNode.fullyWriteFile(AutoConfigureNode.java:1127)
	at org.elasticsearch.xpack.safety.cli.AutoConfigureNode.fullyWriteFile(AutoConfigureNode.java:1139)
	at org.elasticsearch.xpack.safety.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.widespread.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:54)
	at org.elasticsearch.cli.Command.mainWithoutErrorDealing with(Command.java:85)
	at org.elasticsearch.cli.Command.foremost(Command.java:50)
	at org.elasticsearch.launcher.CliToolLauncher.foremost(CliToolLauncher.java:64)

Cause: it’s estimated that there’s a drawback with the mounting of the configuration file

My resolution: when docker begins, it may well run efficiently with out mounting the configuration file

1. The handle bar can not entry port 9200

It must be added in elasticsearch.yml in the container

http.host: 0.0.0.0

2. After the above methodology is configured, you want to enter the account password to entry the 9200 port

After discovering some options, you want to configure the next contents in the configuration file in the container

xpack.secruity.enabled: false

After restarting the container, ES will be run efficiently

Note: VIM must be put in earlier than modifying the information in the container

Leave a Reply

Your email address will not be published.