Project

General

Profile

Cannot login

Added by Chad West about 10 years ago

Hello,

I've gone through and set up my installation of Redmine with Passenger and MySQL. I can get to my login page but not login with any of the users I've created in the specified dbs. Here is an output of passenger running production where I changed my SQL database to a test db with user test/test:

[root@redmine redmine]# passenger production -e start
Unknown command 'production'. Please type --help for options.
[root@redmine redmine]# passenger start -e production =============== Phusion Passenger Standalone web server started ===============
PID file: /var/www/redmine/tmp/pids/passenger.3000.pid
Log file: /var/www/redmine/log/passenger.3000.log
Environment: production
Accessible via: http://0.0.0.0:3000/

You can stop Phusion Passenger Standalone by pressing Ctrl-C.
Problems? Check http://www.modrails.com/documentation/Users%20guide%20Standalone.html#troubleshooting ===============================================================================
App 25206 stdout:
Connecting to database specified by database.yml
Creating scope :system. Overwriting existing method Enumeration.system.
Creating scope :sorted. Overwriting existing method Group.sorted.
Creating scope :sorted. Overwriting existing method User.sorted.
[ 2014-04-07 21:15:33.2063 25172/b4fffb70 Pool2/SmartSpawner.h:301 ]: Preloader for /var/www/redmine started on PID 25206, listening on unix:/tmp/passenger.1.0.25168/generation-0/backends/preloader.25206
App 25327 stdout:
Started GET "/" for 127.0.0.1 at 2014-04-07 21:15:33 -0400
Processing by WelcomeController#index as HTML
Current user: anonymous
Rendered welcome/index.html.erb within layouts/base (171.1ms)
Completed 200 OK in 591.8ms (Views: 258.9ms | ActiveRecord: 24.9ms)
Started GET "/" for 10.***.***.*** at 2014-04-07 21:16:03 -0400
Processing by WelcomeController#index as HTML
Current user: anonymous
Rendered welcome/index.html.erb within layouts/base (3.6ms)
Completed 200 OK in 43.1ms (Views: 21.3ms | ActiveRecord: 3.3ms)
Started GET "/login" for 10.***.***.*** at 2014-04-07 21:16:17 -0400
Processing by AccountController#login as HTML
Current user: anonymous
Rendered account/login.html.erb within layouts/base (4.1ms)
Completed 200 OK in 27.8ms (Views: 21.4ms | ActiveRecord: 1.0ms)
Started POST "/login" for 10.***.***.*** at 2014-04-07 21:16:22 -0400
Processing by AccountController#login as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"CRMLZG5A9jaEr/kQGSqZtKKi340YIMbgkIRphzl/UCA=", "back_url"=>"http://10.***.***.***/", "username"=>"test", "password"=>"[FILTERED]", "login"=>"Login »"}
Current user: anonymous
Failed login for 'test' from 10.***.***.*** at 2014-04-08 01:16:22 UTC
Rendered account/login.html.erb within layouts/base (4.0ms)
Completed 200 OK in 34.7ms (Views: 21.4ms | ActiveRecord: 3.0ms)

Basically I can't get Rails/Passenger or whatever it needs to see MySQL database with my users.

[root@redmine redmine]# RAILS_ENV=production script/about

sh: darcs: command not found
sh: hg: command not found
sh: bzr: command not found
Environment:
Redmine version 2.5.0.stable
Ruby version 2.1.1-p76 (2014-02-24) [i686-linux]
Rails version 3.2.17
Environment production
Database adapter MySQL
SCM:
Subversion 1.6.11
Git 1.7.1
Filesystem
Redmine plugins:
no plugin installed
[root@redmine redmine]#


Replies (4)

RE: Cannot login - Added by Martin Denizet (redmine.org team member) about 10 years ago

Hi Chad,

Please note that Ruby 2.1 is NOT in the list of the supported versions.

If it's not your problem, your password could simply be wrong. To make sure, I suggest you to test in the console, it should go as bellow:

cd your/redminepath
./script/rails console production

Then in the console:
#Count the number of users
User.all.count
#Find the relevant user
u = User.find(:username => 'test')
# Reset the user password to "password" 
u.password = u.password_confirmation = "password" 
u.save
exit

Now try to login again with username:test password:password

Cheers,

RE: Cannot login - Added by Chad West about 10 years ago

It was the Ruby version. I used rvm to remove it and install 1.9.3, ran bundle install for the gems, then re-ran the rake commands and can now login just fine on my old SQL database. Thank you so much for your help.

RE: Cannot login - Added by Martin Denizet (redmine.org team member) about 10 years ago

Glad your problem is solved! If you want to thank me for my time, you can endorse my on Coderwall. It could help me when applying for a new job, who knows? ;)
Cheers

    (1-4/4)