Elasticsearch单机多实例环境部署(4)

1 [root@CloudGame bin]# ./elasticsearch -d -Des.path.conf=/etc/esconf/esins1 -p /etc/esconf/esins1.pid 2 [root@CloudGame bin]# Exception in thread "main" Java.lang.RuntimeException: don't run elasticsearch as root. 3 at org.elasticsearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:93) 4 at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:144) 5 at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:270) 6 at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35) 7 Refer to the log for complete error details.

哟,错了啊,不能用root启动es,见鬼,再来一次吧。

1 [water@CloudGame bin]$ ./elasticsearch -d -Des.path.conf=/etc/esconf/esins1 -p /etc/esconf/esins1.pid 2 [water@CloudGame bin]$ Exception in thread "main" SettingsException[Failed to open stream for url [/etc/esconf/esins1/elasticsearch.yml]]; nested: AccessDeniedException[/etc/esconf/esins1/elasticsearch.yml]; 3 Likely root cause: java.nio.file.AccessDeniedException: /etc/esconf/esins1/elasticsearch.yml 4 at sun.nio.fs.UnixException.translateToIOException(UnixException.java:84) 5 at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) 6 at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) 7 at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:214) 8 at java.nio.file.Files.newByteChannel(Files.java:317) 9 at java.nio.file.Files.newByteChannel(Files.java:363) 10 at java.nio.file.spi.FileSystemProvider.newInputStream(FileSystemProvider.java:380) 11 at java.nio.file.Files.newInputStream(Files.java:108) 12 at org.elasticsearch.common.settings.Settings$Builder.loadFromPath(Settings.java:1067) 13 at org.elasticsearch.node.internal.InternalSettingsPreparer.prepareEnvironment(InternalSettingsPreparer.java:88) 14 at org.elasticsearch.bootstrap.Bootstrap.initialSettings(Bootstrap.java:202) 15 at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:241) 16 at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35) 17 Refer to the log for complete error details.

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/2030475b8e773ed6e441fb50530b1afa.html