Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Comments on Solr crashes on startup with segmentation fault

Post

Solr crashes on startup with segmentation fault

+2
−0

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.

History
Why does this post require moderator attention?
You might want to add some details to your flag.
Why should this post be closed?

1 comment thread

Maybe it's because of WSL? (2 comments)
Maybe it's because of WSL?
matthewsnyder‭ wrote 2 months ago

WSL can act funny because of the way it's integrated into Windows, where many core Linux functions are disabled because Windows does it for WSL.

Docker, while also not a full Linux, tends to have fewer problems so try running it in a container like https://hub.docker.com/_/archlinux . Plus, many people run these services on Docker, so usually the devs will test it more with Docker. Devs of Linux services are usually not too interested in WSL problems.

Also, try a Linux VM (or actual Linux machine) if you have access to one.

tarhalda‭ wrote about 2 months ago

It is entirely possible that WSL is causing it to fail. I've seen questions online from others using WSL, so I was hoping that if this was a common issue with WSL someone would have documented it.