Installation

Can't upgrade Database on 2.17

Can't upgrade Database on 2.17

by Tim Alderson -
Number of replies: 2

Upgraded from 2.16 to 2.17 on Ubuntu 20.04 using the instructions at https://webwork.maa.org/wiki/Release_notes_for_WeBWorK_2.17#Upgrade_Instructions. 

Most seems to have gone smoothly, but in the very last step, > upgrade_admin_db.pl , executing "./upgrade_admin_db.pl" throws an error:

You need to set the WEBWORK_ROOT environment variable.\n at ./upgrade_admin_db.pl line 20.
BEGIN failed--compilation aborted at ./upgrade_admin_db.pl line 23.

Now it is impossible for anyone to login via the web. Upon attempting to login the error reported is as follows:

Error record identifier

26de56ba-097c-5514-be65-49be364a5211::23b95a0a-174f-11ed-8830-af143d5b2172

Warning messages

  • It looks like the database is missing a column. You may need to upgrade your course tables. If this is the admin course then you will need to upgrade the admin tables using the upgrade_admin_db.pl script. at /opt/webwork/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Std.pm line 876.

Error messages

DBD::mysql::st execute failed: Unknown column 'set_id' in 'field list' at /opt/webwork/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Std.pm line 881.

Call stack

The following information can help locate the source of the problem.

  • in WeBWorK::DB::Schema::NewSQL::Std::handle_error called at line 469 of /opt/webwork/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Std.pm
  • in WeBWorK::DB::Schema::NewSQL::Std::_get_fields_where_prepex called at line 437 of /opt/webwork/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Std.pm
  • in WeBWorK::DB::Schema::NewSQL::Std::get_fields_where called at line 497 of /opt/webwork/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Std.pm
  • in WeBWorK::DB::Schema::NewSQL::Std::get_records_where called at line 796 of /opt/webwork/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Std.pm
  • in WeBWorK::DB::Schema::NewSQL::Std::gets called at line 768 of /opt/webwork/webwork2/lib/WeBWorK/DB.pm
  • in WeBWorK::DB::getKeys called at line 763 of /opt/webwork/webwork2/lib/WeBWorK/DB.pm
  • in WeBWorK::DB::getKey called at line 786 of /opt/webwork/webwork2/lib/WeBWorK/Authen.pm
  • in WeBWorK::Authen::check_session called at line 529 of /opt/webwork/webwork2/lib/WeBWorK/Authen.pm
  • in WeBWorK::Authen::verify_normal_user called at line 309 of /opt/webwork/webwork2/lib/WeBWorK/Authen.pm
  • in WeBWorK::Authen::do_verify called at line 206 of /opt/webwork/webwork2/lib/WeBWorK/Authen.pm
  • in WeBWorK::Authen::verify called at line 150 of /opt/webwork/webwork2/lib/WeBWorK/Authen.pm
  • in WeBWorK::Authen::call_next_authen_method called at line 203 of /opt/webwork/webwork2/lib/WeBWorK/Authen.pm
  • in WeBWorK::Authen::verify called at line 306 of /opt/webwork/webwork2/lib/WeBWorK.pmHelp would be most appreciated.

Help would be most appreciated. Thanks!
In reply to Tim Alderson

Re: Can't upgrade Database on 2.17

by Danny Glin -
Using any of the command line scripts require that the WEBWORK_ROOT variable be set in your shell (see https://webwork.maa.org/wiki/Installation_Manual_for_2.17_on_Ubuntu#Configuring_the_Shell).

If you only run scripts occasionally you can set the variable just for the current session by running
export WEBWORK_ROOT=/opt/webwork/webwork2

followed by whichever script you want to run.
In reply to Danny Glin

Re: Can't upgrade Database on 2.17

by Tim Alderson -

Thanks Danny. Turns out I needed to login as wwadmin instead of my usual account. I can now login successfully, but there are several more issues...I will start a new thread