1

I have Solr deployed in Jelastic with Jetty. Its admin page can be accessed with the URL:

http://mydomain.jelastic.servint.net/solr

But when I try to add a document from another machine like this:

String urlString = "http://mydomain.jelastic.servint.net/solr";
SolrServer solr = new HttpSolrServer(urlString);
SolrInputDocument document = new SolrInputDocument();
document.addField("id", "552199");
document.addField("name", "Gouda cheese wheel cheese");
UpdateRequest req = new UpdateRequest();
req.add(document);
UpdateResponse response = req.process(solr);

It does not work. I am getting the following error:

org.apache.solr.common.SolrException: Server at http://mydomain.jelastic.servint.net/solr returned non ok status:411, message:Length Required

If I use a fake URL it returns the same error, so I think the root cause must be a problem with the URL.
It works fine accessing Solr at the same machine.

Could anybody give me a hand?

sigod
  • 3,514
  • 2
  • 21
  • 44

2 Answers2

0

I hava the same question. and resolved. the reason is nginx under 1.3.9 is not support HttpChunkinModule。 http://wiki.nginx.org/HttpChunkinModule

xuke
  • 1
0

It can also require Public IP for your Jetty app server. Because by default all requests go through global Resolver and it can also restrict your actions.

Anton
  • 64
  • 3