Solr crashes on startup with segmentation fault
I am trying to run Solr 9.5.0 on Windows Subsystem For Linux 2. It crashes with a Segmentation Fault and does not start. I can run it on Windows without an issue.
Java version on WSL2: 17
Java version on Windows: 11
It specifically crashes on line 2244: 12188 Segmentation fault (core dumped) nohup "$JAVA" "${SOLR_START_OPTS[@]}" $SOLR_ADDL_ARGS -Dsolr.log.muteconsole -jar start.jar "${SOLR_JETTY_CONFIG[@]}" $SOLR_JETTY_ADDL_CONFIG > "$SOLR_LOGS_DIR/solr-$SOLR_PORT-console.log" 2>&1
.
I tested this again on WSL2 with Java 11. If I try to run Solr in the background, it will crash. This will leave an entry that appears if I run solr status
: Solr process XXX from /mnt/c/solr-9.5.0/bin/solr-8985.pid not found.
I can run Solr in the foreground (-f
flag) with no issues. Interestingly, solr status
returns the same message (including pid not found
) unless I first make sure there are no background processes running. Then it displays the information in the same format as the Windows script does.
1 answer
I upgraded to WSL 2 because I discovered several instances online where people had run into issues with WSL and Solr together. This fixed the problem of Solr not starting. However, it triggered a new issue where I could not connect to the Solr server via localhost. The only thing that worked was to use a different port than the default. My guess is that something is using the default Solr port (or that it is blocked) and thus using a different port was necessary.
TL;DR
Upgrading to WSL 2 and changing the port number fixed the issue.
1 comment thread