Project

General

Profile

Actions

Defect #4276

closed

Login failure running 0.8.7 in tomcat with jRuby

Added by Henning Sprang over 14 years ago. Updated over 12 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Accounts / authentication
Target version:
-
Start date:
2009-11-24
Due date:
% Done:

0%

Estimated time:
Resolution:
Cant reproduce
Affected version:

Description

Since Redmine 0.8.7 there is some problem at login (it's impossible) when running in a tomcat servlet container via jruby.

while up to 0.8.6 things work fine just as described here: http://www.redmine.org/wiki/redmine/HowTo_install_Redmine_in_Apache_Tomcat, in 0.8.7 I get the following error in the tomcat logs(for plain tomcat from apache) or in the webbrowser, after I enter my username and password in the login form:

Also, running jruby script/server starts up a working Redmine system.

Processing AccountController#login (for 0:0:0:0:0:0:0:1 at 2009-11-24 00:34:08) [GET]
  Session ID: e9a49954dcdac7702ddc1edf2d473079
  Parameters: {"controller"=>"account", "action"=>"login"}
Rendering template within layouts/base
Rendering account/login
Completed in 0.22800 (4 reqs/sec) | Rendering: 0.08900 (39%) | DB: 0.00700 (3%) | 200 OK [http://localhost/redmine/login]

Nov 24, 2009 12:34:13 AM org.apache.catalina.core.ApplicationContext log
INFO: 

Processing AccountController#login (for 0:0:0:0:0:0:0:1 at 2009-11-24 00:34:13) [POST]
  Session ID: 83ec5e2a4648a73e765ed577bdd72a83
  Parameters: {"authenticity_token"=>"5f953c05e0fefeefec0cea9c25bd556bd376aed8", "back_url"=>"http%3A%2F%2Flocalhost%3A8080%2Fredmine%2F", "username"=>"henning", "password"=>"[FILTERED]", "login"=>"Login ยป", "controller"=>"account", "action"=>"login"}

ActionController::InvalidAuthenticityToken (ActionController::InvalidAuthenticityToken):
    /vendor/rails/actionpack/lib/action_controller/request_forgery_protection.rb:86:in `verify_authenticity_token'
    /vendor/rails/activesupport/lib/active_support/callbacks.rb:173:in `evaluate_method'
    /vendor/rails/activesupport/lib/active_support/callbacks.rb:161:in `call'
    /vendor/rails/actionpack/lib/action_controller/filters.rb:191:in `call'
    /vendor/rails/actionpack/lib/action_controller/filters.rb:591:in `run_before_filters'
    /vendor/rails/actionpack/lib/action_controller/filters.rb:577:in `call_filters'
    /vendor/rails/actionpack/lib/action_controller/filters.rb:572:in `perform_action_with_filters'
    /vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:in `perform_action_with_benchmark'
    file:/lib/jruby-stdlib-1.4.0.jar!/META-INF/jruby.home/lib/ruby/1.8/benchmark.rb:293:in `measure'
    /vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:in `perform_action_with_benchmark'
    /vendor/rails/actionpack/lib/action_controller/rescue.rb:201:in `perform_action_with_rescue'
    /vendor/rails/actionpack/lib/action_controller/caching/sql_cache.rb:13:in `perform_action_with_caching'
    /vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:33:in `cache'
    /vendor/rails/activerecord/lib/active_record/query_cache.rb:8:in `cache'
    /vendor/rails/actionpack/lib/action_controller/caching/sql_cache.rb:12:in `perform_action_with_caching'
    /vendor/rails/actionpack/lib/action_controller/base.rb:529:in `process'
    /vendor/rails/actionpack/lib/action_controller/filters.rb:568:in `process_with_filters'
    /vendor/rails/actionpack/lib/action_controller/session_management.rb:130:in `process_with_session_management_support'
    /vendor/rails/actionpack/lib/action_controller/base.rb:389:in `process'
    /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:149:in `handle_request'
    /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:107:in `dispatch'
    /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:104:in `dispatch'
    /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:120:in `dispatch_cgi'
    /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:35:in `dispatch'
    file:/lib/jruby-rack-0.9.5.jar!/rack/adapter/rails_cgi.rb:24:in `call'
    file:/lib/jruby-rack-0.9.5.jar!/rack/adapter/rails.rb:35:in `serve_rails'
    file:/lib/jruby-rack-0.9.5.jar!/rack/adapter/rails.rb:40:in `call'
    file:/lib/jruby-rack-0.9.5.jar!/jruby/rack/rails.rb:148:in `call'
    file:/lib/jruby-rack-0.9.5.jar!/rack/handler/servlet.rb:18:in `call'
    :1

Software/dependency versions:

mysql 5.1.37-1ubuntu5
jruby1.2 1.2.0-2ubuntu2 (this is the one used when running the script/server way that works)
tomcat 6.0.18 from apache.org and tomcat 6.0.20 from Ubuntu Karmic.

Gems that are used for producing the war:

jruby-jars (1.4.0) (so this might actually be the jruby used when running the thing in tomcat!)
rake (0.8.7)
warbler (0.9.14)

$ ruby script/about
About your application's environment
Ruby version              1.8.7 (i486-linux)
RubyGems version          1.3.5
Rails version             2.1.2
Active Record version     2.1.2
Action Pack version       2.1.2
Active Resource version   2.1.2
Action Mailer version     2.1.2
Active Support version    2.1.2
Edge Rails revision       43a3183696396f57b23d505f9bfe5e791dba7eaa
Application root          /data/produktion/tmp/rails-tomcat-test/redmine-0.8.7
Environment               development
Database adapter          mysql
Actions

Also available in: Atom PDF