ejabberd - Comments for "ejabberd-2.0.0 from src on Centos5 - empty responses from mod_http_fileserver?" https://www.ejabberd.im/node/3019 en The problem is reported https://www.ejabberd.im/node/3019#comment-52404 <p>The problem is reported here: <noindex><a href="http://support.process-one.net/browse/EJAB-628" rel="nofollow" >Use httpd_util:to_lower when not compiling with Erlang R12</a></noindex></p> Fri, 16 May 2008 08:56:39 +0000 mfoss comment 52404 at https://www.ejabberd.im Right, mod_http_fileserver in ejabberd 2.0.0 requires Erlang R11 https://www.ejabberd.im/node/3019#comment-52365 <div class="quote-msg"> <div class="quote-author"><em>Anonymous</em> wrote:</div> <p>is it possible that string:to_lower isn't included in the R11B-2.3.el5 erlang package I'm using...?</p></div> <p>You are right, the function string:to_lower was introduced in Erlang R11B-4. This function is used in mod_http_fileserver (included in ejabberd 2.0.0) and in the contributed module mod_muc_log_http.</p> <p>However, ejabberd 2.0.0 requirements in the guide say: Erlang/OTP R10B-9 up to R11B-5.</p> <p>The better solution for you is to update to Erlang R11B-5. If you can't do that, you can replace the calls 'string:to_lower' with 'httpd_util:to_lower'.</p> <p>Thanks for your report, I'll fix this for ejabberd 2.0.1.</p> Fri, 09 May 2008 10:12:05 +0000 mfoss comment 52365 at https://www.ejabberd.im FIXED - used a newer version of erlang https://www.ejabberd.im/node/3019#comment-52364 <p>I removed the stock CentOS erlang and recompiled ejabberd against a from-source erlang version otp_src_R11B-5.</p> <p>http works fine again - do the ejabberd build reqs need to be changed?</p> Fri, 09 May 2008 09:29:36 +0000 Anonymous comment 52364 at https://www.ejabberd.im string:to_lower? https://www.ejabberd.im/node/3019#comment-52362 <p>I've been doing a little more digging - is it possible that string:to_lower isn't included in the R11B-2.3.el5 erlang package I'm using...?</p> Thu, 08 May 2008 20:18:46 +0000 Anonymous comment 52362 at https://www.ejabberd.im File is read OK, but not served... https://www.ejabberd.im/node/3019#comment-52353 <p>Thanks for such a prompt reply.</p> <p>I checked both logs but there are no startup errors.</p> <p>I also hacked in your trace code and it looks like the file is being read fine:<br /> =INFO REPORT==== 2008-05-05 17:34:17 ===<br /> D(&lt;0.350.0&gt;:ejabberd_http:263) : ["www","index.html"] matches ["www"]</p> <p>=INFO REPORT==== 2008-05-05 17:34:17 ===<br /> D(&lt;0.350.0&gt;:mod_http_fileserver:54) : Requested ["index.html"]</p> <p>=INFO REPORT==== 2008-05-05 17:34:17 ===<br /> D(&lt;0.350.0&gt;:mod_http_fileserver:71) : Delivering the file "/var/www/index.html" with content:<br /> &lt;&lt;"i am not empty\n\n\n"&gt;&gt;</p> <p>But my curl is still failing :-(<br /> [root@domU-12-31-39-00-EE-51:/opt/var/log/ejabberd] curl <noindex><a href="http://localhost/www/index.html" title="http://localhost/www/index.html" rel="nofollow" >http://localhost/www/index.html</a></noindex><br /> curl: (52) Empty reply from server</p> <p>Watching tcpdump I can see a response to the GET, but no content:<br /> 17:34:31.800653 IP localhost.48570 &gt; localhost.http: P 1:166(165) ack 1 win 8192<br /> 0x0000: 4500 00d9 b701 4000 4006 851b 7f00 0001 E.....@.@.......<br /> 0x0010: 7f00 0001 bdba 0050 0a38 4424 09fa 7b39 .......P.8D$..{9<br /> 0x0020: 8018 2000 fecd 0000 0101 080a 003e f2dc .............&gt;..<br /> 0x0030: 003e f2dc 4745 5420 2f77 7777 2f69 6e64 .&gt;..GET./www/ind<br /> 0x0040: 6578 2e68 746d 6c20 4854 5450 2f31 2e31 ex.html.HTTP/1.1<br /> 0x0050: 0d0a ..<br /> 17:34:31.800662 IP localhost.http &gt; localhost.48570: . ack 166 win 8150<br /> 0x0000: 4500 0034 89e5 4000 4006 b2dc 7f00 0001 E..4..@.@.......<br /> 0x0010: 7f00 0001 0050 bdba 09fa 7b39 0a38 44c9 .....P....{9.8D.<br /> 0x0020: 8010 1fd6 e06f 0000 0101 080a 003e f2dc .....o.......&gt;..<br /> 0x0030: 003e f2dc .&gt;..<br /> 17:34:31.801259 IP localhost.http &gt; localhost.48570: F 1:1(0) ack 166 win 8150<br /> 0x0000: 4500 0034 89e6 4000 4006 b2db 7f00 0001 E..4..@.@.......<br /> 0x0010: 7f00 0001 0050 bdba 09fa 7b39 0a38 44c9 .....P....{9.8D.<br /> 0x0020: 8011 1fd6 e06e 0000 0101 080a 003e f2dc .....n.......&gt;..<br /> 0x0030: 003e f2dc .&gt;..<br /> 17:34:31.803797 IP localhost.48570 &gt; localhost.http: F 166:166(0) ack 2 win 8192<br /> 0x0000: 4500 0034 b702 4000 4006 85bf 7f00 0001 E..4..@.@.......<br /> 0x0010: 7f00 0001 bdba 0050 0a38 44c9 09fa 7b3a .......P.8D...{:<br /> 0x0020: 8011 2000 e043 0000 0101 080a 003e f2dc .....C.......&gt;..<br /> 0x0030: 003e f2dc .&gt;..<br /> 17:34:31.803806 IP localhost.http &gt; localhost.48570: . ack 167 win 8150<br /> 0x0000: 4500 0034 89e7 4000 4006 b2da 7f00 0001 E..4..@.@.......<br /> 0x0010: 7f00 0001 0050 bdba 09fa 7b3a 0a38 44ca .....P....{:.8D.<br /> 0x0020: 8010 1fd6 e06d 0000 0101 080a 003e f2dc .....m.......&gt;..<br /> 0x0030: 003e f2dc .&gt;..</p> <p>How puzzling! Any more clues? I'm very happy to try and help track this down, but I am getting towards the limits of my ingenuity...</p> Tue, 06 May 2008 08:08:45 +0000 Anonymous comment 52353 at https://www.ejabberd.im Check log files at starttime; try this debug line https://www.ejabberd.im/node/3019#comment-52347 <p>Check ejabberd log files (ejabberd.log and sasl.log) when ejabberd is started: maybe there is an error reported, only when ejabberd is starting.</p> <p>To know what file is read, and what is the content read, you can replace in mod_http_fileserver.erl the line:</p> <pre>?DEBUG("Delivering content.", []),</pre><p>with this one:</p> <pre>?DEBUG("Delivering the file ~p with content:~n ~p", [FileName, FileContents]),</pre> Mon, 05 May 2008 20:43:13 +0000 mfoss comment 52347 at https://www.ejabberd.im