2012-03-07 34 views
3

其中一個在這裏沒有解決方案(或任何其他地方)的極少數問題之一。引起:org.apache.solr.common.SolrException:未找到

這個設置在我的本地工作完美。但無法在託管服務器上工作。

的思考? 在此先感謝。 庫馬爾

org.apache.solr.client.solrj.SolrServerException: Error executing query 
    at org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.java:95) 
    at org.apache.solr.client.solrj.SolrServer.query(SolrServer.java:118) 
    at org.apache.jsp.jsp.t0Solr_jsp._jspService(t0Solr_jsp.java:103) 
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) 
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) 
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:388) 
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) 
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) 
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) 
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) 
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) 
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) 
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) 
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) 
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) 
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) 
    at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190) 
    at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291) 
    at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:776) 
    at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:705) 
    at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:898) 
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690) 
    at java.lang.Thread.run(Thread.java:662) 
Caused by: org.apache.solr.common.SolrException: Not Found 

Not Found 

request: http://127.0.0.1:8080/solr/core0/select?q=primField: rockyBal&facet.field=dhomdhom&facet=true&facet.limit=1000&facet.mincount=2&rows=5000&wt=javabin&version=2 
    at org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:430) 
    at org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:244) 
    at org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.java:89) 
    ... 23 more 
+2

你在Solr運行的同一個tomcat中用SolrJ查詢Solr嗎?確定港口是正確的?你的stacktrace更多http客戶端有沒有更多的錯誤? – javanna 2012-03-07 09:01:29

+0

感謝您的回覆。是相同的服務器實例和是8080是正確的。 – user1253801 2012-03-07 14:03:41

+0

沒有其他錯誤。上面的堆棧來自客戶端。 – user1253801 2012-03-07 14:04:26

回答

0

異常被這裏提出(CommonsHttpSolrServer.java:430)

int statusCode = _httpClient.executeMethod(method); 
    if (statusCode != HttpStatus.SC_OK) { 
    StringBuilder msg = new StringBuilder(); 
    msg.append(method.getStatusLine().getReasonPhrase()); 
    msg.append("\n\n"); 
    msg.append(method.getStatusText()); 
    msg.append("\n\n"); 
    msg.append("request: "+method.getURI()); 
    throw new SolrException(statusCode, java.net.URLDecoder.decode(msg.toString(), "UTF-8")); 
    } 

所以基本上你得到一個404錯誤代碼。嘗試在機器打開外殼並鍵入

>捲曲「......在堆棧跟蹤報道的網址...」

我猜你會得到同樣的錯誤。這可能與服務器端口端口有關......

可能是Tomcat以不同的綁定端口開始。嘗試

  • 綁定的tomcat爲127.0.0.1或0.0.0.0(只是用於測試)

  • 變化用的IP地址/主機名初始化的CommonsHttpSolrServer代碼tomcat
相關問題