Reputation: 11
Hello Stack Overflow community,
I'm currently facing a challenge setting up Apache Solr 8.0.0 on an AWS EC2 instance and would greatly appreciate any insights or suggestions you might have. The core issue revolves around Solr failing to start due to it not being able to locate the solr.xml file, despite what appears to be a correct setup.
Steup by offical SolrTutorial: https://solr.apache.org/guide/8_0/aws-solrcloud-tutorial.html Environment Details:
AWS Service: EC2 Instance Type: t2.micro OS: Amazon Linux 2 Solr Version: 8.0.0
Problem Summary: Upon attempting to start Solr with the bin/solr start command, it fails to launch, and the logs indicate an issue with locating the solr.xml file. Here are the relevant log outputs from server/logs/solr.log:
2024-04-01 13:16:03.745 ERROR (main) [ ] o.a.s.s.SolrDispatchFilter Could not start Solr. Check solr/home property and the logs
2024-04-01 13:16:03.820 ERROR (main) [ ] o.a.s.c.SolrCore null:org.apache.solr.common.SolrException: solr.xml does not exist in /home/ec2-user/solr-8.0.0 cannot start Solr
And when trying to check the status or any other operation with Solr, it reports:
ERROR: Failed to get system information from http://localhost:8983/solr due to: org.apache.http.client.ClientProtocolException: Expected JSON response from server but received: <html>...
I don't understand the problem here, since solr.xml is by default in server/solr. Why is it now searching while starting in the SOLR_HOME path.
I started SOLR with the command displayed in the tutorial:
bin/solr start -c -p 8983 -h solr-node-1
and
bin/solr start -c -p 8983 -h solr-node-2 -z solr-node-1:9983
I'm hoping someone here might have encountered a similar issue or could point me in the right direction. Any advice on troubleshooting steps, configuration adjustments, or insights into Solr's behavior in AWS environments would be highly appreciated.
Thank you in advance for your help!
Steps Taken:
check solr/status
Confirmed the presence of the solr.xml file in /home/ec2-user/solr-8.0.0/server/solr. Verified the SOLR_HOME environment variable is set to /home/ec2-user/solr-8.0.0, as per the official Solr tutorial and documentation. Attempted restarting Solr and the EC2 instance with no change in outcome.
Upvotes: 1
Views: 75