Project

General

Profile

Can't login

Added by Yujin Boby almost 13 years ago

After upgrading, when i login, i get

Internal error

An error occurred on the page you were trying to access.
If you continue to experience problems please contact your redMine administrator for assistance.

I get following in production.log

root@server70 [/home/redmine/log]# cat production.log

Processing AccountController#login (for 67.228.104.121 at 2011-04-18 05:37:27) [POST]
  Parameters: {"action"=>"login", "authenticity_token"=>"LBpR21No90brUAZfri3cpOcaVbldjjA9bwqewv2uzV8=", "username"=>"admin", "controller"=>"account", "password"=>"[FILTERED]", "login"=>"Login »"}

NoMethodError (undefined method `destroy' for {}:Hash):
  app/controllers/application_controller.rb:89:in `logged_user='
  app/controllers/account_controller.rb:203:in `successful_authentication'
  app/controllers/account_controller.rb:155:in `password_authentication'
  app/controllers/account_controller.rb:142:in `authenticate_user'
  app/controllers/account_controller.rb:30:in `login'

Rendering /home/redmine/public/500.html (500 Internal Server Error)

Processing IssuesController#index (for 67.228.104.121 at 2011-04-18 05:37:27) [GET]
  Parameters: {"project_id"=>"vshare", "set_filter"=>"1", "action"=>"index", "controller"=>"issues", "per_page"=>"100", "sort"=>"fixed_version:desc,priority:desc,status"}
Rendering template within layouts/base
Rendering issues/index.rhtml
Completed in 110ms (View: 78, DB: 5) | 200 OK [http://labs.buyscripts.in/projects/vshare/issues?per_page=100&set_filter=1&sort=fixed_version%3Adesc%2Cpriority%3Adesc%2Cstatus]
root@server70 [/home/redmine/log]#

Anyone know how to fix this error ?


Replies (9)

RE: Can't login - Added by Etienne Massip almost 13 years ago

Related to #7857, this is a RoR bug which happens when you upgrade Rails to 2.3.11 only with already created sessions.

Try to clean your browser session cache for the domain.

RE: Can't login - Added by Yujin Boby almost 13 years ago

Thanks for the reply. I tried removing browser cache, also tried different browser that i never used to visit the web site. Still getting same 500 error. I also tried creating rails_6440_patch.rb as per [https://rails.lighthouseapp.com/projects/8994/tickets/6440-session-reset-undefined-method-destroy-for-hash #6440], that won't fix the problem.

gem list gives following on my server

root@server70 [/home]# gem list

*** LOCAL GEMS ***

actionmailer (2.3.11)
actionpack (2.3.11)
activerecord (2.3.11)
activeresource (2.3.11)
activesupport (2.3.11)
cgi_multipart_eof_fix (2.5.0)
daemons (1.0.10)
fastthread (1.0.7)
gem_plugin (0.2.3)
i18n (0.4.2)
mongrel (1.1.5)
mysql (2.8.1)
rack (1.1.2)
rails (2.3.11)
rake (0.8.4)
root@server70 [/home]#

Changing any of these version will fix the problem ?

RE: Can't login - Added by Yujin Boby almost 13 years ago

Yujin Boby wrote:

Thanks for the reply. I tried removing browser cache, also tried different browser that i never used to visit the web site. Still getting same 500 error. I also tried creating rails_6440_patch.rb as per [https://rails.lighthouseapp.com/projects/8994/tickets/6440-session-reset-undefined-method-destroy-for-hash 6440], that won't fix the problem.

gem list gives following on my server

[...]

Changing any of these version will fix the problem ?

RE: Can't login - Added by Etienne Massip almost 13 years ago

You should try to run the following commands :

rake tmp:cache:clear
rake tmp:sessions:clear

then don't forget to restart mongrel.

I still believe #7857 is the key, as your stack trace refers to the #reset_session method call at line 89 of application_controller.rb.

RE: Can't login - Added by Yujin Boby almost 13 years ago

I tried that, but won't get it fixed. I just see the SVN option is for experts. I am not good at ruby. So i installed current stable version from tar.gz, it worked. I have to reset the password to login (old pass did not worked, i used lost pass to get new pass). May be svn version store passwords in different way. So fat everything looks good, hope the downgrade won't break anything.

RE: Can't login - Added by Etienne Massip almost 13 years ago

Nope, same way (it's configurable), but latest stable requires Rails 2.3.5 while trunk requires 2.3.11 and your issue is only triggered with Rails 2.3.11.

RE: Can't login - Added by Yujin Boby almost 13 years ago

For using latest stable, i downgraded gems. Fist removed all gems one by one with gem uninstall. Then installed

gem install rails -v=2.3.5
gem uninstall rack -v=1.1.2

Still i get some error when running

rake generate_session_store

After some searches, i found

gem update --system 1.3.7

After running it, latest stable worked. What this "gem update --system 1.3.7" do ?

RE: Can't login - Added by Etienne Massip almost 13 years ago

Downgrade or upgrade RubyGems to version 1.3.7 which is the version required by Redmine latest stable and until 1.2.0.

If you want to know your actual RubyGems version, run gem environment (a.k.a. gem env).

RE: Can't login - Added by Yujin Boby almost 13 years ago

When i run "AILS_ENV=production ruby script/about", i get some warning about gem_dependency.rb, do i need to remove anything ? Before downgradinh to gem 1.3.7, i used to get many such messages.

root@server70 [/home/redmine]# RAILS_ENV=production ruby script/about
/home/redmine/config/../vendor/rails/railties/lib/rails/gem_dependency.rb:119:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010.  Use #requirement
About your application's environment
Ruby version              1.8.7 (x86_64-linux)
RubyGems version          1.3.7
Rack version              1.0
Rails version             2.3.5
Active Record version     2.3.5
Active Resource version   2.3.5
Action Mailer version     2.3.5
Active Support version    2.3.5
Edge Rails revision       unknown
Application root          /home/redmine
Environment               production
Database adapter          mysql
Database schema version   20110412065600
root@server70 [/home/redmine]#
    (1-9/9)