https://www.chiliproject.org/2012-02-16T17:13:45+01:00ChiliProjectChiliProject - Bug #896: Enabling "Authentication required" mode returns 404shttps://www.chiliproject.org/issues/896?journal_id=145082012-02-16T17:13:45+01:00Yehuda Katzyehuda+chiliproject@ymkatz.net
<ul><li><strong>Start date</strong> set to <i>2012-02-16</i></li><li><strong>Priority</strong> set to <i>Normal</i></li><li><strong>Project</strong> set to <i>ChiliProject</i></li><li><strong>Subject</strong> set to <i>Enabling "Authentication required" mode returns 404s</i></li><li><strong>Category</strong> set to <i>Permissions</i></li><li><strong>Tracker</strong> set to <i>Bug</i></li><li><strong>Description</strong> set to <i>When I enable "Authentication required" mode (in Settings->Authe...</i> <a href="/journals/14508/diff/description" class="lightbox-ajax">More</a></li><li><strong>Status</strong> set to <i>Open</i></li></ul> ChiliProject - Bug #896: Enabling "Authentication required" mode returns 404shttps://www.chiliproject.org/issues/896?journal_id=145112012-02-16T20:04:08+01:00Pavel Nakonechnyzorg1331@gmail.com
<ul></ul><p>+1</p>
<p>You can also reproduce this bug by deleting <strong>_chiliproject_session</strong> cookie from your browser.</p> ChiliProject - Bug #896: Enabling "Authentication required" mode returns 404shttps://www.chiliproject.org/issues/896?journal_id=148322012-03-01T01:17:54+01:00Felix Schäferfelix+chili@oh14.de
<ul><li><strong>Target version</strong> set to <i>3.1.0</i></li><li><strong>Assignee</strong> set to <i>Felix Schäfer</i></li></ul><p>Intriguing, I'll try to reproduce this locally.</p> ChiliProject - Bug #896: Enabling "Authentication required" mode returns 404shttps://www.chiliproject.org/issues/896?journal_id=149102012-03-05T12:10:27+01:00Holger Justchiliproject@meine-er.de
<ul></ul><p>I can not reproduce the bug using Thin or Webrick on Ruby 1.8.7p358. I always get a HTTP 302 which forwards me to <code>/login?back_url=...</code>, which is consistent to what your <code>production.log</code> states.</p>
<p>Could you please give a little more details about your setup (Ruby version, App server) and verify that your ChiliProject/App server actually sends a 404, or if it might be just your browser mis-interpreting something.</p>
<p>If you still get a 404, could you please verify, if it comes from the original resource (e.g. <code>http://domain.com/</code>) or from the forwarded resource (e.g <code>http://domain.com/login?back_url=...</code>)</p> ChiliProject - Bug #896: Enabling "Authentication required" mode returns 404shttps://www.chiliproject.org/issues/896?journal_id=149352012-03-06T04:31:58+01:00Yehuda Katzyehuda+chiliproject@ymkatz.net
<ul></ul><p>ruby 1.8.7 (2011-02-18 patchlevel 334) [i686-linux]<br />Rails 2.3.14<br />mongrel (1.1.5)<br />(It is set up through cPanel, but all cPanel does is execute '/usr/bin/ruby /usr/bin/mongrel_rails start -p 12001 -d -e production -P log/mongrel.pid')</p>
<p>I am connecting directly to the mongrel instance, not through my Apache (HTTPD 2.2) proxy, to make sure the problem is not with Apache.<br />I am using Google Chrome 17, but I have replicated the issue in other browsers.<br />The browser is not getting the 302 at all even though the log says it is being sent.<br />I can give you access to my server if it will help.</p> ChiliProject - Bug #896: Enabling "Authentication required" mode returns 404shttps://www.chiliproject.org/issues/896?journal_id=149412012-03-06T11:34:49+01:00Holger Justchiliproject@meine-er.de
<ul></ul><p>Okay, I can reproduce it with Mongrel 1.1.5. On access of <code>http://localhost:12001</code> I always get the following stack trace:</p>
<pre>
Tue Mar 06 11:56:27 +0100 2012: Error calling Dispatcher.dispatch #<NoMethodError: You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.split>
/Users/hjust/.rvm/gems/ree-1.8.7-2011.03@chili/gems/actionpack-2.3.14/lib/action_controller/cgi_process.rb:52:in `dispatch_cgi'
/Users/hjust/.rvm/gems/ree-1.8.7-2011.03@chili/gems/actionpack-2.3.14/lib/action_controller/dispatcher.rb:101:in `dispatch_cgi'
/Users/hjust/.rvm/gems/ree-1.8.7-2011.03@chili/gems/actionpack-2.3.14/lib/action_controller/dispatcher.rb:27:in `dispatch'
/Users/hjust/.rvm/gems/ree-1.8.7-2011.03@chili/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb:76:in `process'
/Users/hjust/.rvm/gems/ree-1.8.7-2011.03@chili/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb:74:in `synchronize'
/Users/hjust/.rvm/gems/ree-1.8.7-2011.03@chili/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb:74:in `process'
/Users/hjust/.rvm/gems/ree-1.8.7-2011.03@chili/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:159:in `process_client'
/Users/hjust/.rvm/gems/ree-1.8.7-2011.03@chili/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:158:in `each'
/Users/hjust/.rvm/gems/ree-1.8.7-2011.03@chili/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:158:in `process_client'
/Users/hjust/.rvm/gems/ree-1.8.7-2011.03@chili/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:285:in `run'
/Users/hjust/.rvm/gems/ree-1.8.7-2011.03@chili/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:285:in `initialize'
/Users/hjust/.rvm/gems/ree-1.8.7-2011.03@chili/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:285:in `new'
/Users/hjust/.rvm/gems/ree-1.8.7-2011.03@chili/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:285:in `run'
/Users/hjust/.rvm/gems/ree-1.8.7-2011.03@chili/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:268:in `initialize'
/Users/hjust/.rvm/gems/ree-1.8.7-2011.03@chili/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:268:in `new'
/Users/hjust/.rvm/gems/ree-1.8.7-2011.03@chili/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:268:in `run'
/Users/hjust/.rvm/gems/ree-1.8.7-2011.03@chili/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:282:in `run'
/Users/hjust/.rvm/gems/ree-1.8.7-2011.03@chili/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:281:in `each'
/Users/hjust/.rvm/gems/ree-1.8.7-2011.03@chili/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:281:in `run'
/Users/hjust/.rvm/gems/ree-1.8.7-2011.03@chili/gems/mongrel-1.1.5/bin/mongrel_rails:128:in `run'
/Users/hjust/.rvm/gems/ree-1.8.7-2011.03@chili/gems/mongrel-1.1.5/bin/../lib/mongrel/command.rb:212:in `run'
/Users/hjust/.rvm/gems/ree-1.8.7-2011.03@chili/gems/mongrel-1.1.5/bin/mongrel_rails:281
/Users/hjust/.rvm/gems/ree-1.8.7-2011.03@chili/bin/mongrel_rails:19:in `load'
/Users/hjust/.rvm/gems/ree-1.8.7-2011.03@chili/bin/mongrel_rails:19
</pre>
<p>It seems to stem from a bug in Rack 1.1 which was fixed there with <a href="https://github.com/rack/rack/commit/f6f3c60938ea3b08f3292a2480e6753c293584e5" class="external">f6f3c60938</a> which is included in Rack 1.2 (which is incompatible with Rails 2.3 sadly).</p>
<p>During my tests I observed various similar errors which seem to stem from Mongrel using Rails' CGI interface in a way which doesn't fully work anymore. All the errors I observed doesn't stem from ChiliProject but from either Mongrel or Rails CGI interface. So as it stands now, I'd recommend one of two options:</p>
<ul>
<li>Don't use Mongrel but something like Thin or Unicorn. This would be the recommended option as Mongrel 1.x doesn't seem to be maintained anymore at all.</li>
<li>Use mongrel 1.2.0-pre (<code>gem install mongrel --pre</code>). That seemed to work during my tests if I apply the above mentioned rack patch, but I have no idea if it could break in other places.</li>
</ul> ChiliProject - Bug #896: Enabling "Authentication required" mode returns 404shttps://www.chiliproject.org/issues/896?journal_id=149422012-03-06T11:46:53+01:00Holger Justchiliproject@meine-er.de
<ul></ul><p>Another option (which most people do) is to use Passenger.</p>
<p>Given the age of Mongrel and the large amount of work-arounds which are required nowadays to keep it working, I see only slim changes of us fully supporting it.</p>
<p>We accept patches to make it work, but given that all the problems I observed stem from the (Rack, Rails, Mongrel) triumvirate, it's probably hard to get right and we would be moving way outside of our realm. Also things probably are going to get much worse once we moved to Rails 3.</p> ChiliProject - Bug #896: Enabling "Authentication required" mode returns 404shttps://www.chiliproject.org/issues/896?journal_id=149442012-03-06T14:31:41+01:00Yehuda Katzyehuda+chiliproject@ymkatz.net
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Closed</i></li></ul><p>cPanel will start supporting Passenger in the next version.<br />In the mean time, I will keep "Authentication required" off. Everything seems to be working besides that.</p> ChiliProject - Bug #896: Enabling "Authentication required" mode returns 404shttps://www.chiliproject.org/issues/896?journal_id=149462012-03-06T17:02:25+01:00Yehuda Katzyehuda+chiliproject@ymkatz.net
<ul></ul><p>As a note, another problem I have been having is caused by the same issue.<br />/sys/fetch_changesets appears to the browser to return a 404 no matter what, but the production.log shows that the correct response is being returned.</p>