Project

General

Profile

Can't log in after upgrade from 2.3.x to 2.5.2

Added by Eric Palmitesta over 9 years ago

I'm in need of some help getting redmine updated to the latest version. I'm upgrading from 2.3.x to 2.5.2 via bitnami redmine stack. I backed up the database and uploaded files, stopped/uninstalled the old services, uninstalled the old stack. Installed the new stack, started it, restored the database and uploaded files. Redmine appears to start up fine (eg. the list of projects is what I expect), but when I attempt to log in, I get a 500 internal error.

The log says

NoMethodError (undefined method `must_change_passwd?' for #<User:0x4fe1770>).

This post http://www.redmine.org/issues/15545 has the same error and refers to the redmine wiki which says to run "rake db:migrate RAILS_ENV=production" which I do from htdocs, but I get the error

You have already activated rake 10.1.0, but your Gemfile requires rake 10.1.1. Prepending `bundle exec` to your command may solve this.

When I prepend `bundle exec` I get

Mysql2::Error: Table 'queries_roles' already exists: CREATE TABLE `queries_roles` (`query_id` int(11) NOT NULL, `role_id` int(11) NOT NULL) ENGINE=InnoDBD:/redmine-2.5.2-1/apps/redmine/htdocs/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:245:in `query'

In my production.log I see dozens of lines which look like

Migrating to Setup (1)
Migrating to IssueMove (2)
Migrating to IssueAddNote (3)

the last line of which is

Migrating to CreateQueriesRoles (20130602092539)

which might relate to that queries_roles table error above?

I ran "D:\redmine-2.5.2-1\apps\redmine>RAILS_ENV=production script/about" as indicated in the "How to requiest help" topic and got "'RAILS_ENV' is not recognized as an internal or external command, operable program or batch file."


Replies (3)

RE: Can't log in after upgrade from 2.3.x to 2.5.2 - Added by Jean-Baptiste Barth over 9 years ago

You could try: ruby script/about RAILS_ENV=production ; Windows doesn't support putting environment variables in front of the command.

The error about "must_change_passwd?" indicates a problem about your database, it may not be up-to-date, as you correctly guessed regarding the error messages. The source of the error is redmine not migrating the database correctly, the relevant error message being :

Mysql2::Error: Table 'queries_roles' already exists: CREATE TABLE `queries_roles` (`query_id` int(11) NOT NULL, `role_id` int(11) NOT NULL) ENGINE=InnoDBD:/redmine-2.5.2-1/apps/redmine/htdocs/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:245:in `query'

I have roughly 2 hypothesis:
  • either you are running a plugin (or you had previously installed a plugin, even if it's uninstalled now) which conflicts with the "queries_roles" table introduced in recent redmine version
  • either you already did this "db:migrate" step correctly but there was a problem during this transaction which left the "schema_migrations" (the table in which redmine/rails stores the current version of the database) in an incorrect state

A script/about output will help us I think...

RE: Can't log in after upgrade from 2.3.x to 2.5.2 - Added by Eric Palmitesta over 9 years ago

Here's script/about output:

Environment:
  Redmine version                2.5.2.stable
  Ruby version                   2.0.0-p481 (2014-05-08) [i386-mingw32]
  Rails version                  3.2.19
  Environment                    production
  Database adapter               Mysql2
SCM:
  Mercurial                      3.0.2
  Filesystem
Redmine plugins:
  no plugin installed

Here's my console:

D:\redmine-2.5.2-1\apps\redmine\htdocs>mysql -u root -p bitnami_redmine < D:\redmine-backup\redmine_backup.sql
Enter password: ********

D:\redmine-2.5.2-1\apps\redmine\htdocs>rake db:migrate RAILS_ENV=production
rake aborted!
You have already activated rake 10.1.0, but your Gemfile requires rake 10.1.1. Prepending `bundle exec` to your command may solve this.
D:/redmine-2.5.2-1/apps/redmine/htdocs/config/boot.rb:8:in `<top (required)>'
D:/redmine-2.5.2-1/apps/redmine/htdocs/config/application.rb:1:in `<top (required)>'
D:/redmine-2.5.2-1/apps/redmine/htdocs/Rakefile:5:in `<top (required)>'
(See full trace by running task with --trace)

D:\redmine-2.5.2-1\apps\redmine\htdocs>bundle exec rake db:migrate RAILS_ENV=production
DL is deprecated, please use Fiddle
==  CreateQueriesRoles: migrating =============================================
-- create_table(:queries_roles, {:id=>false})
rake aborted!
An error has occurred, all later migrations canceled:

Mysql2::Error: Table 'queries_roles' already exists: CREATE TABLE `queries_roles` (`query_id` int(11) NOT NULL, `role_id` int(11) NOT NULL) ENGINE=InnoDBD:/redmine-2.5.2-1/apps/redmine/htdocs/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:245:in `query'
D:/redmine-2.5.2-1/apps/redmine/htdocs/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:245:in `block in execute'
D:/redmine-2.5.2-1/apps/redmine/htdocs/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract_adapter.rb:280:in `block in log'
D:/redmine-2.5.2-1/apps/redmine/htdocs/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.19/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
D:/redmine-2.5.2-1/apps/redmine/htdocs/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract_adapter.rb:275:in `log'
D:/redmine-2.5.2-1/apps/redmine/htdocs/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:245:in `execute'
D:/redmine-2.5.2-1/apps/redmine/htdocs/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.19/lib/active_record/connection_adapters/mysql2_adapter.rb:213:in `execute'
D:/redmine-2.5.2-1/apps/redmine/htdocs/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/schema_statements.rb:170:in `create_table'
D:/redmine-2.5.2-1/apps/redmine/htdocs/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:434:in `create_table'
D:/redmine-2.5.2-1/apps/redmine/htdocs/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.19/lib/active_record/migration.rb:466:in `block in method_missing'
D:/redmine-2.5.2-1/apps/redmine/htdocs/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.19/lib/active_record/migration.rb:438:in `block in say_with_time'
D:/redmine-2.5.2-1/apps/redmine/htdocs/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.19/lib/active_record/migration.rb:438:in `say_with_time'
D:/redmine-2.5.2-1/apps/redmine/htdocs/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.19/lib/active_record/migration.rb:458:in `method_missing'
D:/redmine-2.5.2-1/apps/redmine/htdocs/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.19/lib/active_record/migration.rb:334:in `method_missing'
D:/redmine-2.5.2-1/apps/redmine/htdocs/db/migrate/20130602092539_create_queries_roles.rb:3:in `up'
D:/redmine-2.5.2-1/apps/redmine/htdocs/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.19/lib/active_record/migration.rb:370:in `up'
D:/redmine-2.5.2-1/apps/redmine/htdocs/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.19/lib/active_record/migration.rb:410:in `block (2 levels) in migrate'
D:/redmine-2.5.2-1/apps/redmine/htdocs/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.19/lib/active_record/migration.rb:410:in `block in migrate'
D:/redmine-2.5.2-1/apps/redmine/htdocs/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:129:in `with_connection'
D:/redmine-2.5.2-1/apps/redmine/htdocs/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.19/lib/active_record/migration.rb:389:in `migrate'
D:in `migrate'
D:/redmine-2.5.2-1/apps/redmine/htdocs/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.19/lib/active_record/migration.rb:720:in `block (2 levels) in migrate'
D:/redmine-2.5.2-1/apps/redmine/htdocs/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.19/lib/active_record/migration.rb:777:in `call'
D:/redmine-2.5.2-1/apps/redmine/htdocs/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.19/lib/active_record/migration.rb:777:in `ddl_transaction'
D:/redmine-2.5.2-1/apps/redmine/htdocs/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.19/lib/active_record/migration.rb:719:in `block in migrate'
D:/redmine-2.5.2-1/apps/redmine/htdocs/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.19/lib/active_record/migration.rb:700:in `each'
D:/redmine-2.5.2-1/apps/redmine/htdocs/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.19/lib/active_record/migration.rb:700:in `migrate'
D:/redmine-2.5.2-1/apps/redmine/htdocs/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.19/lib/active_record/migration.rb:570:in `up'
D:/redmine-2.5.2-1/apps/redmine/htdocs/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.19/lib/active_record/migration.rb:551:in `migrate'
D:/redmine-2.5.2-1/apps/redmine/htdocs/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.19/lib/active_record/railties/databases.rake:193:in `block (2 levels) in <top (required)>'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)

D:\redmine-2.5.2-1\apps\redmine\htdocs>

Here's production.log

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 :system. Overwriting existing method Enumeration.system.
Creating scope :sorted. Overwriting existing method User.sorted.
Creating scope :sorted. Overwriting existing method Group.sorted.
Creating scope :sorted. Overwriting existing method User.sorted.
Started GET "/redmine/" for 127.0.0.1 at 2014-08-12 10:08:57 -0400
Processing by WelcomeController#index as HTML
  Current user: anonymous
  Rendered welcome/index.html.erb within layouts/base (89.0ms)
Completed 200 OK in 533.0ms (Views: 154.0ms | ActiveRecord: 48.0ms)
Started GET "/redmine/login" for 127.0.0.1 at 2014-08-12 10:09:45 -0400
Processing by AccountController#login as HTML
  Current user: anonymous
  Rendered account/login.html.erb within layouts/base (10.0ms)
Completed 200 OK in 99.0ms (Views: 91.0ms | ActiveRecord: 4.0ms)
Started POST "/redmine/login" for 127.0.0.1 at 2014-08-12 10:09:53 -0400
Processing by AccountController#login as HTML
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"l0AerK0oxVJAJTG2vNrrE2WfrJKGyLBQcgNdFyBNb/Q=", "back_url"=>"http://localhost/redmine/", "username"=>"eric", "password"=>"[FILTERED]", "login"=>"Login »"}
  Current user: anonymous
Successful authentication for 'eric' from ::1 at 2014-08-12 14:09:54 UTC
Completed 500 Internal Server Error in 220.0ms

NoMethodError (undefined method `must_change_passwd?' for #<User:0x6c27468>):
  app/models/user.rb:291:in `must_change_password?'
  app/controllers/application_controller.rb:91:in `start_user_session'
  app/controllers/application_controller.rb:168:in `logged_user='
  app/controllers/account_controller.rb:253:in `successful_authentication'
  app/controllers/account_controller.rb:200:in `password_authentication'
  app/controllers/account_controller.rb:186:in `authenticate_user'
  app/controllers/account_controller.rb:40:in `login'

Connecting to database specified by database.yml
Migrating to Setup (1)
Migrating to IssueMove (2)
Migrating to IssueAddNote (3)
Migrating to ExportPdf (4)
Migrating to IssueStartDate (5)
Migrating to CalendarAndActivity (6)
Migrating to CreateJournals (7)
Migrating to CreateUserPreferences (8)
Migrating to AddHideMailPref (9)
Migrating to CreateComments (10)
Migrating to AddNewsCommentsCount (11)
Migrating to AddCommentsPermissions (12)
Migrating to CreateQueries (13)
Migrating to AddQueriesPermissions (14)
Migrating to CreateRepositories (15)
Migrating to AddRepositoriesPermissions (16)
Migrating to CreateSettings (17)
Migrating to SetDocAndFilesNotifications (18)
Migrating to AddIssueStatusPosition (19)
Migrating to AddRolePosition (20)
Migrating to AddTrackerPosition (21)
Migrating to SerializePossiblesValues (22)
Migrating to AddTrackerIsInRoadmap (23)
Migrating to AddRoadmapPermission (24)
Migrating to AddSearchPermission (25)
Migrating to AddRepositoryLoginAndPassword (26)
Migrating to CreateWikis (27)
Migrating to CreateWikiPages (28)
Migrating to CreateWikiContents (29)
Migrating to AddProjectsFeedsPermissions (30)
Migrating to AddRepositoryRootUrl (31)
Migrating to CreateTimeEntries (32)
Migrating to AddTimelogPermissions (33)
Migrating to CreateChangesets (34)
Migrating to CreateChanges (35)
Migrating to AddChangesetCommitDate (36)
Migrating to AddProjectIdentifier (37)
Migrating to AddCustomFieldIsFilter (38)
Migrating to CreateWatchers (39)
Migrating to CreateChangesetsIssues (40)
Migrating to RenameCommentToComments (41)
Migrating to CreateIssueRelations (42)
Migrating to AddRelationsPermissions (43)
Migrating to SetLanguageLengthToFive (44)
Migrating to CreateBoards (45)
Migrating to CreateMessages (46)
Migrating to AddBoardsPermissions (47)
Migrating to AllowNullVersionEffectiveDate (48)
Migrating to AddWikiDestroyPagePermission (49)
Migrating to AddWikiAttachmentsPermissions (50)
Migrating to AddProjectStatus (51)
Migrating to AddChangesRevision (52)
Migrating to AddChangesBranch (53)
Migrating to AddChangesetsScmid (54)
Migrating to AddRepositoriesType (55)
Migrating to AddRepositoriesChangesPermission (56)
Migrating to AddVersionsWikiPageTitle (57)
Migrating to AddIssueCategoriesAssignedToId (58)
Migrating to AddRolesAssignable (59)
Migrating to ChangeChangesetsCommitterLimit (60)
Migrating to AddRolesBuiltin (61)
Migrating to InsertBuiltinRoles (62)
Migrating to AddRolesPermissions (63)
Migrating to DropPermissions (64)
Migrating to AddSettingsUpdatedOn (65)
Migrating to AddCustomValueCustomizedIndex (66)
Migrating to CreateWikiRedirects (67)
Migrating to CreateEnabledModules (68)
Migrating to AddIssuesEstimatedHours (69)
Migrating to ChangeAttachmentsContentTypeLimit (70)
Migrating to AddQueriesColumnNames (71)
Migrating to AddEnumerationsPosition (72)
Migrating to AddEnumerationsIsDefault (73)
Migrating to AddAuthSourcesTls (74)
Migrating to AddMembersMailNotification (75)
Migrating to AllowNullPosition (76)
Migrating to RemoveIssueStatusesHtmlColor (77)
Migrating to AddCustomFieldsPosition (78)
Migrating to AddUserPreferencesTimeZone (79)
Migrating to AddUsersType (80)
Migrating to CreateProjectsTrackers (81)
Migrating to AddMessagesLocked (82)
Migrating to AddMessagesSticky (83)
Migrating to ChangeAuthSourcesAccountLimit (84)
Migrating to AddRoleTrackerOldStatusIndexToWorkflows (85)
Migrating to AddCustomFieldsSearchable (86)
Migrating to ChangeProjectsDescriptionToText (87)
Migrating to AddCustomFieldsDefaultValue (88)
Migrating to AddAttachmentsDescription (89)
Migrating to ChangeVersionsNameLimit (90)
Migrating to ChangeChangesetsRevisionToString (91)
Migrating to ChangeChangesFromRevisionToString (92)
Migrating to AddWikiPagesProtected (93)
Migrating to ChangeProjectsHomepageLimit (94)
Migrating to AddWikiPagesParentId (95)
Migrating to AddCommitAccessPermission (96)
Migrating to AddViewWikiEditsPermission (97)
Migrating to SetTopicAuthorsAsWatchers (98)
Migrating to AddDeleteWikiPagesAttachmentsPermission (99)
Migrating to AddChangesetsUserId (100)
Migrating to PopulateChangesetsUserId (101)
Migrating to AddCustomFieldsEditable (102)
Migrating to SetCustomFieldsEditable (103)
Migrating to AddProjectsLftAndRgt (104)
Migrating to BuildProjectsTree (105)
Migrating to RemoveProjectsProjectsCount (106)
Migrating to AddOpenIdAuthenticationTables (107)
Migrating to AddIdentityUrlToUsers (108)
Migrating to AddWatchersUserIdTypeIndex (20090214190337)
Migrating to AddQueriesSortCriteria (20090312172426)
Migrating to AddProjectsTrackersUniqueIndex (20090312194159)
Migrating to ExtendSettingsName (20090318181151)
Migrating to AddTypeToEnumerations (20090323224724)
Migrating to UpdateEnumerationsToSti (20090401221305)
Migrating to AddActiveFieldToEnumerations (20090401231134)
Migrating to AddProjectToEnumerations (20090403001910)
Migrating to AddParentIdToEnumerations (20090406161854)
Migrating to AddQueriesGroupBy (20090425161243)
Migrating to CreateMemberRoles (20090503121501)
Migrating to PopulateMemberRoles (20090503121505)
Migrating to DropMembersRoleId (20090503121510)
Migrating to FixMessagesStickyNull (20090614091200)
Migrating to PopulateUsersType (20090704172350)
Migrating to CreateGroupsUsers (20090704172355)
Migrating to AddMemberRolesInheritedFrom (20090704172358)
Migrating to FixUsersCustomValues (20091010093521)
Migrating to AddMissingIndexesToWorkflows (20091017212227)
Migrating to AddMissingIndexesToCustomFieldsProjects (20091017212457)
Migrating to AddMissingIndexesToMessages (20091017212644)
Migrating to AddMissingIndexesToRepositories (20091017212938)
Migrating to AddMissingIndexesToComments (20091017213027)
Migrating to AddMissingIndexesToEnumerations (20091017213113)
Migrating to AddMissingIndexesToWikiPages (20091017213151)
Migrating to AddMissingIndexesToWatchers (20091017213228)
Migrating to AddMissingIndexesToAuthSources (20091017213257)
Migrating to AddMissingIndexesToDocuments (20091017213332)
Migrating to AddMissingIndexesToTokens (20091017213444)
Migrating to AddMissingIndexesToChangesets (20091017213536)
Migrating to AddMissingIndexesToIssueCategories (20091017213642)
Migrating to AddMissingIndexesToMemberRoles (20091017213716)
Migrating to AddMissingIndexesToBoards (20091017213757)
Migrating to AddMissingIndexesToUserPreferences (20091017213835)
Migrating to AddMissingIndexesToIssues (20091017213910)
Migrating to AddMissingIndexesToMembers (20091017214015)
Migrating to AddMissingIndexesToCustomFields (20091017214107)
Migrating to AddMissingIndexesToQueries (20091017214136)
Migrating to AddMissingIndexesToTimeEntries (20091017214236)
Migrating to AddMissingIndexesToNews (20091017214308)
Migrating to AddMissingIndexesToUsers (20091017214336)
Migrating to AddMissingIndexesToAttachments (20091017214406)
Migrating to AddMissingIndexesToWikiContents (20091017214440)
Migrating to AddMissingIndexesToCustomValues (20091017214519)
Migrating to AddMissingIndexesToJournals (20091017214611)
Migrating to AddMissingIndexesToIssueRelations (20091017214644)
Migrating to AddMissingIndexesToWikiRedirects (20091017214720)
Migrating to AddMissingIndexesToCustomFieldsTrackers (20091017214750)
Migrating to AddActivityIndexes (20091025163651)
Migrating to AddVersionsStatus (20091108092559)
Migrating to AddViewIssuesPermission (20091114105931)
Migrating to AddDefaultDoneRatioToIssueStatus (20091123212029)
Migrating to AddVersionsSharing (20091205124427)
Migrating to AddLftAndRgtIndexesToProjects (20091220183509)
Migrating to AddIndexToSettingsName (20091220183727)
Migrating to AddIndexesToIssueStatus (20091220184736)
Migrating to RemoveEnumerationsOpt (20091225164732)
Migrating to ChangeWikiContentsTextLimit (20091227112908)
Migrating to ChangeUsersMailNotificationToString (20100129193402)
Migrating to UpdateMailNotificationValues (20100129193813)
Migrating to AddIndexOnChangesetsScmid (20100221100219)
Migrating to AddIssuesNestedSetsColumns (20100313132032)
Migrating to AddIndexOnIssuesNestedSet (20100313171051)
Migrating to ChangeChangesPathLengthLimit (20100705164950)
Migrating to EnableCalendarAndGanttModulesWhereAppropriate (20100819172912)
Migrating to AddUniqueIndexOnMembers (20101104182107)
Migrating to AddCustomFieldsVisible (20101107130441)
Migrating to ChangeProjectsNameLimit (20101114115114)
Migrating to ChangeProjectsIdentifierLimit (20101114115359)
Migrating to AddWorkflowsAssigneeAndAuthor (20110220160626)
Migrating to AddUsersSalt (20110223180944)
Migrating to SaltUserPasswords (20110223180953)
Migrating to AddRepositoriesPathEncoding (20110224000000)
Migrating to ChangeRepositoriesPasswordLimit (20110226120112)
Migrating to ChangeAuthSourcesAccountPasswordLimit (20110226120132)
Migrating to ChangeJournalDetailsValuesToText (20110227125750)
Migrating to AddRepositoriesLogEncoding (20110228000000)
Migrating to CopyRepositoriesLogEncoding (20110228000100)
Migrating to AddIndexToUsersType (20110401192910)
Migrating to AddRolesIssuesVisibility (20110408103312)
Migrating to AddIssuesIsPrivate (20110412065600)
Migrating to AddRepositoriesExtraInfo (20110511000000)
Migrating to CreateChangesetParents (20110902000000)
Migrating to AddUniqueIndexToIssueRelations (20111201201315)
Migrating to AddRepositoriesIdentifier (20120115143024)
Migrating to AddRepositoriesIsDefault (20120115143100)
Migrating to SetDefaultRepositories (20120115143126)
Migrating to AddCustomFieldsMultiple (20120127174243)
Migrating to ChangeUsersLoginLimit (20120205111326)
Migrating to ChangeAttachmentsContainerDefaults (20120223110929)
Migrating to AddAuthSourcesFilter (20120301153455)
Migrating to ChangeRepositoriesToFullSti (20120422150750)
Migrating to AddTrackersFieldsBits (20120705074331)
Migrating to AddAuthSourcesTimeout (20120707064544)
Migrating to AddWorkflowsType (20120714122000)
Migrating to UpdateWorkflowsToSti (20120714122100)
Migrating to AddWorkflowsRuleFields (20120714122200)
Migrating to AddBoardsParentId (20120731164049)
Migrating to AddJournalsPrivateNotes (20120930112914)
Migrating to AddEnumerationsPositionName (20121026002032)
Migrating to PopulateEnumerationsPositionName (20121026003537)
Migrating to AddQueriesType (20121209123234)
Migrating to UpdateQueriesToSti (20121209123358)
Migrating to AddAttachmentsDiskDirectory (20121213084931)
Migrating to SplitDocumentsPermissions (20130110122628)
Migrating to AddUniqueIndexOnTokensValue (20130201184705)
Migrating to AddProjectsInheritMembers (20130202090625)
Migrating to AddUniqueIndexOnCustomFieldsTrackers (20130207175206)
Migrating to AddUniqueIndexOnCustomFieldsProjects (20130207181455)
Migrating to ChangeUsersLastnameLengthTo255 (20130215073721)
Migrating to AddIssuesClosedOn (20130215111127)
Migrating to PopulateIssuesClosedOn (20130215111141)
Migrating to RemoveIssuesDefaultFkValues (20130217094251)
Migrating to CreateQueriesRoles (20130602092539)

Started POST "/redmine/login" for 127.0.0.1 at 2014-08-12 10:16:36 -0400
Processing by AccountController#login as HTML
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"l0AerK0oxVJAJTG2vNrrE2WfrJKGyLBQcgNdFyBNb/Q=", "back_url"=>"http://localhost/redmine/", "username"=>"eric", "password"=>"[FILTERED]", "login"=>"Login »"}
  Current user: anonymous
Successful authentication for 'eric' from ::1 at 2014-08-12 14:16:36 UTC
Completed 500 Internal Server Error in 41.0ms

NoMethodError (undefined method `must_change_passwd?' for #<User:0x3cc57d8>):
  app/models/user.rb:291:in `must_change_password?'
  app/controllers/application_controller.rb:91:in `start_user_session'
  app/controllers/application_controller.rb:168:in `logged_user='
  app/controllers/account_controller.rb:253:in `successful_authentication'
  app/controllers/account_controller.rb:200:in `password_authentication'
  app/controllers/account_controller.rb:186:in `authenticate_user'
  app/controllers/account_controller.rb:40:in `login'

I suppose I could re-install the old 2.3.x bitnami redmine stack but that's not much of a solution considering the goal is to keep up with newer releases. Where do I go from here?

RE: Can't log in after upgrade from 2.3.x to 2.5.2 - Added by Jean-Baptiste Barth over 9 years ago

Well, I confirm there might be a problem with a previous db:migrate step. We can confirm this by running some SQL requests in your mysql instance. You can connect to it in a console with:

bundle exec rails dbconsole production

Or use any other tool you know with mysql.

Then we can confirm if migrations have been executed with:

select * from schema_migrations where version like '201%' and version >= "20130602092539";

It will tell us if "CreateQueriesRoles" has been run or not, I guess you won't have many results but who knows.

While you're in SQL console, you may want to run:

describe queries_roles;

So that I can see if the existing queries_roles has the correct structure.

Depending on the results, we may be able to inject false data so that redmine is happy.

(but anyway, first time I see this on a transactionnal db like mysql ; if a previous "db:migrate" step has succeeded, it should have included the migration ID in the "schema_migrations" table)

    (1-3/3)