If i install on a clean Ubuntu, then it works perfectly.
I, however, must have the CIS standards applied for my use case (I can tweak some of the values if it is justifiable).
I get the below:
Sep 27 15:11:10 i4-hids systemd[1]: Starting Wazuh-indexer...
Sep 27 15:11:11 i4-hids systemd-entrypoint[32128]: Exception in thread "main" java.lang.RuntimeException: starting java failed with [1]
Sep 27 15:11:11 i4-hids systemd-entrypoint[32128]: output:
Sep 27 15:11:11 i4-hids systemd-entrypoint[32128]: [0.000s][error][logging] Error opening log file '/var/log/wazuh-indexer/gc.log': Permission denied
Sep 27 15:11:11 i4-hids systemd-entrypoint[32128]: [0.000s][error][logging] Initialization of output 'file=/var/log/wazuh-indexer/gc.log' using options 'filecount=32,filesize=64m' failed.
Sep 27 15:11:11 i4-hids systemd-entrypoint[32128]: error:
Sep 27 15:11:11 i4-hids systemd-entrypoint[32128]: Invalid -Xlog option '-Xlog:gc*,gc+age=trace,safepoint:file=/var/log/wazuh-indexer/gc.log:utctime,pid,tags:filecount=32,filesize=64m', see error log for details.
Sep 27 15:11:11 i4-hids systemd-entrypoint[32128]: Error: Could not create the Java Virtual Machine.
Sep 27 15:11:11 i4-hids systemd-entrypoint[32128]: Error: A fatal exception has occurred. Program will exit.
Sep 27 15:11:11 i4-hids systemd-entrypoint[32128]: at org.opensearch.tools.launchers.JvmErgonomics.flagsFinal(JvmErgonomics.java:139)
Sep 27 15:11:11 i4-hids systemd-entrypoint[32128]: at org.opensearch.tools.launchers.JvmErgonomics.finalJvmOptions(JvmErgonomics.java:101)
Sep 27 15:11:11 i4-hids systemd-entrypoint[32128]: at org.opensearch.tools.launchers.JvmErgonomics.choose(JvmErgonomics.java:72)
Sep 27 15:11:11 i4-hids systemd-entrypoint[32128]: at org.opensearch.tools.launchers.JvmOptionsParser.jvmOptions(JvmOptionsParser.java:152)
Sep 27 15:11:11 i4-hids systemd-entrypoint[32128]: at org.opensearch.tools.launchers.JvmOptionsParser.main(JvmOptionsParser.java:110)
Sep 27 15:11:11 i4-hids systemd[1]: wazuh-indexer.service: Main process exited, code=exited, status=1/FAILURE
Sep 27 15:11:11 i4-hids systemd[1]: wazuh-indexer.service: Failed with result 'exit-code'.
Sep 27 15:11:11 i4-hids systemd[1]: Failed to start Wazuh-indexer.
Sep 27 15:17:05 i4-hids systemd[1]: Starting Wazuh-indexer...
Sep 27 15:17:06 i4-hids systemd-entrypoint[2517]: Exception in thread "main" java.lang.RuntimeException: starting java failed with [1]
Sep 27 15:17:06 i4-hids systemd-entrypoint[2517]: output:
Sep 27 15:17:06 i4-hids systemd-entrypoint[2517]: [0.000s][error][logging] Error opening log file '/var/log/wazuh-indexer/gc.log': Permission denied
Sep 27 15:17:06 i4-hids systemd-entrypoint[2517]: [0.000s][error][logging] Initialization of output 'file=/var/log/wazuh-indexer/gc.log' using options 'filecount=32,filesize=64m' failed.
Sep 27 15:17:06 i4-hids systemd-entrypoint[2517]: error:
Sep 27 15:17:06 i4-hids systemd-entrypoint[2517]: Invalid -Xlog option '-Xlog:gc*,gc+age=trace,safepoint:file=/var/log/wazuh-indexer/gc.log:utctime,pid,tags:filecount=32,filesize=64m', see error log for details.
Sep 27 15:17:06 i4-hids systemd-entrypoint[2517]: Error: Could not create the Java Virtual Machine.
Sep 27 15:17:06 i4-hids systemd-entrypoint[2517]: Error: A fatal exception has occurred. Program will exit.
Sep 27 15:17:06 i4-hids systemd-entrypoint[2517]: at org.opensearch.tools.launchers.JvmErgonomics.flagsFinal(JvmErgonomics.java:139)
Sep 27 15:17:06 i4-hids systemd-entrypoint[2517]: at org.opensearch.tools.launchers.JvmErgonomics.finalJvmOptions(JvmErgonomics.java:101)
Sep 27 15:17:06 i4-hids systemd-entrypoint[2517]: at org.opensearch.tools.launchers.JvmErgonomics.choose(JvmErgonomics.java:72)
Sep 27 15:17:06 i4-hids systemd-entrypoint[2517]: at org.opensearch.tools.launchers.JvmOptionsParser.jvmOptions(JvmOptionsParser.java:152)
Sep 27 15:17:06 i4-hids systemd-entrypoint[2517]: at org.opensearch.tools.launchers.JvmOptionsParser.main(JvmOptionsParser.java:110)
Sep 27 15:17:06 i4-hids systemd[1]: wazuh-indexer.service: Main process exited, code=exited, status=1/FAILURE
Sep 27 15:17:06 i4-hids systemd[1]: wazuh-indexer.service: Failed with result 'exit-code'.
Sep 27 15:17:06 i4-hids systemd[1]: Failed to start Wazuh-indexer.