migrating from sqlite3 to mysql, it worked, but can't login

Added by Hal Glenn about 1 month ago

The goal is to migrate from sqlite3 to mysql

I've been able to dump the sqlite3 database into mysql successfully.

I can swap the production redmine database back and forth between the sqlite copy and the mysql copy.

Between swapping I flush the catch with "bundle exec rake tmp:cache:clear RAILS_ENV=production"

The sqlite version works fine. The mysql version seems to be working fine until I try and login, then I get an error 500 page (Internal error), which says to check the logs.

The logs show that when you try and login, the LDAP connector is the last thing touch but maybe not related. What maybe interesting is if the user name is valid, it will fail a login and go to the 500 error, regardless of if the password is valid. If the user name is not valid it will just respond as such and not go to the 500 error. In the later, I think it does not bother hitting the LDAP interface. I don't see how it could be a LDAP interface issue because if I swap the database back to sqlite3 it works fine. I think something did not transfer well in a user authentication table, is that a thing?

Thanks all for any thoughts on the mater!

Log output

Started POST "/redmine-testing/login" for 192.168.20.29 at 2020-09-05 22:35:44 -0500
Processing by AccountController#login as HTML
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"Fu3l+3BBVvsHqpP961sz0MWNmf8q7fLXQ
STzAGKWL0BJmIMkrA2QzZOWKNdA8R2frGsgPUTrmtE26OaU4jCsbw==",
 "back_url"=>"http://intranet.2g/redmine-testing", "username"=>"test",
 "password"=>"[FILTERED]", "login"=>"Login"}
  Current user: anonymous
Completed 500 Internal Server Error in 12ms (ActiveRecord: 2.8ms)

Net::LDAP::Error (SSL_connect SYSCALL returned=5 errno=0 state=SSLv2/v3 read server hello A):
  app/models/auth_source_ldap.rb:190:in `get_user_dn'
  app/models/auth_source_ldap.rb:49:in `block in authenticate'
  app/models/auth_source_ldap.rb:110:in `block in with_timeout'
  app/models/auth_source_ldap.rb:109:in `with_timeout'
  app/models/auth_source_ldap.rb:48:in `authenticate'
  app/models/user.rb:324:in `check_password?'
  app/models/user.rb:230:in `try_to_login'
  app/controllers/account_controller.rb:210:in `password_authentication'
  app/controllers/account_controller.rb:205:in `authenticate_user'
  app/controllers/account_controller.rb:38:in `login'
  lib/redmine/sudo_mode.rb:63:in `sudo_mode'

Redmine Info

Environment:
  Redmine version                3.4.5.stable.17347
  Ruby version                   2.1.5-p273 (2014-11-13) [x86_64-linux]
  Rails version                  4.2.8
  Environment                    production
  Database adapter               Mysql2
SCM:
  Subversion                     1.9.3
  Mercurial                      2.8.2
  Cvs                            1.12.13
  Git                            2.7.4
  Filesystem
Redmine plugins:
  additionals                    2.0.10
  redmine_drawio                 0.8.1
  redmine_image_clipboard_paste  3.3.0
  redmine_lightbox2              0.4.3
  redmine_serial_number_field    1.0.0
  redmine_silencer               0.4.2
  redmine_theme_changer          0.3.0
  redmine_wiki_lists             0.0.9
  redmine_wktime                 2.9.1
  redmine_workflow_enhancements  0.5.0