We are getting the error below for our SOLR configuration. Any idea about this.
System.TypeInitializationException: The type initializer for org.apache.solr.SolrSharp.Configuration.SolrSearchers threw an exception. ---> System.Configuration.ConfigurationErrorsException: Solr configuration error
at org.apache.solr.SolrSharp.Configuration.SolrSearchers..cctor()
Thanks for your time and help.
I suppose you didn't start (or didn't install) your Solr server.
Download latest version of Apache Solr
Start the server by following the instructions in Solr Tutorial
The default port is 8983 so you should be able to reach your Solr server at localhost:8983/solr
In App.config file in SolrSharp, replace the port in the server's url
This should solve the problem.
Related
I'm trying to integrate SOLR with Hybris but both of them are running on Kubernetes as a diffferent pod.
If I'm trying indexing SOLR on Hybris, it throws the error below;
ERROR [BackofficeLO-47] (000001JT) [SolrStandaloneSearchProvider] Error from server at http://10.10.100.181:34324/solr: Error CREATEing SolrCore 'master_backoffice_backoffice_product_flip': Unable to create core [master_backoffice_backoffice_product_flip] Caused by: de.hybris.platform.solr.search.MultiMaxScoreQParserPlugin
org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error from server at http://10.10.100.181:34324/solr: Error CREATEing SolrCore 'master_backoffice_backoffice_product_flip': Unable to create core [master_backoffice_backoffice_product_flip] Caused by: de.hybris.platform.solr.search.MultiMaxScoreQParserPlugin
I guess somethings wrong with SOLR "deafult" indexing directory.
Solr is running as process like below inside the pod;
solr#solr-fsd33wdf-qteg:/opt/solr-8.5.2$ ps -ef | grep solr
solr 10 1 0 Jun23 ? 00:15:55 /usr/local/openjdk-11/bin/java -server -Xms512m -Xmx512m -XX:+UseG1GC -XX:+PerfDisableSharedMem -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=250 -XX:+UseLargePages -XX:+AlwaysPreTouch -Xlog:gc*:file=/var/solr/logs/solr_gc.log:time,uptime:filecount=9,filesize=20M -Dsolr.jetty.inetaccess.includes= -Dsolr.jetty.inetaccess.excludes= -Dsolr.log.dir=/var/solr/logs -Djetty.port=8983 -DSTOP.PORT=7983 -DSTOP.KEY=solrrocks -Duser.timezone=UTC -Djetty.home=/opt/solr/server -Dsolr.solr.home=/var/solr/data -Dsolr.data.home= -Dsolr.install.dir=/opt/solr -Dsolr.default.confdir=/opt/solr/server/solr/configsets/_default/conf -Dlog4j.configurationFile=/var/solr/log4j2.xml -Xss256k -Dsolr.jetty.https.port=8983 -jar start.jar --module=http
So default confdir is /opt/solr/server/solr/configsets/_default/conf
If I'm check SOLR_HOME variable, it's different directory;
solr#solr-f575dcfdf-qtnpg:/opt/solr-8.5.2$ echo $SOLR_HOME
/var/solr/data
So, how can I change confdir to /var/solr/data ? I guess this is the problem here?
Thanks!
This page provides you with information on how to use the standalone setup. The ant configureSolrServer takes an argument of the path to the original Solr binary that you should download from here. This overwrites the files in the directory with the SAP Commerce specific setup. The MultiMaxScoreQParserPlugin is part of solr-hybris-components-<version_of_solr>.jar file, where the <version_of_solr> corresponds to the solr version your SAP Commerce is running on. Note that SAP Commerce also supports multiple Solr versions and it depends on what configuration you have.
You may then extend the default Solr docker image as provided here to have your setup running.
I am using solr4 in tomcat. Now i am planning to migrate it to Solr 5.3 , i tried to start the server using solr start . But i got the below exception
java.io.IOException: Cannot read file: solr-5.3.0\solr-5.3.
0\server\modules\http.mod
at org.eclipse.jetty.start.Modules.registerModule(Modules.java:549)
at org.eclipse.jetty.start.Modules.registerAll(Modules.java:486)
at org.eclipse.jetty.start.Main.processCommandLine(Main.java:608)
at org.eclipse.jetty.start.Main.main(Main.java:111)
I cant see any stacktrace in the console. except the below error message
ERROR: Solr at http://localhost:8983/solr did not come online within 30 seconds!
i think there might be some basic configuration i am missing , please help .
Thanks in advance
Check your java version, it has to be 1.7 minimum for Solr 5.3
Check the logs at solr_folder/server/logs, the cause will be there.
Simply stopping the server and then restarting it helped:
D:\Apache Solr\solr-6.6.0\bin>solr.cmd stop -all
Stopping Solr process 8072 running on port 8983
I've installed Solr on my Ubuntu to this path
/opt/solr/solr-4.10.2
After installing I started Solr:
sudo bin/solr start from /opt/solr/solr-4.10.2 directory
As I can understand it started successfully
Waiting to see Solr listening on port 8983 [/]
Started Solr server on port 8983 (pid=8385). Happy searching!
But when I try to get to admin page
http://localhost:8983/solr
I got 404 error:
HTTP ERROR: 404
Problem accessing /solr. Reason:
Not Found
Powered by Jetty://
Do you have any suggestion what's going wrong and where to look in order to fix this problem?
Since this error can be caused by a lot of things, you need to access the log file and debug the execution.
First of all, open your Node log file, located in /opt/solr/solr-4.10.2/node1/log and look for something weird (Shift+F for Errors).
Generally, this error occurs when you have a mismatch between the Solr required Java JDK and your current Java JDK.
When I had this problem, I found in the log file the following error message java.lang.UnsupportedClassVersionError: org/apache/solr/servlet/SolrDispatchFilter : Unsupported major.minor version 51.0 and realized the problem was the java version.
To solve this, try to change the current JDK, using the command sudo update-alternatives --config javac.
If the error still occurs, try to uninstall all unused JDK's, because Solr is getting the wrong path.
The final solution to this issue is to open the file /opt/solr/solr-4.10.2/solar.in.sh and edit the SOLR_JAVA_HOME, writing the right JDK path (e.g /usr/lib/jvm/java-1.7.0)
Disclosure: the secret is look in the log file and figure out what is causing the issue.
Cheers.
try:
http://localhost:8983/solr/index.html
[solr's web.xml]
<servlet>
<servlet-name>LoadAdminUI</servlet-name>
<servlet-class>org.apache.solr.servlet.LoadAdminUiServlet</servlet-class>
I am deploying Solr 4.3.0 in Tomcat 7.
Everything works fine but DataImportHandler. I can go to the
http://localhost:8080/solr/#/collection1/dataimport//dataimport
screen and see the dataimport options load at the UI.
Still, I can see any of my entities load in the "entity" combo box. Inside the configuration box, at the right side I can see the error below.
Apache Tomcat/7.0.41 - Error
report
525D76;}--> HTTP Status 500 - Filter execution threw an exception
noshade="noshade">type Exception reportmessage
Filter execution threw an exceptiondescription
The server encountered an internal error that prevented it from
fulfilling this request.exception
javax.servlet.ServletException: Filter execution threw an
exception root cause
java.lang.NoClassDefFoundError: org/apache/log4j/spi/LoggingEvent
org.apache.solr.logging.log4j.EventAppender.append(EventAppender.java:35)
org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:251)
org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:66)
org.apache.log4j.Category.callAppenders(Category.java:206)
org.apache.log4j.Category.forcedLog(Category.java:391)
org.apache.log4j.Category.log(Category.java:856)
org.slf4j.impl.Log4jLoggerAdapter.error(Log4jLoggerAdapter.java:498)
org.apache.solr.common.SolrException.log(SolrException.java:119)
org.apache.solr.servlet.ResponseUtils.getErrorInfo(ResponseUtils.java:58)
org.apache.solr.servlet.SolrDispatchFilter.sendError(SolrDispatchFilter.java:691)
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:380)
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:155)
note The full stack trace of the root cause is
available in the Apache Tomcat/7.0.41 logs.Apache Tomcat/7.0.41
Problem is that I have the "log4j-1.2.16.jar" loaded in the classpath (it's on Tomcat lib dir).
Anyone have stepped in this problem?
Try following the steps outlined in Using the example logging setup in containers other than Jetty. I have encountered this same error when running Solr 4.3 until I followed these steps to configure logging.
After changing the directory, did you change the directory path in solrconfig.xml file.
I just want to make sure after the making changes in configuration file, did you restart the tomcat and solr server?
You need to copy the slf4j-log4j12-1.6.6.jar from the ext of Solr into the lib folder.
You also need to put the logging.properties file there.
I'm trying to integrate Haystack with Solr. When I try to build the index, I get an error
"Unknown field django_id" from SOLR. What's causing this to happen?
You also get this error if you haven't given Solr the schema.xml file which Haystack generates for you, as explained here in the docs.
django-haystack.readthedocs.io/en/latest/tutorial.html#reindex
The schema.xml was malformed as I had copied additional text from the console.
If you added new fields to your database and copied the generated XML files from Haystack, you might also be getting this error because you haven't restarted jetty/Tomcat/whatever server you are using. This solved it for me on Ubuntu and Jetty:
sudo /etc/init.d/jetty stop
sudo /etc/init.d/jetty start
(by the way, that would also be the same as simply doing this):
sudo service jetty restart
Or, if you are using tomcat, that would be
sudo service tomcat6 restart
Edit: (tested this with Tomcat, and it solved the same problem again, the same as with Jetty).