Describe the issue:
I got an error and can’t installing OpenSearch.
I can’t describe the error I don’t understand the message.
Please see, what I did at the code.
I hope you can help, 'cause I haven’t found an answer or bugfix.
Thank you so much.
Relevant Logs or Screenshots:
root@ubuntu:/home/xxx# apt install default-jre default-jdk
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
default-jdk is already the newest version (2:1.11-72build2).
default-jre is already the newest version (2:1.11-72build2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@ubuntu:/home/xxx# export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
root@ubuntu:/home/xxx# echo $JAVA_HOME
/usr/lib/jvm/java-11-openjdk-amd64
root@ubuntu:/home/xxx# cat /proc/sys/vm/max_map_count
65530
root@ubuntu:/home/xxx# nano /etc/sysctl.conf
root@ubuntu:/home/xxx#
root@ubuntu:/home/xxx# sudo sysctl -p
vm.max_map_count = 262144
root@ubuntu:/home/xxx# wget https://artifacts.opensearch.org/releases/bundle/opensearch/2.12.0/opensearch-2.12.0-linu
x-x64.deb
--2024-07-25 10:34:48-- https://artifacts.opensearch.org/releases/bundle/opensearch/2.12.0/opensearch-2.12.0-linux-x64.deb
Resolving artifacts.opensearch.org (artifacts.opensearch.org)... 2600:9000:225a:a000:1e:aaba:24c0:93a1, 2600:9000:225a:a200:1e:aaba:24c0:93a1, 2600:9000:225a:7000:1e:aaba:24c0:93a1, ...
Connecting to artifacts.opensearch.org (artifacts.opensearch.org)|2600:9000:225a:a000:1e:aaba:24c0:93a1|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 860374902 (821M) [application/octet-stream]
Saving to: ‘opensearch-2.12.0-linux-x64.deb’
opensearch-2.12.0-linux-x64.d 100%[===============================================>] 820.52M 79.7MB/s in 10s
2024-07-25 10:34:59 (79.3 MB/s) - ‘opensearch-2.12.0-linux-x64.deb’ saved [860374902/860374902]
root@ubuntu:/home/xxx# ls
opensearch-2.12.0-linux-x64.deb packages.txt
root@ubuntu:/home/xxx# sudo dpkg -i opensearch-2.12.0-linux-x64.deb
Selecting previously unselected package opensearch.
(Reading database ... 104981 files and directories currently installed.)
Preparing to unpack opensearch-2.12.0-linux-x64.deb ...
Running OpenSearch Pre-Installation Script
× opensearch.service - OpenSearch
Loaded: loaded (/lib/systemd/system/opensearch.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2024-07-25 10:43:09 UTC; 43s ago
Docs: https://opensearch.org/
Process: 189465 ExecStart=/usr/share/opensearch/bin/systemd-entrypoint -p ${PID_DIR}/opensearch.pid --quiet (code=exite>
× opensearch.service - OpenSearch
Loaded: loaded (/lib/systemd/system/opensearch.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2024-07-25 10:43:09 UTC; 43s ago
Docs: https://opensearch.org/
Process: 189465 ExecStart=/usr/share/opensearch/bin/systemd-entrypoint -p ${PID_DIR}/opensearch.pid --quiet (code=>
× opensearch.service - OpenSearch
Loaded: loaded (/lib/systemd/system/opensearch.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2024-07-25 10:43:09 UTC; 43s ago
Docs: https://opensearch.org/
Process: 189465 ExecStart=/usr/share/opensearch/bin/systemd-entrypoint -p ${PID_DIR}/opensearch.pid --quiet (code=exited, status=1/FAILURE)
× opensearch.service - OpenSearch
Loaded: loaded (/lib/systemd/system/opensearch.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2024-07-25 10:43:09 UTC; 43s ago
Docs: https://opensearch.org/
Process: 189465 ExecStart=/usr/share/opensearch/bin/systemd-entrypoint -p ${PID_DIR}/opensearch.pid --quiet (code=exited, status=1/FAILURE)
Main PID: 189465 (code=exited, status=1/FAILURE)
CPU: 2.402s
Jul 25 10:43:09 ubuntu systemd-entrypoint[189660]: Error: A fatal exception has occurred. Program will exit.
Jul 25 10:43:09 ubuntu systemd-entrypoint[189660]: at org.opensearch.tools.launchers.JvmErgonomics.flagsFinal(JvmErgonomics.java:125)
Jul 25 10:43:09 ubuntu systemd-entrypoint[189660]: at org.opensearch.tools.launchers.JvmErgonomics.finalJvmOptions(JvmErgonomics.java:87)
Jul 25 10:43:09 ubuntu systemd-entrypoint[189660]: at org.opensearch.tools.launchers.JvmErgonomics.choose(JvmErgonomics.java:70)
Jul 25 10:43:09 ubuntu systemd-entrypoint[189660]: at org.opensearch.tools.launchers.JvmOptionsParser.jvmOptions(JvmOptionsParser.java:150)
Jul 25 10:43:09 ubuntu systemd-entrypoint[189660]: at org.opensearch.tools.launchers.JvmOptionsParser.main(JvmOptionsParser.java:108)
Jul 25 10:43:09 ubuntu systemd[1]: opensearch.service: Main process exited, code=exited, status=1/FAILURE
Jul 25 10:43:09 ubuntu systemd[1]: opensearch.service: Failed with result 'exit-code'.
Jul 25 10:43:09 ubuntu systemd[1]: Failed to start OpenSearch.
Jul 25 10:43:09 ubuntu systemd[1]: opensearch.service: Consumed 2.402s CPU time.
I tested 2.12.0-arm64
root@ubuntu:/home/xxx# ls
opensearch-2.12.0-linux-arm64.deb opensearch-2.12.0-linux-x64.deb opensearch-2.15.0-linux-arm64.deb packages.txt
root@ubuntu:/home/xxx# sudo dpkg -i opensearch-2.12.0-linux-arm64.deb
dpkg: error processing archive opensearch-2.12.0-linux-arm64.deb (--install):
package architecture (arm64) does not match system (amd64)
Errors were encountered while processing:
opensearch-2.12.0-linux-arm64.deb
root@ubuntu:/home/xxx# sudo systemctl enable opensearch
Synchronizing state of opensearch.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable opensearch
root@ubuntu:/home/xxx# sudo systemctl start opensearch
Job for opensearch.service failed because the control process exited with error code.
See "systemctl status opensearch.service" and "journalctl -xeu opensearch.service" for details.
root@ubuntu:/home/xxx# sudo systemctl status opensearch
× opensearch.service - OpenSearch
Loaded: loaded (/lib/systemd/system/opensearch.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2024-07-25 17:25:40 UTC; 17s ago
Docs: https://opensearch.org/
Process: 199515 ExecStart=/usr/share/opensearch/bin/systemd-entrypoint -p ${PID_DIR}/opensearch.pid --quiet (code=exited, status=1/FAILURE)
Main PID: 199515 (code=exited, status=1/FAILURE)
CPU: 2.186s
Jul 25 17:25:40 ubuntu systemd-entrypoint[199659]: Error: A fatal exception has occurred. Program will exit.
Jul 25 17:25:40 ubuntu systemd-entrypoint[199659]: at org.opensearch.tools.launchers.JvmErgonomics.flagsFinal(JvmErgonomics.java:125)
Jul 25 17:25:40 ubuntu systemd-entrypoint[199659]: at org.opensearch.tools.launchers.JvmErgonomics.finalJvmOptions(JvmErgonomics.java:87)
Jul 25 17:25:40 ubuntu systemd-entrypoint[199659]: at org.opensearch.tools.launchers.JvmErgonomics.choose(JvmErgonomics.java:70)
Jul 25 17:25:40 ubuntu systemd-entrypoint[199659]: at org.opensearch.tools.launchers.JvmOptionsParser.jvmOptions(JvmOptionsParser.java:150)
Jul 25 17:25:40 ubuntu systemd-entrypoint[199659]: at org.opensearch.tools.launchers.JvmOptionsParser.main(JvmOptionsParser.java:108)
Jul 25 17:25:40 ubuntu systemd[1]: opensearch.service: Main process exited, code=exited, status=1/FAILURE
Jul 25 17:25:40 ubuntu systemd[1]: opensearch.service: Failed with result 'exit-code'.
Jul 25 17:25:40 ubuntu systemd[1]: Failed to start OpenSearch.
Jul 25 17:25:40 ubuntu systemd[1]: opensearch.service: Consumed 2.186s CPU time.
root@ubuntu:/home/xxx#
Take a look in /var/log/syslog, there may be additional messages in there about the failure.
journalctl -xeu opensearch.service may also give additional clues.
Hello @mhoydis, thanks for your answer.
I think these are the interesting reports. /var/log/opensearch/gc.log = [ Directory ‘/var/log/opensearch’ is not writable ]
Kind regards.
Jul 25 10:41:46 ubuntu systemd[1]: Reloading.
Jul 25 10:41:46 ubuntu systemd[1]: Configuration file /run/systemd/system/netplan-ovs-cleanup.service is marked world-inaccessible. This has no effect as configuration data is accessible via APIs without restrictions. Proceeding anyway.
Jul 25 10:41:46 ubuntu systemd[1]: Starting Daily apt download activities...
Jul 25 10:41:46 ubuntu systemd[1]: Reloading.
Jul 25 10:41:46 ubuntu systemd[1]: Configuration file /run/systemd/system/netplan-ovs-cleanup.service is marked world-inaccessible. This has no effect as configuration data is accessible via APIs without restrictions. Proceeding anyway.
Jul 25 10:41:47 ubuntu systemd[1]: Reloading.
Jul 25 10:41:47 ubuntu systemd[1]: Configuration file /run/systemd/system/netplan-ovs-cleanup.service is marked world-inaccessible. This has no effect as configuration data is accessible via APIs without restrictions. Proceeding anyway.
Jul 25 10:41:47 ubuntu systemd[1]: Reloading.
Jul 25 10:41:47 ubuntu systemd[1]: Configuration file /run/systemd/system/netplan-ovs-cleanup.service is marked world-inaccessible. This has no effect as configuration data is accessible via APIs without restrictions. Proceeding anyway.
Jul 25 10:41:47 ubuntu systemd[1]: apt-daily.service: Deactivated successfully.
Jul 25 10:41:47 ubuntu systemd[1]: Finished Daily apt download activities.
Jul 25 10:42:12 ubuntu kernel: [938975.457996] [UFW BLOCK] IN=ens6 OUT= MAC=02:01:c0:1c:65:44:82:01:c0:1c:65:44:08:00 SRC=79.110.62.166 DST=194.164.197.9 LEN=40 TOS=0x00 PREC=0x00 TTL=247 ID=28981 PROTO=TCP SPT=41438 DPT=60004 WINDOW=1024 RES=0x00 SYN URG>
Jul 25 10:42:17 ubuntu kernel: [938980.556790] [UFW BLOCK] IN=ens6 OUT= MAC=02:01:c0:1c:65:44:82:01:c0:1c:65:44:08:00 SRC=80.94.95.225 DST=194.164.197.9 LEN=40 TOS=0x00 PREC=0x00 TTL=244 ID=4988 PROTO=TCP SPT=50384 DPT=9989 WINDOW=1024 RES=0x00 SYN URGP=0
Jul 25 10:42:28 ubuntu kernel: [938991.684599] [UFW BLOCK] IN=ens6 OUT= MAC=02:01:c0:1c:65:44:82:01:c0:1c:65:44:08:00 SRC=205.210.31.38 DST=194.164.197.9 LEN=44 TOS=0x00 PREC=0x00 TTL=248 ID=54321 PROTO=TCP SPT=52663 DPT=52590 WINDOW=65535 RES=0x00 SYN UR>
Jul 25 10:42:48 ubuntu kernel: [939011.075387] [UFW BLOCK] IN=ens6 OUT= MAC=02:01:c0:1c:65:44:82:01:c0:1c:65:44:08:00 SRC=65.49.20.75 DST=194.164.197.9 LEN=40 TOS=0x00 PREC=0x00 TTL=241 ID=54321 PROTO=TCP SPT=55388 DPT=89 WINDOW=65535 RES=0x00 SYN URGP=0
Jul 25 10:43:07 ubuntu systemd[1]: Starting OpenSearch...
Jul 25 10:43:09 ubuntu systemd-entrypoint[189660]: Exception in thread "main" java.lang.RuntimeException: starting java failed with [1]
Jul 25 10:43:09 ubuntu systemd-entrypoint[189660]: output:
Jul 25 10:43:09 ubuntu systemd-entrypoint[189660]: [0.000s][error][logging] Error opening log file '/var/log/opensearch/gc.log': Permission denied
Jul 25 10:43:09 ubuntu systemd-entrypoint[189660]: [0.000s][error][logging] Initialization of output 'file=/var/log/opensearch/gc.log' using options 'filecount=32,filesize=64m' failed.
Jul 25 10:43:09 ubuntu systemd-entrypoint[189660]: error:
Jul 25 10:43:09 ubuntu systemd-entrypoint[189660]: Invalid -Xlog option '-Xlog:gc*,gc+age=trace,safepoint:file=/var/log/opensearch/gc.log:utctime,pid,tags:filecount=32,filesize=64m', see error log for details.
Jul 25 10:43:09 ubuntu systemd-entrypoint[189660]: Error: Could not create the Java Virtual Machine.
Jul 25 10:43:09 ubuntu systemd-entrypoint[189660]: Error: A fatal exception has occurred. Program will exit.
Jul 25 10:43:09 ubuntu systemd-entrypoint[189660]: #011at org.opensearch.tools.launchers.JvmErgonomics.flagsFinal(JvmErgonomics.java:125)
Jul 25 10:43:09 ubuntu systemd-entrypoint[189660]: #011at org.opensearch.tools.launchers.JvmErgonomics.finalJvmOptions(JvmErgonomics.java:87)
Jul 25 10:43:09 ubuntu systemd-entrypoint[189660]: #011at org.opensearch.tools.launchers.JvmErgonomics.choose(JvmErgonomics.java:70)
Jul 25 10:43:09 ubuntu systemd-entrypoint[189660]: #011at org.opensearch.tools.launchers.JvmOptionsParser.jvmOptions(JvmOptionsParser.java:150)
Jul 25 10:43:09 ubuntu systemd-entrypoint[189660]: #011at org.opensearch.tools.launchers.JvmOptionsParser.main(JvmOptionsParser.java:108)
Jul 25 10:43:09 ubuntu systemd[1]: opensearch.service: Main process exited, code=exited, status=1/FAILURE
Jul 25 10:43:09 ubuntu systemd[1]: opensearch.service: Failed with result 'exit-code'.
Jul 25 10:43:09 ubuntu systemd[1]: Failed to start OpenSearch.
Jul 25 10:43:09 ubuntu systemd[1]: opensearch.service: Consumed 2.402s CPU time.
root@ubuntu:~# journalctl -xeu opensearch.service
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ The unit opensearch.service completed and consumed the indicated resources.
Jul 25 17:25:38 ubuntu systemd[1]: Starting OpenSearch...
░░ Subject: A start job for unit opensearch.service has begun execution
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ A start job for unit opensearch.service has begun execution.
░░
░░ The job identifier is 27138.
Jul 25 17:25:40 ubuntu systemd-entrypoint[199659]: Exception in thread "main" java.lang.RuntimeException: starting java failed with [1]
Jul 25 17:25:40 ubuntu systemd-entrypoint[199659]: output:
Jul 25 17:25:40 ubuntu systemd-entrypoint[199659]: [0.000s][error][logging] Error opening log file '/var/log/opensearch/gc.log': Permission denied
Jul 25 17:25:40 ubuntu systemd-entrypoint[199659]: [0.000s][error][logging] Initialization of output 'file=/var/log/opensearch/gc.log' using options 'filecount=32,filesize=64m' failed.
Jul 25 17:25:40 ubuntu systemd-entrypoint[199659]: error:
Jul 25 17:25:40 ubuntu systemd-entrypoint[199659]: Invalid -Xlog option '-Xlog:gc*,gc+age=trace,safepoint:file=/var/log/opensearch/gc.log:utctime,pid,tags:filecount=32,filesize=64m', see error log for details.
Jul 25 17:25:40 ubuntu systemd-entrypoint[199659]: Error: Could not create the Java Virtual Machine.
Jul 25 17:25:40 ubuntu systemd-entrypoint[199659]: Error: A fatal exception has occurred. Program will exit.
Jul 25 17:25:40 ubuntu systemd-entrypoint[199659]: at org.opensearch.tools.launchers.JvmErgonomics.flagsFinal(JvmErgonomics.java:125)
Jul 25 17:25:40 ubuntu systemd-entrypoint[199659]: at org.opensearch.tools.launchers.JvmErgonomics.finalJvmOptions(JvmErgonomics.java:87)
Jul 25 17:25:40 ubuntu systemd-entrypoint[199659]: at org.opensearch.tools.launchers.JvmErgonomics.choose(JvmErgonomics.java:70)
Jul 25 17:25:40 ubuntu systemd-entrypoint[199659]: at org.opensearch.tools.launchers.JvmOptionsParser.jvmOptions(JvmOptionsParser.java:150)
Jul 25 17:25:40 ubuntu systemd-entrypoint[199659]: at org.opensearch.tools.launchers.JvmOptionsParser.main(JvmOptionsParser.java:108)
Jul 25 17:25:40 ubuntu systemd[1]: opensearch.service: Main process exited, code=exited, status=1/FAILURE
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ An ExecStart= process belonging to unit opensearch.service has exited.
░░
░░ The process' exit code is 'exited' and its exit status is 1.
Jul 25 17:25:40 ubuntu systemd[1]: opensearch.service: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ The unit opensearch.service has entered the 'failed' state with result 'exit-code'.
Jul 25 17:25:40 ubuntu systemd[1]: Failed to start OpenSearch.
░░ Subject: A start job for unit opensearch.service has failed
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ A start job for unit opensearch.service has finished with a failure.
░░
░░ The job identifier is 27138 and the job result is failed.
Jul 25 17:25:40 ubuntu systemd[1]: opensearch.service: Consumed 2.186s CPU time.
░░ Subject: Resources consumed by unit runtime
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ The unit opensearch.service completed and consumed the indicated resources.
Hello @Mantas,
thanks for your answer.
Sorry, my mistake.
I use Ubuntu 22.04. I’ll change it in the first post.
I saw this system requirements, but it is also written, that it’s not tested at all Systems.
1.12.0 is from February 6th, 2024 https://opensearch.org/releases.html#release-history
Maybe someone has it running on 22.04 lts or 24.04 lts?
I only can install the server with this 2 operating systems.
@Mantas that was the last I did. custom-admin-passwordxxx is my super safe password.
But who are the file or directory are gone?
PS: I want to install Magent2.4.7-p1 All works fine from all installation tuts. Just I found an over installation instruction, just for 2.4.7.
It’s 3 months old, but for Ubuntu24.04 and I think I should test it. He’s using OpenSearch 1.11.1, I don’t know why, but asked. I’ll start from the scratch, installing a new web server and so on.
I’ll come back and report the result.