OnCommand Insight ElasticSearch サービスが「 AccessDenied 」例外で開始できませんでした
環境
- OnCommand Insight 7.3.x
- Red Hat Enterprise Linux 7.x
- CentOS 7.x
問題
ElasticSearch サービスが開始されると、「アクセスが拒否されました」という例外が発生して失敗します。
- ElasticSearch サービスが実行されていません。
[root@netapp-oci-lin ~]# oci-service.sh
OnCommand (R) Insight 7.3.9
mysql...............running
elasticsearch.......not running
wildfly.............running
acquisition.........running
- サービスを開始すると、コマンドラインインターフェイス( CLI )およびジャーナルのチェック時に、次のいずれかのエラーが表示されます。
例1:[root@ocirhel ~]# systemctl start elasticsearch
Job for elasticsearch.service failed because the control process exited with error code. See "systemctl status elasticsearch.service" and "journalctl -xe" for details.
Sep 11 19:28:27 ocirhel systemd[6445]: Failed at step USER spawning /usr/share/elasticsearch/bin/elasticsearch-systemd-pre-exec: No such process
-- Subject: Process /usr/share/elasticsearch/bin/elasticsearch-systemd-pre-exec could not be executed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman.../systemd-devel
-- The process /usr/share/elasticsearch/bin/elasticsearch-systemd-pre-exec could not be executed and failed.
--
-- The error number returned by this process is 3.
例 2 (チェック時) journalctl -xe
Sep 11 19:54:07 ocirhel polkitd[735]: Unregistered Authentication Agent for unix-process:5469:138302 (system bus name :1.61, object path /org/freedesktop/PolicyKit1/AuthenticationA
Sep 11 19:54:08 ocirhel elasticsearch[5478]: 2018-09-11 19:54:08,124 main ERROR Could not register mbeans java.security.AccessControlException: access denied ("javax.management.MBe
...
Sep 11 19:54:08 ocirhel elasticsearch[5478]: Exception in thread "main" org.elasticsearch.bootstrap.BootstrapException: java.nio.file.AccessDeniedException: /etc/elasticsearch
:例 3 (チェック時 journalctl -xe
):
Sep 11 19:57:51 ocirhel elasticsearch[5836]: Exception in thread "main" org.elasticsearch.bootstrap.BootstrapException: java.nio.file.AccessDeniedException: /var/run/elasticsearch
Sep 11 19:57:51 ocirhel elasticsearch[5836]: Likely root cause: java.nio.file.AccessDeniedException: /var/run/elasticsearch
例 4 :
# systemctl status elasticsearch
...
Apr 21 20:34:54 ocirhel systemd[1]: elasticsearch.service: main process exited, code=exited, status=1/FAILURE
Apr 21 20:34:54 ocirhel systemd[1]: Unit elasticsearch.service entered failed state.
Apr 21 20:34:54 ocirhel systemd[1]: elasticsearch.service failed.
#journalctl -xe
...
Apr 23 14:02:14 ocirhel elasticsearch[4106]: Exception in thread "main" java.nio.file.AccessDeniedException: /etc/elasticsearch/scripts_rpmsave
Apr 23 14:02:14 ocirhel elasticsearch[4106]: at sun.nio.fs.UnixException.translateToIOException(UnixException.java:84)
Apr 23 14:02:14 ocirhel elasticsearch[4106]: at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
Apr 23 14:02:14 ocirhel elasticsearch[4106]: at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
Apr 23 14:02:14 ocirhel elasticsearch[4106]: at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:214)
Apr 23 14:02:14 ocirhel elasticsearch[4106]: at java.nio.file.Files.newByteChannel(Files.java:361)
Apr 23 14:02:14 ocirhel elasticsearch[4106]: at java.nio.file.Files.newByteChannel(Files.java:407)
Apr 23 14:02:14 ocirhel elasticsearch[4106]: at java.nio.file.spi.FileSystemProvider.newInputStream(FileSystemProvider.java:384)
Apr 23 14:02:14 ocirhel elasticsearch[4106]: at java.nio.file.Files.newInputStream(Files.java:152)
Apr 23 14:02:14 ocirhel elasticsearch[4106]: at org.elasticsearch.tools.launchers.JvmOptionsParser.main(JvmOptionsParser.java:60)
Apr 23 14:02:14 ocirhel systemd[1]: elasticsearch.service: main process exited, code=exited, status=1/FAILURE
Apr 23 14:02:14 ocirhel systemd[1]: Unit elasticsearch.service entered failed state.