Arthur Clément
2010-May-10 16:29 UTC
[Ovirt-devel] Rails/mongrel/httpd issue - F13, rails 2.3.5
Hi, I have an issue with mongrel and rails. I add -B option(debug) to mongrel_rails in /etc/init.d/mongrel-rails but it didn't display more logs : http://ovirt.pastebin.com/N5v94cTu This is the page I get when I try to reach the ovirt web interface, I see the html tags (kerberos auth is working) : <html><body>You are being <a href="http://ovirt.admin.virt.par.lng/ovirt/login/login">redirected</a>.</body></html> and logs : ==> rails.log <= Processing DashboardController#index (for 10.75.128.51 at 2010-05-10 10:37:25) [GET] Redirected to http://ovirt.admin.virt.par.lng/ovirt/login/login Filter chain halted as [:is_logged_in] rendered_or_redirected. Completed in 5ms (DB: 28) | 302 Found [http://ovirt.admin.virt.par.lng/ovirt/] ==> mongrel.log <=Mon May 10 10:37:25 +0200 2010: Error calling Dispatcher.dispatch #<NoMethodError: undefined method `[]' for nil:NilClass> /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/cgi.rb:108:in `send_cookies' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/cgi.rb:136:in `out' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/http_response.rb:65:in `start' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/cgi.rb:135:in `out' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb:81:in `process' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:159:in `process_client' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:158:in `each' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:158:in `process_client' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:285:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:285:in `initialize' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:285:in `new' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:285:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:268:in `initialize' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:268:in `new' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:268:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:282:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:281:in `each' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:281:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:128:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/command.rb:212:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:281 /usr/bin/mongrel_rails:19:in `load' /usr/bin/mongrel_rails:19 gems list : http://ovirt.pastebin.com/B5s3cpKy I'm looking for any clue. -- Arthur CLEMENT Linagora Paris
Arthur Clément
2010-May-18 09:36 UTC
[Ovirt-devel] Rails/mongrel/httpd issue - F13, rails 2.3.5
Hi
Thanks a colleague (Patrick Guiran), we found the trick to solve the problem.
Here is the patch to apply from the mongrel root directory :
===================================--- lib/mongrel/cgi.rb 2010-05-18
11:20:47.414269158 +0200
+++ lib/mongrel/cgi.rb 2010-05-18 11:20:09.328271509 +0200
@@ -105,7 +105,8 @@
when Hash
cookie.each_value {|c| to['Set-Cookie'] = c.to_s}
else
- to['Set-Cookie'] = options['cookie'].to_s
+ # patched by pguiran at linagora.com (18/05/10)
+ to['Set-Cookie'] = cookie.to_s
end
@head.delete('cookie')
===================================
After some search, we found that this bug is corrected on the mongrel trunk,
and was written by "Evan Weaver", on march 2008, and commited by
"Matt
Aimonetti", on march 2009.
Here is the link of the commit :
http://github.com/fauna/mongrel/commit/7c9d988d4de2e08d67f95ca209196427fd89c9af
our bugs is designed as the bug #16:
- Close #16, XXX needs audit! (CGIWrapper "options" attr_reader has no
corresponding @options variable).
Regards,
Arthur
On lundi 10 mai 2010 18:29:33 Arthur Cl?ment wrote:> Hi,
>
> I have an issue with mongrel and rails. I add -B option(debug) to
> mongrel_rails in /etc/init.d/mongrel-rails but it didn't display more
logs
> : http://ovirt.pastebin.com/N5v94cTu
>
>
> This is the page I get when I try to reach the ovirt web interface, I see
> the html tags (kerberos auth is working) :
>
> <html><body>You are being <a
>
href="http://ovirt.admin.virt.par.lng/ovirt/login/login">redirected</a>.</
> body></html>
>
>
> and logs :
>
>
> ==> rails.log <=>
>
> Processing DashboardController#index (for 10.75.128.51 at 2010-05-10
> 10:37:25) [GET] Redirected to
> http://ovirt.admin.virt.par.lng/ovirt/login/login
> Filter chain halted as [:is_logged_in] rendered_or_redirected.
> Completed in 5ms (DB: 28) | 302 Found
> [http://ovirt.admin.virt.par.lng/ovirt/]
>
> ==> mongrel.log <=> Mon May 10 10:37:25 +0200 2010: Error calling
Dispatcher.dispatch
> #<NoMethodError: undefined method `[]' for nil:NilClass>
> /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/cgi.rb:108:in
> `send_cookies'
> /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/cgi.rb:136:in
> `out'
> /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/http_response
> .rb:65:in `start'
> /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/cgi.rb:135:in
> `out'
> /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb:81:i
> n `process'
> /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:159:in
> `process_client'
> /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:158:in
> `each'
> /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:158:in
> `process_client'
> /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:285:in
> `run'
> /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:285:in
> `initialize'
> /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:285:in
> `new'
> /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:285:in
> `run'
> /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:268:in
> `initialize'
> /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:268:in
> `new'
> /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:268:in
> `run'
> /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.
> rb:282:in `run'
> /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.
> rb:281:in `each'
> /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.
> rb:281:in `run'
> /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:128:in
`run'
> /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/command.rb:21
> 2:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:281
> /usr/bin/mongrel_rails:19:in `load'
> /usr/bin/mongrel_rails:19
>
>
>
> gems list : http://ovirt.pastebin.com/B5s3cpKy
>
>
> I'm looking for any clue.
--
Arthur CLEMENT
Linagora Paris