When starting Elasticsearch using elasticsearch.bat, I’m seeing the following errors related to plugin types:
2024-07-09 16:27:58,817 main ERROR Unable to locate plugin type for IfFileName
2024-07-09 16:27:58,823 main ERROR Unable to locate plugin type for IfFileName
2024-07-09 16:27:58,843 main ERROR Unable to locate plugin for IfAccumulatedFileSize
2024-07-09 16:27:58,844 main ERROR Unable to locate plugin for IfFileName
These errors indicate that Elasticsearch is unable to locate necessary plugins (IfFileName and IfAccumulatedFileSize) required for log rolling policies.
Ownership Mismatch Warning:
I also get a warning:
Aborting auto configuration because of config dir ownership mismatch. Config dir is owned by BUILTINAdministrators but auto-configuration directory would be owned by DESKTOP-9RS8J15Lenovo
This warning suggests a directory ownership conflict where Elasticsearch’s configuration directory has differing ownership permissions between BUILTINAdministrators and DESKTOP-9RS8J15Lenovo.
Here’s a snippet from my log4j2.properties configuration file (log4j2.properties):
######## Server JSON ############################
appender.rolling.type = RollingFile
appender.rolling.name = rolling
appender.rolling.fileName = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs.cluster_name}_server.json
appender.rolling.layout.type = ECSJsonLayout
appender.rolling.layout.dataset = elasticsearch.server
appender.rolling.filePattern = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs.cluster_name}-%d{yyyy-MM-dd}-%i.json.gz
appender.rolling.policies.type = Policies
appender.rolling.policies.time.type = TimeBasedTriggeringPolicy
appender.rolling.policies.time.interval = 1
appender.rolling.policies.time.modulate = true
appender.rolling.policies.size.type = SizeBasedTriggeringPolicy
appender.rolling.policies.size.size = 128MB
appender.rolling.strategy.type = DefaultRolloverStrategy
appender.rolling.strategy.fileIndex = nomax
appender.rolling.strategy.action.type = Delete
appender.rolling.strategy.action.basepath = ${sys:es.logs.base_path}
appender.rolling.strategy.action.condition.type = IfFileName
appender.rolling.strategy.action.condition.glob = ${sys:es.logs.cluster_name}-*
appender.rolling.strategy.action.condition.nested_condition.type = IfAccumulatedFileSize
appender.rolling.strategy.action.condition.nested_condition.exceeds = 2GB
######## Server - old style pattern ###########
appender.rolling_old.type = RollingFile
appender.rolling_old.name = rolling_old
appender.rolling_old.fileName = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs.cluster_name}.log
appender.rolling_old.layout.type = PatternLayout
appender.rolling_old.layout.pattern = [%d{ISO8601}][%-5p][%-25c{1.}] [%node_name]%marker %m%n
appender.rolling_old.filePattern = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs.cluster_name}-%d{yyyy-MM-dd}-%i.log.gz
appender.rolling_old.policies.type = Policies
appender.rolling_old.policies.time.type = TimeBasedTriggeringPolicy
appender.rolling_old.policies.time.interval = 1
appender.rolling_old.policies.time.modulate = true
appender.rolling_old.policies.size.type = SizeBasedTriggeringPolicy
appender.rolling_old.policies.size.size = 128MB
appender.rolling_old.strategy.type = DefaultRolloverStrategy
appender.rolling_old.strategy.fileIndex = nomax
appender.rolling_old.strategy.action.type = Delete
appender.rolling_old.strategy.action.basepath = ${sys:es.logs.base_path}
appender.rolling_old.strategy.action.condition.type = IfFileName
appender.rolling_old.strategy.action.condition.glob = ${sys:es.logs.cluster_name}-*
appender.rolling_old.strategy.action.condition.nested_condition.type = IfAccumulatedFileSize
appender.rolling_old.strategy.action.condition.nested_condition.exceeds = 2GB
################################################
I’m seeking guidance on how to resolve these issues:
How can I correctly configure or install the required plugins (IfFileName and IfAccumulatedFileSize) for Elasticsearch?
What steps should I take to resolve the ownership mismatch warning related to the config directory?
Is there a recommended approach to ensure Elasticsearch uses my specified JAVA_HOME (C:Program FilesJavajdk-21.0.1) instead of the bundled JDK?
Any insights or assistance would be greatly appreciated. Thank you!