记录下遇到的问题,
[resin-port-8001-50] DEBUG org.springframework.web.servlet.DispatcherServlet [FrameworkServlet.java:990] - Could not complete request
org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException: Expected mime type application/octet-stream but got text/html. <html>
<head><title>404 Not Found</title></head>
<body bgcolor="white">
<center><h1>404 Not Found</h1></center>
<hr><center>nginx</center>
</body>
</html>
出现这个问题的根源是请求的路径更改了,但是nginx里代理的路径没有更改导致访问不到
解决问题的过程:
1.网上说是nginx.conf的配置文件:
default_type application/octet-stream; ——>default_type text/html;
但我的nginx 的配置就是这样的,所以不适合与我的问题解决
2.也有的说是路径多了#,http://localhost:8080/solr/#/collection2
这个也不是通用的
3.重点看报错信息是nginx
我就去一步一步到捞日志,发现我的请求地址是请求不到的,去更改了nginx代理的路径就可以了,去掉了/select,因为他是自动请求就可以加的,不能在ngixn上配上
总结:
出现这个问题的原因有千千万,不能放过没一个细节,总能找到原因的
参考
https://blog.youkuaiyun.com/ditto_zhou/article/details/61197272