Search unavailable on localhost

20 views
Skip to first unread message

Anferney Grotestam

unread,
Feb 12, 2025, 10:27:06 AMFeb 12
to General WebHare developers discussion
It looks like the OpenSearch on my local environment is broken. In the WebHare Dashboard i see the following error:
Could not connect to index manager #2: Search unavailable (fetch failed: connect ECONNREFUSED 127.0.0.1:13685) on GET http://127.0.0.1:13685/_nodes/stats

I also get the following error in the output in VS Code from the WebHare Language Server:
Uncaught rejection Search unavailable (fetch failed: connect ECONNREFUSED 127.0.0.1:13685) on POST http://127.0.0.1:13685/c_d94829b5a3a03ed6bd0bdb13bb6583bc/_search
at SENDRAWJSONTOOPENSEARCH (mod::consilio/lib/internal/opensearch.whlib:188:11)
at SEARCHINDEXMANAGER (mod::consilio/lib/internal/indexmanager.whlib:394:26)
at RUNCONSILIOSEARCH (mod::consilio/lib/api.whlib:827:20)
at EXECUTEDOCSEARCH2 (mod::dev/lib/internal/api.whlib:200:21)
at EXECUTEDOCSEARCH (mod::dev/lib/internal/api.whlib:249:44)
at SYMBOLSEARCH (mod::dev/lib/editorservices.whlib:21:20)
at RUNFUNCTIONREQUEST (wh::internal/wasm.whlib:55:23)
[Error - 15:35:34] Server process exited with code 1.
[Error - 15:35:34] The WebHare Language Server server crashed 5 times in the last 3 minutes. The server will not be restarted. See the output for more information.

What can i do to get it to work again?

Arnold Hendriks

unread,
Feb 12, 2025, 2:52:05 PMFeb 12
to General WebHare developers discussion, anfe...@nubium.nl
Look in the servicemanager.log file for the reason why opensearch isn't starting. it should be logged close after startup

Anferney Grotestam

unread,
Feb 13, 2025, 3:36:58 AMFeb 13
to General WebHare developers discussion, Arnold Hendriks, anfe...@nubium.nl
From what i see are these the only line a get regarding opensearch in the servicemanager:

[2025-02-13T08:32:37.441Z] apprunner: Application consilio:opensearch output: Max open files: 1048575
[2025-02-13T08:32:38.883Z] apprunner: Application consilio:opensearch terminated unexpectedly, errorcode 1, next restart: 2025-02-13 08:32:58.883

Is there any way i can have the servicemanager output more information?

Op woensdag 12 februari 2025 om 20:52:05 UTC+1 schreef Arnold Hendriks:

Arnold Hendriks

unread,
Feb 13, 2025, 4:11:38 AMFeb 13
to General WebHare developers discussion, anfe...@nubium.nl, Arnold Hendriks
To troubleshoot further try:

wh shell
bash -x $WEBHARE_DIR/bin/launch_opensearch.sh 256 1024

and show the last statements before it fails

Anferney Grotestam

unread,
Feb 13, 2025, 5:03:44 AMFeb 13
to General WebHare developers discussion, Arnold Hendriks, anfe...@nubium.nl
Something like this?

+ WHBUILD_BUILDROOT=/Users/nubium2/projects/whbuild
+ '[' -z '' ']'
++ cd /Users/nubium2/projects/webhare
++ DIRNAME=webhare
++ cd ..
++ echo /Users/nubium2/projects/whbuild/release-webhare
+ WEBHARE_BUILDDIR=/Users/nubium2/projects/whbuild/release-webhare
+ '[' -z /Users/nubium2/projects/whbuild/release-webhare ']'
+ mkdir -p /Users/nubium2/projects/whbuild/release-webhare
+ '[' -z '' ']'
+ WHBUILD_DOWNLOADCACHE=/Users/nubium2/projects/whbuild/downloadcache
++ /usr/local/bin/opensearch --version
++ grep '^Version'
+ CURRENT_OPENSEARCHVERSION=
MacBookPro:/Users/nubium2/whrunkit/mywebhare/whdata/root$ 
Op donderdag 13 februari 2025 om 10:11:38 UTC+1 schreef Arnold Hendriks:

Arnold Hendriks

unread,
Feb 13, 2025, 5:10:56 AMFeb 13
to General WebHare developers discussion
And what happens if you run 
/usr/local/bin/opensearch --version 
yourself ?

Anferney Grotestam

unread,
Feb 13, 2025, 5:13:23 AMFeb 13
to devel...@webhare.dev
i get the following:

MacBookPro:/Users/nubium2/whrunkit/mywebhare/whdata/root$ /usr/local/bin/opensearch --version 

warning: no-jdk distributions that do not bundle a JDK are deprecated and will be removed in a future release

Exception in thread "main" java.lang.RuntimeException: starting java failed with [1]

output:

[0.003s][error][logging] Error opening log file '/usr/local/var/log/opensearch/gc.log': Permission denied

[0.003s][error][logging] Initialization of output 'file=/usr/local/var/log/opensearch/gc.log' using options 'filecount=32,filesize=64m' failed.

error:

Could not rename log file '/usr/local/var/log/opensearch/gc.log' to '/usr/local/var/log/opensearch/gc.log.31' (Permission denied).

Invalid -Xlog option '-Xlog:gc*,gc+age=trace,safepoint:file=/usr/local/var/log/opensearch/gc.log:utctime,pid,tags:filecount=32,filesize=64m', see error log for details.

Error: Could not create the Java Virtual Machine.

Error: A fatal exception has occurred. Program will exit.

at org.opensearch.tools.launchers.JvmErgonomics.flagsFinal(JvmErgonomics.java:125)

at org.opensearch.tools.launchers.JvmErgonomics.finalJvmOptions(JvmErgonomics.java:87)

at org.opensearch.tools.launchers.JvmErgonomics.choose(JvmErgonomics.java:70)

at org.opensearch.tools.launchers.JvmOptionsParser.jvmOptions(JvmOptionsParser.java:150)

at org.opensearch.tools.launchers.JvmOptionsParser.main(JvmOptionsParser.java:108)


Op do 13 feb 2025 om 11:11 schreef Arnold Hendriks <arn...@webhare.nl>:
--
You received this message because you are subscribed to the Google Groups "General WebHare developers discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to developers+...@webhare.dev.
To view this discussion visit https://groups.google.com/a/webhare.dev/d/msgid/developers/5fa5de18-4463-41a7-9f32-476e99e50e9fn%40webhare.dev.

Arnold Hendriks

unread,
Feb 13, 2025, 5:14:53 AMFeb 13
to General WebHare developers discussion, anfe...@nubium.nl
From your other post:

I wasn't able to get any further, so i made a new profile on the mac. Didn't encounter any of these errors and got WebHare to work.

I'm going to guess this messed up the permissions in your homebrew installation

To unsubscribe from this group and stop receiving emails from it, send an email to developers+unsubscribe@webhare.dev.
Reply all
Reply to author
Forward
0 new messages