Opensearch.service: Failed with result 'timeout'

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
debian 12 amd64 opensearch 2.17

Describe the issue:
root@opensearch:/var/log/opensearch# systemctl start opensearch
Job for opensearch.service failed because a timeout was exceeded.
See “systemctl status opensearch.service” and “journalctl -xeu opensearch.service” for details.

Relevant Logs or Screenshots:
[2024-09-21T17:23:43,494][INFO ][o.o.n.Node ] [opensearch] version[2.17.0], pid[2605], build[deb/8586481dc99b1740ca3c7c966aee15ad0fc7b412/2024-09-13T01:0
4:13.864000718Z], OS[Linux/6.1.0-25-amd64/amd64], JVM[Eclipse Adoptium/OpenJDK 64-Bit Server VM/21.0.4/21.0.4+7-LTS]
[2024-09-21T17:23:43,511][INFO ][o.o.n.Node ] [opensearch] JVM home [/usr/share/opensearch/jdk], using bundled JDK/JRE [true]
[2024-09-21T17:23:43,512][INFO ][o.o.n.Node ] [opensearch] JVM arguments [-Xshare:auto, -Dopensearch.networkaddress.cache.ttl=60, -Dopensearch.networkadd
ress.cache.negative.ttl=10, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -XX:-OmitStackTraceInFastThrow, -XX:+ShowCo
deDetailsInExceptionMessages, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dio.netty.allocator.numDirec
tArenas=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Djava.security.manager=allow, -Djava.locale.providers=SPI,COMPAT, -Xms1g, -Xmx1g, -XX:+UseG1G
C, -XX:G1ReservePercent=25, -XX:InitiatingHeapOccupancyPercent=30, -Djava.io.tmpdir=/tmp/opensearch-5386647025183456727, -XX:+HeapDumpOnOutOfMemoryError, -XX:HeapDumpP
ath=/var/lib/opensearch, -XX:ErrorFile=/var/log/opensearch/hs_err_pid%p.log, -Xlog:gc*,gc+age=trace,safepoint:file=/var/log/opensearch/gc.log:utctime,pid,tags:filecoun
t=32,filesize=64m, -Djava.security.manager=allow, --add-modules=jdk.incubator.vector, -Djava.util.concurrent.ForkJoinPool.common.threadFactory=org.opensearch.secure_sm
.SecuredForkJoinWorkerThreadFactory, -Dclk.tck=100, -Djdk.attach.allowAttachSelf=true, -Djava.security.policy=file:///etc/opensearch/opensearch-performance-analyzer/op
ensearch_security.policy, --add-opens=jdk.attach/sun.tools.attach=ALL-UNNAMED, -XX:MaxDirectMemorySize=536870912, -Dopensearch.path.home=/usr/share/opensearch, -Dopens
earch.path.conf=/etc/opensearch, -Dopensearch.distribution.type=deb, -Dopensearch.bundled_jdk=true]
[2024-09-21T17:23:45,911][INFO ][o.a.l.i.v.PanamaVectorizationProvider] [opensearch] Java vector incubator API enabled; uses preferredBitSize=128; floating-point vecto
rs only
[2024-09-21T17:23:54,246][INFO ][o.o.s.s.t.SSLConfig ] [opensearch] SSL dual mode is disabled
[2024-09-21T17:23:54,248][INFO ][o.o.s.OpenSearchSecurityPlugin] [opensearch] OpenSearch Config path is /etc/opensearch
[2024-09-21T17:23:56,119][INFO ][o.o.s.s.DefaultSecurityKeyStore] [opensearch] JVM supports TLSv1.3
[2024-09-21T17:23:56,131][INFO ][o.o.s.s.DefaultSecurityKeyStore] [opensearch] Config directory is /etc/opensearch/, from there the key- and truststore files are resol
ved relatively
[2024-09-21T17:23:58,939][INFO ][o.o.s.s.DefaultSecurityKeyStore] [opensearch] TLS Transport Client Provider : JDK
[2024-09-21T17:23:58,940][INFO ][o.o.s.s.DefaultSecurityKeyStore] [opensearch] TLS Transport Server Provider : JDK
[2024-09-21T17:23:58,942][INFO ][o.o.s.s.DefaultSecurityKeyStore] [opensearch] TLS HTTP Provider : JDK
[2024-09-21T17:23:58,943][INFO ][o.o.s.s.DefaultSecurityKeyStore] [opensearch] Enabled TLS protocols for transport layer : [TLSv1.3, TLSv1.2]
[2024-09-21T17:23:58,944][INFO ][o.o.s.s.DefaultSecurityKeyStore] [opensearch] Enabled TLS protocols for HTTP layer : [TLSv1.3, TLSv1.2]
[2024-09-21T17:23:59,234][INFO ][o.o.s.OpenSearchSecurityPlugin] [opensearch] Clustername: opensearch
[2024-09-21T17:23:59,267][WARN ][o.o.s.OpenSearchSecurityPlugin] [opensearch] File /etc/opensearch/securityadmin_demo.sh has insecure file permissions (should be 0600)
[2024-09-21T17:24:08,885][INFO ][o.o.p.c.c.PluginSettings ] [opensearch] Trying to create directory /dev/shm/performanceanalyzer/.
[2024-09-21T17:24:08,887][INFO ][o.o.p.c.c.PluginSettings ] [opensearch] Config: metricsLocation: /dev/shm/performanceanalyzer/, metricsDeletionInterval: 1, httpsEnabl
ed: false, cleanup-metrics-db-files: true, batch-metrics-retention-period-minutes: 7, rpc-port: 9650, webservice-port 9600
[2024-09-21T17:24:13,938][INFO ][o.o.i.r.ReindexPlugin ] [opensearch] ReindexPlugin reloadSPI called
[2024-09-21T17:24:13,942][INFO ][o.o.i.r.ReindexPlugin ] [opensearch] Unable to find any implementation for RemoteReindexExtension
[2024-09-21T17:24:14,431][INFO ][o.o.j.JobSchedulerPlugin ] [opensearch] Loaded scheduler extension: reports-scheduler, index: .opendistro-reports-definitions
[2024-09-21T17:24:14,448][INFO ][o.o.j.JobSchedulerPlugin ] [opensearch] Loaded scheduler extension: opensearch_time_series_analytics, index: .opendistro-anomaly-detec
tor-jobs

