2017-01-31 6 views
1

CentOS VMゲストon Win10ホスト。 x-packの場合はinstallation guideに従うように試みます(そしてtraining courseからステップバイステップ)。 ESとKは正常に動作しますが、x-packプラグインがインストールされると、キバナが起動します(ESが見つからないと訴えます)。 3と同じエラーが発生しますが、プロダクション設定ではなくローカルVMで表示されます。x-packをインストールするとelasticsearchが実行されなくなる

[2017-01-31T16:52:03,191][ERROR][o.e.b.Bootstrap   ] Exception 
org.elasticsearch.ElasticsearchException: Failed to load plugin class [org.elasticsearch.xpack.XPackPlugin] 
     at org.elasticsearch.plugins.PluginsService.loadPlugin(PluginsService.java:384) ~[elasticsearch-5.1.1.jar:5.1.1] 
     at org.elasticsearch.plugins.PluginsService.loadBundles(PluginsService.java:336) ~[elasticsearch-5.1.1.jar:5.1.1] 
     at org.elasticsearch.plugins.PluginsService.<init>(PluginsService.java:132) ~[elasticsearch-5.1.1.jar:5.1.1] 
     at org.elasticsearch.node.Node.<init>(Node.java:294) ~[elasticsearch-5.1.1.jar:5.1.1] 
     at org.elasticsearch.node.Node.<init>(Node.java:229) ~[elasticsearch-5.1.1.jar:5.1.1] 
     at org.elasticsearch.bootstrap.Bootstrap$6.<init>(Bootstrap.java:214) ~[elasticsearch-5.1.1.jar:5.1.1] 
     at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:214) ~[elasticsearch-5.1.1.jar:5.1.1] 
     at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:306) [elasticsearch-5.1.1.jar:5.1.1] 
     at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:121) [elasticsearch-5.1.1.jar:5.1.1] 
     at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:112) [elasticsearch-5.1.1.jar:5.1.1] 
     at org.elasticsearch.cli.SettingCommand.execute(SettingCommand.java:54) [elasticsearch-5.1.1.jar:5.1.1] 
     at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:96) [elasticsearch-5.1.1.jar:5.1.1] 
     at org.elasticsearch.cli.Command.main(Command.java:62) [elasticsearch-5.1.1.jar:5.1.1] 
     at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:89) [elasticsearch-5.1.1.jar:5.1.1] 
     at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:82) [elasticsearch-5.1.1.jar:5.1.1] 
Caused by: java.lang.reflect.InvocationTargetException 
     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?] 
     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:?] 
     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?] 
     at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_111] 
     at org.elasticsearch.plugins.PluginsService.loadPlugin(PluginsService.java:373) ~[elasticsearch-5.1.1.jar:5.1.1] 
     ... 14 more 
Caused by: java.nio.file.AccessDeniedException: /etc/elasticsearch/x-pack/system_key 
     at sun.nio.fs.UnixException.translateToIOException(UnixException.java:84) ~[?:?] 
     at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) ~[?:?] 
     at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) ~[?:?] 
     at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:214) ~[?:?] 
     at java.nio.file.Files.newByteChannel(Files.java:361) ~[?:1.8.0_111] 
     at java.nio.file.Files.newByteChannel(Files.java:407) ~[?:1.8.0_111] 
     at java.nio.file.Files.readAllBytes(Files.java:3152) ~[?:1.8.0_111] 
     at org.elasticsearch.xpack.security.crypto.CryptoService.readSystemKey(CryptoService.java:160) ~[?:?] 
     at org.elasticsearch.xpack.security.crypto.CryptoService.<init>(CryptoService.java:112) ~[?:?] 
     at org.elasticsearch.xpack.security.Security.<init>(Security.java:191) ~[?:?] 
     at org.elasticsearch.xpack.XPackPlugin.<init>(XPackPlugin.java:193) ~[?:?] 
     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?] 
     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:?] 
     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?] 
     at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_111] 
     at org.elasticsearch.plugins.PluginsService.loadPlugin(PluginsService.java:373) ~[elasticsearch-5.1.1.jar:5.1.1] 
     ... 14 more 
