-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting Error with Basic Authentication and Solr Committer #21
Comments
Which version of the Solr Committer are you using? To establish whether the problem is specific to the Committer, can you confirm if you are able to successfully make queries and updates to Solr directly from the command line? Can you do so from the same host where the HTTP Collector runs? If not, the problem is likely misconfiguration on the Solr side. If it works from the command line, it is harder to help out without a way to reproduce. Do you have more information about the error in your Solr logs? Check also for any kind of errors, especially around startup. You can also try upgrading the SolrJ library installed with the Committer to match your version of Solr. |
Hi .. thanks for the assistance! the version of the Solr committer is 2.4.0 I can do a query successfully using postman (passing in the username and password) not much information on Solr startup I am not seeing any errors in the Solr log file, just INFO messages the log file from the committer is this HTTP ERROR 401 require authentication
|
Can you share the key elements of your Solr security config in an attempt to reproduce the issue? |
Thanks! .. I will post the security.json file along with the solr.in.cmd file and the norconex related files. |
I could reproduce. It turns out the credentials are currently not applied when commit is invoked. Until a fix is provided, you can add the following to your Solr Committer configuration block: <solrCommitDisabled>true</solrCommitDisabled> Solr will rely on its auto-commit configuration to commit the data. |
FYI, a new snapshot release of the Solr Committer was made with a proper fix. You no longer have to apply the workaround (disabling Solr commits). Please confirm. |
I downloaded the committer 2.4.1 snapshot and ran the install script, but still getting the error and my log file still says 2.4.0 thanks |
Yes, look in your lib folder and you will likely see duplicate JARs. If you see two files starting with If it still failed, you may want to reinstall the collector files and the Solr committer files to make sure you have no other duplicates. The easiest way to install a Committer is to run the install script found once you extracted the Committer Zip file. It takes care of eliminating possible duplicates. |
using Basic Authentication on a stand alone (no cloud) windows platform Solr 8.8.2 installation.
the crawl is successful and the error is thrown in the committer, SSL is turned off (for the moment)
the user name and password are clear text - same as the basic auth login to the Solr admin
the core is called sops
my committer code is:
from the norconex log file
[non-job]: 2021-04-27 19:52:54 INFO - Starting execution.
<title>Error 401 require authentication</title>[non-job]: 2021-04-27 19:52:54 INFO - Version: Norconex HTTP Collector 2.9.0 (Norconex Inc.)
[non-job]: 2021-04-27 19:52:54 INFO - Version: Norconex Collector Core 1.10.0 (Norconex Inc.)
[non-job]: 2021-04-27 19:52:54 INFO - Version: Norconex Importer 2.10.0 (Norconex Inc.)
[non-job]: 2021-04-27 19:52:54 INFO - Version: Norconex JEF 4.1.2 (Norconex Inc.)
[non-job]: 2021-04-27 19:52:54 INFO - Version: Norconex Committer Core 2.1.3 (Norconex Inc.)
[non-job]: 2021-04-27 19:52:54 INFO - Version: Norconex Committer Solr 2.4.0 (Norconex Inc.)
...
xyz crawler: 2021-04-27 19:53:49 INFO - Committing 56 files
xyz crawler: 2021-04-27 19:53:50 INFO - Sending 56 documents to Solr for update/deletion.
xyz crawler: 2021-04-27 19:53:50 INFO - xyz crawler: Crawler executed in 56 seconds.
xyz crawler: 2021-04-27 19:53:50 INFO - xyz crawler: Closing sitemap store...
xyz crawler: 2021-04-27 19:53:50 ERROR - Execution failed for job: xyz crawler
com.norconex.committer.core.CommitterException: Cannot index document batch to Solr.
at com.norconex.committer.solr.SolrCommitter.commitBatch(SolrCommitter.java:400)
at com.norconex.committer.core.AbstractBatchCommitter.commitAndCleanBatch(AbstractBatchCommitter.java:179)
at com.norconex.committer.core.AbstractBatchCommitter.commitComplete(AbstractBatchCommitter.java:159)
at com.norconex.committer.core.AbstractFileQueueCommitter.commit(AbstractFileQueueCommitter.java:233)
at com.norconex.collector.core.crawler.AbstractCrawler.execute(AbstractCrawler.java:274)
at com.norconex.collector.core.crawler.AbstractCrawler.doExecute(AbstractCrawler.java:228)
at com.norconex.collector.core.crawler.AbstractCrawler.startExecution(AbstractCrawler.java:184)
at com.norconex.jef4.job.AbstractResumableJob.execute(AbstractResumableJob.java:49)
at com.norconex.jef4.suite.JobSuite.runJob(JobSuite.java:354)
at com.norconex.jef4.suite.JobSuite.doExecute(JobSuite.java:293)
at com.norconex.jef4.suite.JobSuite.execute(JobSuite.java:166)
at com.norconex.collector.core.AbstractCollector.start(AbstractCollector.java:150)
at com.norconex.collector.core.AbstractCollectorLauncher.launch(AbstractCollectorLauncher.java:95)
at com.norconex.collector.http.HttpCollector.main(HttpCollector.java:74)
Caused by: org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error from server at http://mysolr:8983/solr/sops: Expected mime type application/octet-stream but got text/html.
HTTP ERROR 401 require authentication
The text was updated successfully, but these errors were encountered: