<?xml version="1.0"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>CRIN Trac: Ticket #21: Apache Solr HTTP 400 Bad Request Errors</title>
    <link>https://trac.crin.org/trac/ticket/21</link>
    <description>&lt;p&gt;
There are lots of errors like this in the &lt;a class="ext-link" href="https://www.crin.org/en/admin/reports/dblog"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;dblog&lt;/a&gt;:
&lt;/p&gt;
&lt;pre class="wiki"&gt;Type		Apache Solr
Date		Wednesday, June 17, 2015 - 15:53
User		Anonymous
Location	http://www.crin.org/fr/biblioth%C3%A8que/archives-des-actualit%C3%A9s?page=8
Message	HTTP 400; Bad Request: Bad Request
Severity	error
&lt;/pre&gt;&lt;p&gt;
And
&lt;/p&gt;
&lt;pre class="wiki"&gt;Type		Apache Solr
Date		Wednesday, June 17, 2015 - 15:53
User		Anonymous
Location	http://www.crin.org/fr/biblioth%C3%A8que/archives-des-actualit%C3%A9s?page=8
Message		HTTP Status: 400;
Message: 	Bad Request: Bad Request;
Response: 	&amp;lt;html&amp;gt;&amp;lt;head&amp;gt;&amp;lt;title&amp;gt;Apache Tomcat/7.0.56 (Debian) - Error report&amp;lt;/title&amp;gt;&amp;lt;style&amp;gt;&amp;lt;!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--&amp;gt;&amp;lt;/style&amp;gt; &amp;lt;/head&amp;gt;&amp;lt;body&amp;gt;&amp;lt;h1&amp;gt;HTTP Status 400 - undefined field hash&amp;lt;/h1&amp;gt;&amp;lt;HR size="1" noshade="noshade"&amp;gt;&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;type&amp;lt;/b&amp;gt; Status report&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;message&amp;lt;/b&amp;gt; &amp;lt;u&amp;gt;undefined field hash&amp;lt;/u&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;description&amp;lt;/b&amp;gt; &amp;lt;u&amp;gt;The request sent by the client was syntactically incorrect.&amp;lt;/u&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;HR size="1" noshade="noshade"&amp;gt;&amp;lt;h3&amp;gt;Apache Tomcat/7.0.56 (Debian)&amp;lt;/h3&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;;
Request: GET /solr/select?start=0&amp;amp;rows=5&amp;amp;fq=hash%3A7as1z6&amp;amp;fq=hash%3A7as1z6&amp;amp;q=id%3A7as1z6%2Fnode%2F266&amp;amp;qt=mlt&amp;amp;fl=entity_id%2Centity_type%2Clabel%2Cpath%2Curl%2Chash%2Csite&amp;amp;mlt.fl=path_alias%2Ctaxonomy_names&amp;amp;mlt.mintf=1&amp;amp;mlt.mindf=1&amp;amp;mlt.minwl=3&amp;amp;mlt.maxwl=15&amp;amp;mlt.maxqt=20&amp;amp;wt=json&amp;amp;json.nl=map HTTP/1.0 User-Agent: Drupal (+http://drupal.org/) Host: localhost:8080 ;
Caller: call_user_func_array() (line Inconnu of Inconnu)
Severity	error
&lt;/pre&gt;&lt;p&gt;
Requests for pages such as &lt;a class="ext-link" href="http://www.crin.org/fr/biblioth%C3%A8que/archives-des-actualit%C3%A9s?page=8"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;the one in the example above&lt;/a&gt; generate both the above errors.
&lt;/p&gt;
</description>
    <language>en-us</language>
    <image>
      <title>CRIN Trac</title>
      <url>https://trac.crin.org/trac/chrome/site/logo.gif</url>
      <link>https://trac.crin.org/trac/ticket/21</link>
    </image>
    <generator>Trac 1.0.2</generator>
    <item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Wed, 17 Jun 2015 15:38:39 GMT</pubDate>
      <title>hours, status changed; resolution, totalhours set</title>
      <link>https://trac.crin.org/trac/ticket/21#comment:1</link>
      <guid isPermaLink="false">https://trac.crin.org/trac/ticket/21#comment:1</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;hours&lt;/strong&gt;
                changed from &lt;em&gt;0&lt;/em&gt; to &lt;em&gt;0.61&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;status&lt;/strong&gt;
                changed from &lt;em&gt;new&lt;/em&gt; to &lt;em&gt;closed&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;resolution&lt;/strong&gt;
                set to &lt;em&gt;fixed&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                set to &lt;em&gt;0.61&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
Looking at the &lt;a class="ext-link" href="https://solr.crin.org/solr/admin/"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;Solr admin interface&lt;/a&gt; noting looks wrong, checked the GreenQloud server and we didn't have this error there.
&lt;/p&gt;
&lt;p&gt;
Comparing the files in &lt;tt&gt;/etc/solr/conf&lt;/tt&gt; on the GreenQloud and &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin2"&gt;Crin2&lt;/a&gt; servers.
&lt;/p&gt;
&lt;pre class="wiki"&gt;mkdir /tmp/gq-solr
rsync -av web1:/etc/solr/conf/ /tmp/gq-solr/
diff schema.xml /tmp/gq-solr/schema.xml | vim -
...
&lt;/pre&gt;&lt;p&gt;
The files which are different:
&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;protwords.txt
&lt;/li&gt;&lt;li&gt;schema.xml
&lt;/li&gt;&lt;li&gt;solrconfig.xml
&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;
These were backed up and the ones from GreenQloud were copied over:
&lt;/p&gt;
&lt;pre class="wiki"&gt;mv protwords.txt  protwords.txt.2015-06-17.dist ; cp /tmp/gq-solr/protwords.txt .
mv schema.xml     schema.xml.2015-06-17.dist ; cp /tmp/gq-solr/schema.xml .
mv solrconfig.xml solrconfig.xml.2015-06-17.dist ; cp /tmp/gq-solr/solrconfig.xml .
&lt;/pre&gt;&lt;p&gt;
Restart tomcat:
&lt;/p&gt;
&lt;pre class="wiki"&gt;service tomcat7 restart
&lt;/pre&gt;&lt;p&gt;
And we don't have these errors in the dblog, so sorry for not copying these files over earlier, closing this ticket.
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item>
 </channel>
</rss>