Expected mime type application/octet-stream but got text/html.
来源:互联网 发布:红帽系统yum源 编辑:程序博客网 时间:2024/05/21 17:48
在运行solr技术的工程的时候出现Expected mime type application/octet-stream but got text/html.错误
网上找的原因有:
在使用Tomcat部署Solr后,Collection1的地址为:http://ip:8080/solr/#/collection1,但使用SolrJ进行索引的时候,应该使用http://ip:8080/solr/collection1,即无中间的#号。
即正确代码为:
- String serverUrl = (args != null && args.length > 0) ? args[0]
- : "http://ip:8080/solr/collection1";
- String serverUrl = (args != null && args.length > 0) ? args[0]
- : "http://ip:8080/solr/#/collection1";
但是我的是因为solrServer配置出错,正确的应该是:
<bean id="httpSolrServer" class="org.apache.solr.client.solrj.impl.HttpSolrServer">
<constructor-arg index="0" value="http://localhost:8081/solr"/>
</bean>
同时应该开启tomcat服务器中的startup.bat。这样子solr才能访问成功
阅读全文
0 0
- Expected mime type application/octet-stream but got text/html.
- solr异常--Expected mime type application/octet-stream but got text/html.
- Solr 报错:RemoteSolrException: Expected mime type application/octet-stream but got text/html
- Solr 6.3 Expected mime type application/octet-stream but got text/html解决方法
- solr6.3通过solrj连接solr服务时 Expected mime type application/octet-stream but got text/html解决方案
- Solr4.6 Expected content type application/octet-stream but got text/html 解决办法
- solrj使用报错:HttpSolrServer$RemoteSolrException: Expected mime type application/xml but got text/html
- SpringMVC Resource interpreted as Script but transferred with MIME type application/octet-stream:
- Resource interpreted as Stylesheet but transferred with MIME type application/octet-stream
- Warning: unknown mime-type for "xxx" -- using "application/octet-stream"
- "Could not find mime type application octet-stream"错误的解决方法
- flv的MIME类型:flv-application/octet-stream
- application/octet-stream
- application/octet-stream
- ContentType("application/octet-stream");
- client found response content type of text/html charset=utf-8 but expected text/xml
- 关于chrome Resource interpreted as Script but transferred with MIME type text/html的问题
- 关于chrome Resource interpreted as Script but transferred with MIME type text/html的问题
- DownloadManager
- mac上搭建Jenkins+Android+IOS自动开发部署环境
- 求树的深度
- Kafka Template–2.2.0 api
- 树的子结构
- Expected mime type application/octet-stream but got text/html.
- QT下设置Linux系统时间
- 点云数据处理学习笔记
- Python- 时间格式的相互转换
- java.io.IOException: Error running exec(). Command: [/system/xbin/su] Working Directory: null Enviro
- String,StringBuffer,StringBuilder
- 阿里云服务器被入侵挂上了wnTKYg挖矿程序解决办法
- vlcj loop
- 感知机perceptron-机器学习ML