Legacy Knowledge Base
公開されました Jun. 30, 2025

設定ファイル経由でelasticsearchに接続する際に発生する問題

Written By

Pooja Bhambani

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

問題

  • 設定ファイルを参考にエラスティックサーチを接続する際、Liferayのコンソールで以下のエラーが発生します。
    ERROR [liferay/monitoring-3][ParallelDestination:59] Unable to process message {destinationName=liferay/monitoring, response=null, responseDestinationName=null, responseId=null, payload=[{displayName=Sign In, portletId=com_liferay_login_web_portlet_LoginPortlet, requestType=ACTION, {attributes=null, companyId=20096, groupId=20119, description=null, duration=0, name=com_liferay_login_web_portlet_LoginPortlet, namespace=com.liferay.monitoring.Portlet, requestStatus=null, stopWatch=0:00:01.590, timeout=0, user=null}}, {referer=http://localhost:8080/client, remoteAddr=127.0.0.1, requestURL=, statusCode=0, userAgent=Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36, {attributes=null, companyId=20096, groupId=20119, description=null, duration=1604, name=/c/portal/layout, namespace=com.liferay.monitoring.Portal, requestStatus=ERROR, stopWatch=0:00:01.604, timeout=-1, user=null}}, {referer=http://localhost:8080/client, remoteAddr=127.0.0.1, requestURL=, statusCode=0, userAgent=Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36, {attributes=null, companyId=20096, groupId=0, description=null, duration=1647, name=/web/guest/home, namespace=com.liferay.monitoring.Portal, requestStatus=ERROR, stopWatch=0:00:01.647, timeout=-1, user=null}}], values={defaultLocale=en_US, companyId=20096, groupId=0, principalName=20099, permissionChecker=com.liferay.portal.kernel.util.TransientValue@5597a3e1, siteDefaultLocale=en_US, themeDisplayLocale=en_US}}
    com.liferay.portal.kernel.messaging.MessageListenerException: java.lang.NullPointerException
    at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:41) ~[portal-kernel.jar:?]
    at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:74) ~[portal-kernel.jar:?]
    at com.liferay.portal.messaging.internal.ParallelDestination$1.run(ParallelDestination.java:56) [bundleFile:?]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_341]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_341]
    at java.lang.Thread.run(Thread.java:750) [?:1.8.0_341]
    Caused by: java.lang.NullPointerException

    at com.liferay.portal.monitoring.internal.statistics.portlet.PortletStatistics.processDataSample(PortletStatistics.java:112) ~[?:?]
    at com.liferay.portal.monitoring.internal.statistics.portlet.CompanyStatistics.processDataSample(CompanyStatistics.java:209) ~[?:?]
    at com.liferay.portal.monitoring.internal.statistics.portlet.ServerStatistics.processDataSample(ServerStatistics.java:118) ~[?:?]
    at com.liferay.portal.monitoring.internal.statistics.portlet.ServerStatistics.processDataSample(ServerStatistics.java:36) ~[?:?]
    at com.liferay.portal.monitoring.internal.messaging.MonitoringMessageListener.processDataSample(MonitoringMessageListener.java:89) ~[?:?]
    at com.liferay.portal.monitoring.internal.messaging.MonitoringMessageListener.doReceive(MonitoringMessageListener.java:131) ~[?:?]
    at com.liferay.portal.kernel.messaging.BaseMessageListener.doReceive(BaseMessageListener.java:48) ~[portal-kernel.jar:?]
    at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:34) ~[portal-kernel.jar:?]
    ... 5 more

Environment

  • Liferay DXP 7.4
  • Elasticsearch バージョン7.17.9

解決策

  • NullPointerException' は `_truststorePassword.toCharArray()` この 行のメソッドから発生しています。エクスポートされた config にこの値が含まれていないため、値は null となります。
  • この問題を解決するには、ユーザーは設定ファイルをOSGi/configsフォルダに置く前に、パスワードを追加する必要があります。
  • 注: Authentication Enabledオプションがオンになっている場合は、Elasticsearchユーザーのパスワードを`password=`、SSL証明書を暗号化に使用している場合は`truststorePassword=`を追加してください。

追加情報

  • 報告された問題のさらなる説明は、パスワードの値が CONFIGURATION_ テーブルに保存されておらず、そのため .config ファイルにエクスポートされないということです。 この背景には、セキュリティ上の問題から、設定ファイルにパスワードを保存してはいけないという理由があります。 したがって、パスワードがマスクされているため、コントロールパネル(UI)から設定することが推奨されます。
Did this article resolve your issue ?

Legacy Knowledge Base