EBISPOT / OLS

Ontology Lookup Service from SPOT at EBI
http://www.ebi.ac.uk/ols
Apache License 2.0
95 stars 40 forks source link

An error occurred while executing ols-indexer.jar, adding -Dsolr.solr.home was invalid #531

Closed chenkuncloud closed 2 years ago

chenkuncloud commented 2 years ago

Hi,

I'm following the tutorial https://www.ebi.ac.uk/ols/docs/installation-guide deploy OLS locally.

Now, [mvn clean install], [ols-config-importer.jar] successfully executed, and Tomcat has been stopped.

However, the following error occurs during [ols-indexer.jar] execution:

ERROR main MongoOntologyIndexingService.indexOntologyDocument - Error indexing uberon
org.springframework.data.solr.UncategorizedSolrException: 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 404 Not Found</title>
</head>
<body><h2>HTTP ERROR 404</h2>
<p>Problem accessing /solr/ontology/select. Reason:
<pre>    Not Found</pre></p><hr><i><small>Powered by Jetty://</small></i><hr/>

</body>
</html>
; nested exception is org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException: 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 404 Not Found</title>
</head>
<body><h2>HTTP ERROR 404</h2>
<p>Problem accessing /solr/ontology/select. Reason:
<pre>    Not Found</pre></p><hr><i><small>Powered by Jetty://</small></i><hr/>

</body>
</html>

        at org.springframework.data.solr.core.SolrTemplate.execute(SolrTemplate.java:145)
        at org.springframework.data.solr.core.SolrTemplate.count(SolrTemplate.java:163)
        at org.springframework.data.solr.repository.query.AbstractSolrQuery$CollectionExecution.count(AbstractSolrQuery.java:473)
        at org.springframework.data.solr.repository.query.AbstractSolrQuery$CollectionExecution.execute(AbstractSolrQuery.java:453)
        at org.springframework.data.solr.repository.query.AbstractSolrQuery.execute(AbstractSolrQuery.java:156)
        at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.doInvoke(RepositoryFactorySupport.java:462)
        at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:440)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
        at org.springframework.data.projection.DefaultMethodInvokingMethodInterceptor.invoke(DefaultMethodInvokingMethodInterceptor.java:61)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
        at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
        at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
        at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:136)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
        at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208)
        at com.sun.proxy.$Proxy69.findByOntologyName(Unknown Source)
        at uk.ac.ebi.spot.ols.indexer.SolrIndexer.dropIndex(SolrIndexer.java:207)
        at uk.ac.ebi.spot.ols.service.MongoOntologyIndexingService.indexOntologyDocument(MongoOntologyIndexingService.java:104)
        at uk.ac.ebi.spot.ols.LoadingApplication.run(LoadingApplication.java:177)
        at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:800)
        at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:784)
        at org.springframework.boot.SpringApplication.afterRefresh(SpringApplication.java:771)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:307)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1185)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1174)
        at uk.ac.ebi.spot.ols.LoadingApplication.main(LoadingApplication.java:300)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:54)
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:104)
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:61)
        at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:52)
Caused by: org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException: Expected mime type application/octet-stream but got text/html. <html>

I have read #239 , and increases [-Dsolr.solr.home, -Dsolr.data.dir] when Solr starts, but the error still occurs.

Is it that I have the wrong path(-Dsolr.solr.home, -Dsolr.data.dir)?

Full command: solr -Dsolr.solr.home=D:/developer/idea/workspace/OLS/ols-solr/src/main/solr-5-config -Dsolr.data.dir=D:/ols/OLS_DATA_HOME/solr [D:/developer/idea/workspace/OLS] is the full code on Github,but I did not make any modifications to [solr-5-config] [D:/ols/OLS_DATA_HOME/solr] is empty, it's an empty directory I created

The following information is for your reference:

  1. [http://localhost:8983/solr] is accessible, but there's no core there
  2. application-uberon.properties:[location http://purl.obolibrary.org/obo/uberon.owl] change to [location file:/D:/ols/tomcat/owls/uberon.owl]
  3. Environment:windows 10, java 1.8, mongodb 2.8.0, solr 5.2.1

Thank you!

chenkuncloud commented 2 years ago

Dear @henrietteharmse

I looked at all the issues, but I still couldn't find the right solution.

Looking forward to get your help, thanks!

Best Regards

serjoshua commented 2 years ago

Hi @chenkun19960427,

I'm not sure if you did this already but as far as I know, when starting solr in Windows, you could only pass the -Dsolr.data.dir config to solr by updating solr.cmd.

i.e., change set START_OPTS=-Duser.timezone=%SOLR_TIMEZONE% to something like set START_OPTS=-Duser.timezone=%SOLR_TIMEZONE% -Dsolr.data.dir=C:\Users\username\.ols\solr

serjoshua commented 2 years ago

Apologies for accidentally closing your ticket @chenkun19960427. It was unintentional. Let us know if you still encounter the issue.

chenkuncloud commented 2 years ago

Dear @serjoshua

This issue has been resolved ! Just add solr.home to the environment variable . I made a very stupid issue .

Thank you very much for your reply .

Best Regards