我已经在Jelastic和Jetty中部署了Solr。可以通过以下URL访问其管理页面:
http://mydomain.jelastic.servint.net/solr但当我尝试从另一台机器添加文档时,如下所示:
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);它不起作用。我收到以下错误:
org.apache.solr.common.SolrException: Server at http://mydomain.jelastic.servint.net/solr returned non ok status:411, message:Length Required如果我使用一个伪造的URL,它会返回相同的错误,所以我认为根本原因一定是URL有问题。
它可以在同一台机器上很好地访问Solr。
有人能帮我一下吗?
发布于 2013-09-09 14:23:55
我也有同样的问题。并且解决了。原因是1.3.9版本以下的nginx不支持HttpChunkinModule。http://wiki.nginx.org/HttpChunkinModule
发布于 2013-10-23 04:24:39
它还可能需要您的Jetty应用服务器使用Public IP。因为在默认情况下,所有请求都会通过全局解析器,而且它还会限制您的操作。
https://stackoverflow.com/questions/15045113
复制相似问题