org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException: Expected content type application/octet-stream but got text/html;charset=ISO-8859-1. <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/> <title>Error 404 Not Found</title> </head> <body><h2>HTTP ERROR 404</h2> <p>Problem accessing /solr/collection/admin/ping. Reason: <pre> Not Found</pre></p><hr /><i><small>Powered by Jetty://</small></i><br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> </body> </html>

Apache's JIRA Issue Tracker | Jakob Furrer | 3 years ago
  1. 0

    [SOLR-5532] SolrJ Content-Type validation is too strict for some webcontainers / proxies, breaks on equivilent content types - ASF JIRA

    apache.org | 11 months ago
    org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException: Expected content type application/octet-stream but got text/html;charset=ISO-8859-1. <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/> <title>Error 404 Not Found</title> </head> <body><h2>HTTP ERROR 404</h2> <p>Problem accessing /solr/collection/admin/ping. Reason: <pre> Not Found</pre></p><hr /><i><small>Powered by Jetty://</small></i><br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> </body> </html>
  2. 0

    [SOLR-5532] SolrJ Content-Type validation is too strict for some webcontainers / proxies, breaks on equivilent content types - ASF JIRA

    apache.org | 11 months ago
    org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException: Expected content type application/octet-stream but got text/html;charset=ISO-8859-1. <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/> <title>Error 404 Not Found</title> </head> <body><h2>HTTP ERROR 404</h2> <p>Problem accessing /solr/collection/admin/ping. Reason: <pre> Not Found</pre></p><hr /><i><small>Powered by Jetty://</small></i><br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> </body> </html>
  3. 0

    due to SOLR-3530, HttpSolrServer now does a string equivilence check between the "Content-Type" returned by the server, and a getContentTYpe() method declared by the ResponseParser .. but string equivilence is too strict, and can result in errors like this one reported by a user.... ---- I just upgraded my Solr instance and with it I also upgraded the solrj library in our custom application which sends diverse requests and queries to Solr. I use the "ping" method to determine whether Solr started correctly under the configured address. Since the upgrade the ping response results in an error: {code:xml} Cause: org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException: Expected content type application/xml; charset=UTF-8 but got application/xml;charset=UTF-8. <?xml version="1.0" encoding="UTF-8"?> <response> <lst name="responseHeader"><int name="status">0</int><int name="QTime">0</int><lst name="params"><str name="df">searchtext</str><str name="echoParams">all</str><str name="rows">10</str><str name="echoParams">all</str><str name="wt">xml</str><str name="version">2.2</str><str name="q">solrpingquery</str><str name="distrib">false</str></lst></lst><str name="status">OK</str> </response> {code} The Solr application itself works fine. Using an older version of the solrj library than solr-solrj-4.6.0.jar (e.g. solr-solrj-4.5.1.jar) in the custom application does not produce this error. The Exception is produced in a Code block (_HttpSolrServer.java_, method _request(...)_, around. line 140) which has been introduced with version 4.6.0. Code to reproduce the error: {code} try { HttpSolrServer solrServer = new HttpSolrServer("http://localhost:8080/Solr/collection"); solrServer.setParser(new XMLResponseParser()); // this line is making all the difference solrServer.ping(); } catch (Exception e) { e.printStackTrace(); } {code} A global search for "charset=UTF-8" on the source code of solrj indicates that other functions besides "ping" might be affected as well, because there are several places where "application/xml; charset=UTF-8" is spelled without a space after the semicolon.

    Apache's JIRA Issue Tracker | 3 years ago | Jakob Furrer
    org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException: Expected content type application/octet-stream but got text/html;charset=ISO-8859-1. <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/> <title>Error 404 Not Found</title> </head> <body><h2>HTTP ERROR 404</h2> <p>Problem accessing /solr/collection/admin/ping. Reason: <pre> Not Found</pre></p><hr /><i><small>Powered by Jetty://</small></i><br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> </body> </html>
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    [jira] [Commented] (SOLR-5532) HttpSolrServer does not accept content type of "ping" response | Lucene | Java-Dev

    gossamer-threads.com | 11 months ago
    org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException: Expected content type application/octet-stream but got text/html;charset=ISO-8859-1. <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/> <title>Error 404 Not Found</title> </head> <body><h2>HTTP ERROR 404</h2> <p>Problem accessing /solr/collection/admin/ping. Reason: <pre> Not Found</pre></p><hr /><i><small>Powered by Jetty://</small></i><br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> </body> </html>
  6. 0

    [Solr-user] A strange RemoteSolrException - Grokbase

    grokbase.com | 1 year ago
    org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException: Server at returned non ok status:404, message:Not Found

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException

      Expected content type application/octet-stream but got text/html;charset=ISO-8859-1. <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/> <title>Error 404 Not Found</title> </head> <body><h2>HTTP ERROR 404</h2> <p>Problem accessing /solr/collection/admin/ping. Reason: <pre> Not Found</pre></p><hr /><i><small>Powered by Jetty://</small></i><br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> </body> </html>

      at org.apache.solr.client.solrj.impl.HttpSolrServer.request()
    2. Apache Solr Solrj
      SolrServer.ping
      1. org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:455)
      2. org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:197)
      3. org.apache.solr.client.solrj.request.SolrPing.process(SolrPing.java:69)
      4. org.apache.solr.client.solrj.SolrServer.ping(SolrServer.java:293)
      4 frames
    3. org.elyograg
      TestStuff.main
      1. org.elyograg.TestStuff.main(TestStuff.java:72)
      1 frame