[2017-01-31T16:52:03,215][WARN ][o.e.b.ElasticsearchUncaughtExceptionHandler] [elkmaster1] uncaught exception in thread [main] 
org.elasticsearch.bootstrap.StartupException: ElasticsearchException[Failed to load plugin class [org.elasticsearch.xpack.XPackPlugin]]; nested: InvocationTargetException; nested: AccessDeniedException[/etc/elasticsearch/x-pack/system_key]; 
     at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:125) ~[elasticsearch-5.1.1.jar:5.1.1] 
     at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:112) ~[elasticsearch-5.1.1.jar:5.1.1] 
     at org.elasticsearch.cli.SettingCommand.execute(SettingCommand.java:54) ~[elasticsearch-5.1.1.jar:5.1.1] 
     at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:96) ~[elasticsearch-5.1.1.jar:5.1.1] 
     at org.elasticsearch.cli.Command.main(Command.java:62) ~[elasticsearch-5.1.1.jar:5.1.1] 
     at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:89) ~[elasticsearch-5.1.1.jar:5.1.1] 
     at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:82) ~[elasticsearch-5.1.1.jar:5.1.1] 
Caused by: org.elasticsearch.ElasticsearchException: Failed to load plugin class [org.elasticsearch.xpack.XPackPlugin] 
     at org.elasticsearch.plugins.PluginsService.loadPlugin(PluginsService.java:384) ~[elasticsearch-5.1.1.jar:5.1.1] 
     at org.elasticsearch.plugins.PluginsService.loadBundles(PluginsService.java:336) ~[elasticsearch-5.1.1.jar:5.1.1] 
     at org.elasticsearch.plugins.PluginsService.<init>(PluginsService.java:132) ~[elasticsearch-5.1.1.jar:5.1.1] 
     at org.elasticsearch.node.Node.<init>(Node.java:294) ~[elasticsearch-5.1.1.jar:5.1.1] 
     at org.elasticsearch.node.Node.<init>(Node.java:229) ~[elasticsearch-5.1.1.jar:5.1.1] 
     at org.elasticsearch.bootstrap.Bootstrap$6.<init>(Bootstrap.java:214) ~[elasticsearch-5.1.1.jar:5.1.1] 
     at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:214) ~[elasticsearch-5.1.1.jar:5.1.1] 
     at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:306) ~[elasticsearch-5.1.1.jar:5.1.1] 
     at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:121) ~[elasticsearch-5.1.1.jar:5.1.1] 
     ... 6 more 
Caused by: java.lang.reflect.InvocationTargetException 
     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?] 
     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:?] 
     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?] 
     at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_111] 
     at org.elasticsearch.plugins.PluginsService.loadPlugin(PluginsService.java:373) ~[elasticsearch-5.1.1.jar:5.1.1] 
     at org.elasticsearch.plugins.PluginsService.loadBundles(PluginsService.java:336) ~[elasticsearch-5.1.1.jar:5.1.1] 
     at org.elasticsearch.plugins.PluginsService.<init>(PluginsService.java:132) ~[elasticsearch-5.1.1.jar:5.1.1] 
     at org.elasticsearch.node.Node.<init>(Node.java:294) ~[elasticsearch-5.1.1.jar:5.1.1] 
     at org.elasticsearch.node.Node.<init>(Node.java:229) ~[elasticsearch-5.1.1.jar:5.1.1] 
     at org.elasticsearch.bootstrap.Bootstrap$6.<init>(Bootstrap.java:214) ~[elasticsearch-5.1.1.jar:5.1.1] 
     at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:214) ~[elasticsearch-5.1.1.jar:5.1.1] 
     at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:306) ~[elasticsearch-5.1.1.jar:5.1.1] 
     at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:121) ~[elasticsearch-5.1.1.jar:5.1.1] 
     ... 6 more 