[2024-09-21T17:24:14,735][INFO ][o.o.p.PluginsService ] [opensearch] loaded plugin [opensearch-performance-analyzer]
[2024-09-21T17:24:14,736][INFO ][o.o.p.PluginsService ] [opensearch] loaded plugin [opensearch-reports-scheduler]
[2024-09-21T17:24:14,737][INFO ][o.o.p.PluginsService ] [opensearch] loaded plugin [opensearch-security]
[2024-09-21T17:24:14,738][INFO ][o.o.p.PluginsService ] [opensearch] loaded plugin [opensearch-security-analytics]
[2024-09-21T17:24:14,738][INFO ][o.o.p.PluginsService ] [opensearch] loaded plugin [opensearch-skills]
[2024-09-21T17:24:14,746][INFO ][o.o.p.PluginsService ] [opensearch] loaded plugin [opensearch-sql]
[2024-09-21T17:24:14,762][INFO ][o.o.p.PluginsService ] [opensearch] loaded plugin [opensearch-system-templates]
[2024-09-21T17:24:14,763][INFO ][o.o.p.PluginsService ] [opensearch] loaded plugin [query-insights]
[2024-09-21T17:24:15,470][INFO ][o.o.s.OpenSearchSecurityPlugin] [opensearch] Disabled https compression by default to mitigate BREACH attacks. You can enable it by setting ‘http.compression: true’ in opensearch.yml
[2024-09-21T17:24:15,737][WARN ][stderr ] [opensearch] WARNING: A restricted method in java.lang.foreign.Linker has been called
[2024-09-21T17:24:15,738][WARN ][stderr ] [opensearch] WARNING: java.lang.foreign.Linker::downcallHandle has been called by the unnamed module
[2024-09-21T17:24:15,739][WARN ][stderr ] [opensearch] WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for this module
[2024-09-21T17:24:16,195][INFO ][o.a.l.s.MemorySegmentIndexInputProvider] [opensearch] Using MemorySegmentIndexInput and native madvise support with Java 21 or later; to disable start with -Dorg.apache.lucene.store.MMapDirectory.enableMemorySegments=false
[2024-09-21T17:24:16,244][INFO ][o.o.e.NodeEnvironment ] [opensearch] using [1] data paths, mounts [[/ (/dev/sda1)]], net usable_space [266gb], net total_space [291.4gb], types [ext4]
[2024-09-21T17:24:16,251][INFO ][o.o.e.NodeEnvironment ] [opensearch] heap size [1gb], compressed ordinary object pointers [true]
[2024-09-21T17:24:17,017][INFO ][o.o.n.Node ] [opensearch] node name [opensearch], node ID [b7-GSpYyRSGQZB12sg_v3g], cluster name [opensearch], roles [ingest, remote_cluster_client, data, cluster_manager]
[2024-09-21T17:24:17,687][INFO ][o.o.e.ExtensionsManager ] [opensearch] ExtensionsManager initialized
[2024-09-21T17:24:32,319][INFO ][o.o.n.p.NeuralSearch ] [opensearch] Registering hybrid query phase searcher with feature flag [plugins.neural_search.hybrid_search_disabled]
[2024-09-21T17:24:34,320][WARN ][o.o.s.c.Salt ] [opensearch] If you plan to use field masking pls configure compliance salt e1ukloTsQlOgPquJ to be a random string of 16 chars length identical on all nodes
[2024-09-21T17:24:34,720][INFO ][o.o.s.a.i.AuditLogImpl ] [opensearch] Message routing enabled: true
[2024-09-21T17:24:34,902][INFO ][o.o.s.f.SecurityFilter ] [opensearch] indices are made immutable.
[2024-09-21T17:24:36,717][INFO ][o.o.t.b.CircuitBreakerService] [opensearch] Registered memory breaker.
[2024-09-21T17:24:39,757][INFO ][o.o.m.b.MLCircuitBreakerService] [opensearch] Registered ML memory breaker.
[2024-09-21T17:24:39,761][INFO ][o.o.m.b.MLCircuitBreakerService] [opensearch] Registered ML disk breaker.
[2024-09-21T17:24:39,762][INFO ][o.o.m.b.MLCircuitBreakerService] [opensearch] Registered ML native memory breaker.
[2024-09-21T17:24:40,251][INFO ][o.r.Reflections ] [opensearch] Reflections took 213 ms to scan 1 urls, producing 26 keys and 67 values
[2024-09-21T17:24:40,308][INFO ][o.o.s.a.r.AuditMessageRouter] [opensearch] Closing AuditMessageRouter
[2024-09-21T17:24:40,310][INFO ][o.o.s.a.s.SinkProvider ] [opensearch] Closing InternalOpenSearchSink
[2024-09-21T17:24:40,311][INFO ][o.o.s.a.s.SinkProvider ] [opensearch] Closing DebugSink

Configuration:
i just did the installation from repository then rebooted.

I think what you are seeing is that the service did not necessarily have an error, it just took longer than expected to start.

It is possible indeed.
My test environment is an old packard bell laptop.
Is there a way to tell the system to expect longer times?

Try this:

Run sudo systemctl edit opensearch.service.
In the editor, put these lines in:

[Service]
TimeoutStartSec=120s # Adjust this to whatever you need

Save the file and exit.
Run sudo systemctl daemon-reload.
Run sudo systemctl restart opensearch.service

thank you very much! i am now able to test things in my medieval laptop.
Wish you a great day.

1 Like