2017-01-31 4 views
1

CentOS VM 게스트가 Win10 호스트에 있습니다. x-pack의 경우 installation guide을 따르려고 시도합니다 (및 training course의 단계별 단계). ES와 K는 정상적으로 작동하지만 일단 x-pack 플러그인이 설치되면 kibana가 시작되고 ES가 누락되었다고 불평하면 괜찮습니다. 그러면 탄성 검색이 시작되고 즉시 실패합니다. 3과 같은 오류가 있지만 로컬 VM에서는 프로덕션 설정이 아닙니다.x-pack을 설치하면 elastic search가 실행되지 않습니다.

[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 권한이 있거나 루트 권한이있는 경우이 디렉토리의 소유권을 변경할 수 있습니다.

+0

감사합니다! 이것은 확실한 진일보였습니다. system_key 파일은'-rw -------. 1 루트 루트 128 12 월 9 일 16시 29 분 system_key' 그래서 chmod 604 파일에 적어도 탄성에 대한 권리를 읽고, 서비스를 시작할 수있었습니다. 기본 사용자 계정은 아직 로그인하지 않았지만 올바른 권한을 자세히 검토하지 않습니다. 이것은 확실히 주된 문제를 해결하는 데 도움이되었습니다. –

+0

키이므로 소유권을 'sudo chown elastic : elastic system.key'로 변경하여 탄력성을 높이는 것이 좋습니다. 대부분의 보안 프로그램은 권한 집합을 확인합니다. 다른 사람들에게 읽기 액세스 권한을 부여하지 않을 것을 권장합니다. 이것은 당신을 위해 작동해야합니다. HTH – cinhtau

+0

을 이해하고 확인할 것입니다. chmod는 문제 영역을 증명하는 것이 었습니다 ... 그러나 '너무 많은 로컬 리디렉션'을 가지고 있으므로 더 많은 노드가 문제를 해결할 수 있도록 플랫폼을 변경해야 할 수 있습니다. –

1

이 그것을 밖으로 시도 :

  1. 공개 설정/elasticsearch.yml 파일
  2. 변화 xpack 구성 라인

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

0

문제는 elasitcsearch 및 x-pack을 설치하는 데 사용한 사용자 계정 때문입니다. 동일한 계정을 사용하고 올바른 권한을 보유하고 있는지 확인하십시오!

chown을 사용하여 액세스 권한을 부여 할 수 있습니다.