Caused by: java.nio.file.AccessDeniedException: /etc/elasticsearch/x-pack/system_key 
     at sun.nio.fs.UnixException.translateToIOException(UnixException.java:84) ~[?:?] 
     at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) ~[?:?] 
     at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) ~[?:?] 
     at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:214) ~[?:?] 
     at java.nio.file.Files.newByteChannel(Files.java:361) ~[?:1.8.0_111] 
     at java.nio.file.Files.newByteChannel(Files.java:407) ~[?:1.8.0_111] 
     at java.nio.file.Files.readAllBytes(Files.java:3152) ~[?:1.8.0_111] 
     at org.elasticsearch.xpack.security.crypto.CryptoService.readSystemKey(CryptoService.java:160) ~[?:?] 
     at org.elasticsearch.xpack.security.crypto.CryptoService.<init>(CryptoService.java:112) ~[?:?] 
     at org.elasticsearch.xpack.security.Security.<init>(Security.java:191) ~[?:?] 
     at org.elasticsearch.xpack.XPackPlugin.<init>(XPackPlugin.java:193) ~[?:?] 
     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?] 
     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:?] 
     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?] 
     at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_111] 
     at org.elasticsearch.plugins.PluginsService.loadPlugin(PluginsService.java:373) ~[elasticsearch-5.1.1.jar:5.1.1] 
     at org.elasticsearch.plugins.PluginsService.loadBundles(PluginsService.java:336) ~[elasticsearch-5.1.1.jar:5.1.1] 
     at org.elasticsearch.plugins.PluginsService.<init>(PluginsService.java:132) ~[elasticsearch-5.1.1.jar:5.1.1] 
     at org.elasticsearch.node.Node.<init>(Node.java:294) ~[elasticsearch-5.1.1.jar:5.1.1] 
     at org.elasticsearch.node.Node.<init>(Node.java:229) ~[elasticsearch-5.1.1.jar:5.1.1] 
     at org.elasticsearch.bootstrap.Bootstrap$6.<init>(Bootstrap.java:214) ~[elasticsearch-5.1.1.jar:5.1.1] 
     at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:214) ~[elasticsearch-5.1.1.jar:5.1.1] 
     at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:306) ~[elasticsearch-5.1.1.jar:5.1.1] 
     at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:121) ~[elasticsearch-5.1.1.jar:5.1.1] 
    ... 6 more 

答えて

0

さてここでログの末尾ですログには

が含まれているため
Caused by: java.nio.file.AccessDeniedException: 

問題はおそらくユーザーのアクセス許可です。このディレクトリの所有者は誰ですか?

/etc/elasticsearch/x-pack 

ls -l /etc/elasticsearch/x-packから出力するものは何ですか?

sudo権限を持っているか、root権限を持っている場合は、このディレクトリの所有権を変更するだけです。

+0

ありがとう!これは確実な一歩でした。 system_keyファイルは '-rw -------でした。 1 root root 128 Dec 9 16:29 system_key'だからchmod 604ファイルに少なくとも弾力性のための読み取り権を取得し、サービスを開始することができました。既定のユーザーアカウントはまだログインしていませんが、適切なアクセス許可をさらに見直してください。これは確かに主な問題を解決するのに役立ちました。 –

+0

それは鍵であるので、 'sudo chown elastic:elastic system.key'を使って所有権を弾力的に変更する方が良いです。ほとんどのセキュリティプログラムは、権限セットをチェックします。私は他人に読書のアクセスを与えないことを勧めます。これはあなたのために働くはずです。 HTH – cinhtau

+0

が理解され、検証されます。 chmodは問題領域を証明することでした...しかし、「ローカルリダイレクトが多すぎます」ので、より多くのノードがトラブルシューティングできるようにプラットフォームを変更する必要があります。 –

1

はそれを試してみる:

  1. オープンのconfig/elasticsearch.ymlファイル
  2. 変更xpack構成行

xpack.security.enabled: false xpack.graph.enabled: false xpack.watcher.enabled: false

0

問題は、elasitcsearchとx-packのインストールに使用したユーザーアカウントの問題です。同じアカウントを使用し、正しい権限を持っていることを確認してください!

chownを使用してアクセスを許可したい場合があります。

関連する問題