cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Full indexing failed with error mime type error

0 Likes
3,483

Hi Experts ,

I am migrating from Hybris 5.7.0.10 6.6.0.7 . After migation we were trying to do full indexing , and we are getting below error with indexing failed . Any pointer what is the configuration missing ? How this mime type to set for solr instance ?

Indexing failed.

 11.11.2018 16:46:29: WARNING: Error during indexer call: coreImagingIndex 11.11.2018 16:46:29: ERROR: org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error from server at https://localhost:8983/solr: Expected mime type application/octet-stream but got text/html.
 HTTP ERROR 401
 Problem accessing /solr/admin/cores. Reason:
 
     require authentication


Accepted Solutions (0)

Answers (4)

Answers (4)

former_member32245
Discoverer

For 1905 version

1. Add the below in solr.impex file
INSERT_UPDATE SolrServerConfig;name[unique=true];mode(code);username;password;indexingUsername;indexingPassword

;$serverConfigName;standalone;solrclient;client123;solrindexingclient;indexingclient123

INSERT_UPDATE SolrEndpointUrl;solrServerConfig(name)[unique=true];url[unique=true];master[unique=true,default=false]
;$serverConfigName;https://localhost:8983/solr;true

2. Add the below in your local.properties file.
# SOLR Configurations solrserver.instances.default.authtype=basic solrserver.instances.default.user=solrserver solrserver.instances.default.password=server123
Update and restart the server will help to configure the Solr server properly.
0 Likes

It works for me Thanks

arvind-kumar_avinash
Active Contributor
0 Likes

Hi @ved - Please try the following:

  1. Backup security.json file and remove it.

  2. Set the following properties in local.properties:

    solrserver.instances.your-solr-server-instance-name.authtype=

    solrserver.instances.your-solr-server-instance-name.user=

    solrserver.instances.your-solr-server-instance-name.password=

  3. Restart Solr and hybrisserver

0 Likes

Thanks Arvind , this has fixed the issue for now . But I have question on this , do we need to disable authentication/authorisation for solr always ?

arvind-kumar_avinash
Active Contributor
0 Likes

I am glad to know that it fixed your problem. It is not mandatory but it enables an additional layer of security and therefore it is recommended to have it. You should consult your infrastructure security expert to check if you need to verify a user’s identity and restrict access to resources in a Solr cluster.

The page, https://help.hybris.com/6.6.0/hcd/45be9a2fa0ac4f63bc179f9ed301a4d3.html has all the necessary information to configure Authentication & Authorisation for Solr.

0 Likes

Hi Marko ,

Thanks for your reply , I have modified my local property with suggested configuration from your link :

solrserver.instances..authtype=basic solrserver.instances..user=solrserver solrserver.instances..password=server123

but didnt worked , still getting same error .

 ERROR [000008HK::de.hybris.platform.servicelayer.internal.jalo.ServicelayerJob] (000008HK) [SolrStandaloneSearchProvider] org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error from server at https://localhost:8983/solr: Expected mime type application/octet-stream but got text/html. <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
 <title>Error 401 require authentication</title>
 </head>
 <body><h2>HTTP ERROR 401</h2>
 <p>Problem accessing /solr/admin/cores. Reason:
 <pre>    require authentication</pre></p>
 </body>
 </html>

Marko_salonen
Contributor
0 Likes

Have you configured the authentication properties? It is changed now , see if this document helps you : https://help.hybris.com/6.6.0/hcd/45be9a2fa0ac4f63bc179f9ed301a4d3.html