You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Darniz <rn...@edmunds.com> on 2011/11/15 01:32:30 UTC
Getting 411 Length required when adding docs
Hello All,
i am this strange issue of http 411 Length required error. My Solr is hosted
on third party hosting company and it was working fine all these while.
i really don't understand why this happened. Attached is the stack trace any
help will be appreciated
org.apache.solr.common.SolrException: Length Required
Length Required
request: http://www.listing-social.com/solr/update?wt=javabin&version=1
at
org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:424)
at
org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:243)
at
org.apache.solr.client.solrj.request.AbstractUpdateRequest.process(AbstractUpdateRequest.java:105)
at org.apache.solr.client.solrj.SolrServer.add(SolrServer.java:64)
at org.apache.solr.client.solrj.SolrServer.addBean(SolrServer.java:68)
at
com.listings.solr.service.impl.BulkIndexingServiceImpl.startBulkIndexing(BulkIndexingServiceImpl.java:55)
at
com.listings.action.BulkIndexingAction.execute(BulkIndexingAction.java:42)
at
org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:53)
at
org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:64)
at
org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:48)
at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
at
org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
at
org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:280)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1858)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:446)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
Thanks
--
View this message in context: http://lucene.472066.n3.nabble.com/Getting-411-Length-required-when-adding-docs-tp3508372p3508372.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Getting 411 Length required when adding docs
Posted by Darniz <rn...@edmunds.com>.
Hello
can anyone has any advice
This is the code i am using
server =new CommonsHttpSolrServer("http://www.mysolrserver.com/solr");
Credentials def = new UsernamePasswordCredentials("xxx","xxx");
server.getHttpClient().getState().setCredentials(AuthScope.ANY,def);
server.getHttpClient().getParams().setAuthenticationPreemptive(true);
for (Obj obj:objects){
server.addBean(obj);
}
Thanks
--
View this message in context: http://lucene.472066.n3.nabble.com/Getting-411-Length-required-when-adding-docs-tp3508372p3511501.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Getting 411 Length required when adding docs
Posted by Chris Hostetter <ho...@fucit.org>.
: i am this strange issue of http 411 Length required error. My Solr is hosted
: on third party hosting company and it was working fine all these while.
: i really don't understand why this happened. Attached is the stack trace any
: help will be appreciated
General rule of debuggin client+server apps: if nothing changed on the
client, but now it's broken, then something probably changed on the
server.
have you contacted your hosting company to see if they changed something
on their side?
CommonsHttpSolrServer should be sending a propert Content-Length header
on updates -- you can verify that using something like tcpdump or by
configuring your CommonsHttpSolrServer to use a proxy like wireshark.
-Hoss