Installation

2.19 upgrade_admin_db.pl issues

2.19 upgrade_admin_db.pl issues

by Troy Welch -
Number of replies: 5

Hi, new problem, new thread.

I'll put my primary question up front, followed by the issue. Note: I have shell level access to everything.

Perhaps I'm better off reinstalling 2.19 from scratch. Although, this is a dev server and I will need to do an upgrade on our production server, so I'll need to know that everything is working for this.

When running upgrade_admin_db.pl I get the following output:

Use of uninitialized value $courseName in concatenation (.) or string at /opt/webwork/webwork2/lib/WeBWorK/Utils/CourseIntegrityCheck.pm line 130.
Use of uninitialized value $courseName in regexp compilation at /opt/webwork/webwork2/lib/WeBWorK/Utils/CourseIntegrityCheck.pm line 141. (repeated 6 times)
...
Use of uninitialized value $courseName in regexp compilation at /opt/webwork/webwork2/lib/WeBWorK/Utils/CourseIntegrityCheck.pm line 148. (repeated 15 times)
...
Admin Course Up to Date

When I attempt to log in to the admin course (which is cleverly named 'admin') I get the following output: (I've got all the debug flags on)

Warning messages

  • Use of uninitialized value in string eq at /opt/webwork/webwork2/lib/WeBWorK/Authen.pm line 159.
  • 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 925.

Error messages

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

Context

  • 925: 			warn(
  • 926: 				"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."
  • 927: 			);
  • 928: 		}
  • 929: 
  • 930: 		die $errmsg;
  • 931: 	}
  • 932: }
  • 933: 
  • 934: sub DESTROY {
  • 935: }

Call stack

  • in Mojolicious::_die called at line 930 of /opt/webwork/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Std.pm
  • in WeBWorK::DB::Schema::NewSQL::Std::handle_error called at line 517 of /opt/webwork/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Std.pm
  • in WeBWorK::DB::Schema::NewSQL::Std::_get_fields_where_prepex called at line 485 of /opt/webwork/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Std.pm
  • in WeBWorK::DB::Schema::NewSQL::Std::get_fields_where called at line 545 of /opt/webwork/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Std.pm
  • in WeBWorK::DB::Schema::NewSQL::Std::get_records_where called at line 844 of /opt/webwork/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Std.pm
  • in WeBWorK::DB::Schema::NewSQL::Std::gets called at line 810 of /opt/webwork/webwork2/lib/WeBWorK/DB.pm
  • in WeBWorK::DB::getKey called at line 902 of /opt/webwork/webwork2/lib/WeBWorK/Authen.pm
  • in WeBWorK::Authen::check_session called at line 471 of /opt/webwork/webwork2/lib/WeBWorK/Authen.pm
  • in WeBWorK::Authen::verify_normal_user called at line 283 of /opt/webwork/webwork2/lib/WeBWorK/Authen.pm
  • in WeBWorK::Authen::do_verify called at line 171 of /opt/webwork/webwork2/lib/WeBWorK/Authen.pm
  • in WeBWorK::Authen::verify called at line 143 of /opt/webwork/webwork2/lib/WeBWorK/Authen.pm
  • in WeBWorK::Authen::call_next_authen_method called at line 157 of /opt/webwork/webwork2/lib/WeBWorK/Authen.pm
  • in WeBWorK::Authen::verify called at line 143 of /opt/webwork/webwork2/lib/WeBWorK/Authen.pm
  • in WeBWorK::Authen::call_next_authen_method called at line 157 of /opt/webwork/webwork2/lib/WeBWorK/Authen.pm
  • in WeBWorK::Authen::verify called at line 99 of /opt/webwork/webwork2/lib/WeBWorK/Authen/LTIAdvantage.pm
  • in WeBWorK::Authen::LTIAdvantage::verify called at line 176 of /opt/webwork/webwork2/lib/WeBWorK.pm
  • in (eval) called at line 60 of /opt/webwork/webwork2/lib/WeBWorK.pm
  • in WeBWorK::dispatch called at line 162 of /opt/webwork/webwork2/lib/Mojolicious/WeBWorK.pm
  • in (eval) called at line 162 of /opt/webwork/webwork2/lib/Mojolicious/WeBWorK.pm
  • in (eval) called at line 145 of /opt/webwork/webwork2/lib/Mojolicious/WeBWorK.pm
  • in Mojolicious::WeBWorK::__ANON__ called at line 15 of /usr/local/share/perl/5.34.0/Mojolicious/Plugins.pm
  • in Mojolicious::Plugins::__ANON__ called at line 18 of /usr/local/share/perl/5.34.0/Mojolicious/Plugins.pm
  • in Mojolicious::Plugins::emit_chain called at line 88 of /usr/local/share/perl/5.34.0/Mojolicious/Routes.pm
  • in Mojolicious::Routes::_action called at line 161 of /usr/local/share/perl/5.34.0/Mojolicious/Routes.pm
  • in Mojolicious::Routes::_controller called at line 44 of /usr/local/share/perl/5.34.0/Mojolicious/Routes.pm
  • in Mojolicious::Routes::continue called at line 46 of /usr/local/share/perl/5.34.0/Mojolicious/Routes.pm
  • in Mojolicious::Routes::continue called at line 46 of /usr/local/share/perl/5.34.0/Mojolicious/Routes.pm
  • in Mojolicious::Routes::continue called at line 52 of /usr/local/share/perl/5.34.0/Mojolicious/Routes.pm
  • in Mojolicious::Routes::dispatch called at line 127 of /usr/local/share/perl/5.34.0/Mojolicious.pm
  • in Mojolicious::dispatch called at line 136 of /usr/local/share/perl/5.34.0/Mojolicious.pm
  • in Mojolicious::__ANON__ called at line 15 of /usr/local/share/perl/5.34.0/Mojolicious/Plugins.pm
  • in Mojolicious::Plugins::__ANON__ called at line 203 of /usr/local/share/perl/5.34.0/Mojolicious.pm
  • in (eval) called at line 203 of /usr/local/share/perl/5.34.0/Mojolicious.pm
  • in Mojolicious::_exception called at line 15 of /usr/local/share/perl/5.34.0/Mojolicious/Plugins.pm
  • in Mojolicious::Plugins::__ANON__ called at line 18 of /usr/local/share/perl/5.34.0/Mojolicious/Plugins.pm
  • in Mojolicious::Plugins::emit_chain called at line 141 of /usr/local/share/perl/5.34.0/Mojolicious.pm
  • in Mojolicious::handler called at line 72 of /usr/local/share/perl/5.34.0/Mojo/Server.pm
  • in Mojo::Server::__ANON__ called at line 15 of /usr/local/share/perl/5.34.0/Mojo/EventEmitter.pm
  • in Mojo::EventEmitter::emit called at line 103 of /usr/local/share/perl/5.34.0/Mojo/Server/Daemon.pm
  • in Mojo::Server::Daemon::__ANON__ called at line 15 of /usr/local/share/perl/5.34.0/Mojo/EventEmitter.pm
  • in Mojo::EventEmitter::emit called at line 60 of /usr/local/share/perl/5.34.0/Mojo/Transaction/HTTP.pm
  • in Mojo::Transaction::HTTP::server_read called at line 224 of /usr/local/share/perl/5.34.0/Mojo/Server/Daemon.pm
  • in Mojo::Server::Daemon::_read called at line 202 of /usr/local/share/perl/5.34.0/Mojo/Server/Daemon.pm
  • in Mojo::Server::Daemon::__ANON__ called at line 15 of /usr/local/share/perl/5.34.0/Mojo/EventEmitter.pm
  • in Mojo::EventEmitter::emit called at line 109 of /usr/local/share/perl/5.34.0/Mojo/IOLoop/Stream.pm
  • in Mojo::IOLoop::Stream::_read called at line 57 of /usr/local/share/perl/5.34.0/Mojo/IOLoop/Stream.pm
  • in Mojo::IOLoop::Stream::__ANON__ called at line 141 of /usr/local/share/perl/5.34.0/Mojo/Reactor/Poll.pm
  • in (eval) called at line 141 of /usr/local/share/perl/5.34.0/Mojo/Reactor/Poll.pm
  • in Mojo::Reactor::Poll::_try called at line 54 of /usr/local/share/perl/5.34.0/Mojo/Reactor/EV.pm
  • in Mojo::Reactor::EV::__ANON__ called at line 32 of /usr/local/share/perl/5.34.0/Mojo/Reactor/EV.pm
  • in (eval) called at line 32 of /usr/local/share/perl/5.34.0/Mojo/Reactor/EV.pm
  • in Mojo::Reactor::EV::start called at line 134 of /usr/local/share/perl/5.34.0/Mojo/IOLoop.pm
  • in Mojo::IOLoop::start called at line 152 of /usr/local/share/perl/5.34.0/Mojo/Server/Prefork.pm
  • in Mojo::Server::Prefork::_spawn called at line 93 of /usr/local/share/perl/5.34.0/Mojo/Server/Prefork.pm
  • in Mojo::Server::Prefork::_manage called at line 78 of /usr/local/share/perl/5.34.0/Mojo/Server/Prefork.pm
  • in Mojo::Server::Prefork::run called at line 74 of /usr/local/share/perl/5.34.0/Mojo/Server/Hypnotoad.pm
  • in Mojo::Server::Hypnotoad::run called at line 14 of /usr/local/bin/hypnotoad

In reply to Troy Welch

Re: 2.19 upgrade_admin_db.pl issues

by Danny Glin -
One of the changes in 2.19 is that the location of the admin course is now configurable, and needs to be set in site.conf.

Make sure you have defined the variable $admin_course_id in site.conf to be the location of your admin course, which in your case (and for anyone upgrading from a previous version) will be 'admin'.
In reply to Danny Glin

Re: 2.19 upgrade_admin_db.pl issues

by Troy Welch -
Thanks Danny, that got me going, well until the next thing. Turns out I didn't pull the $admin_course_id in vimdiff over to my current site.conf file.

Have now done that, ran the upgrade_admin_db.pl script which added the missing database bits and I can get into the admin course fine now.

The next step is to upgrade existing courses, we only have about 4 or 5 on this server as we're using it to test. However, they are not showing up in the admin course or, for that matter, any of the other course-related menus in the admin course.

Is there a similar course id variable that I may have missed that is causing this?
In reply to Troy Welch

Re: 2.19 upgrade_admin_db.pl issues

by Glenn Rice -

There aren't any other configuration settings that would affect this.

There are two basic things that are checked to determine if a course is listed in the admin course (or anywhere else like the webwork2 home page).  Does the course have a "user" table in the database, and does the course directory appear in /opt/webwork/courses.  So those are the things to check.

In reply to Glenn Rice

Re: 2.19 upgrade_admin_db.pl issues

by Troy Welch -

Thanks Glenn, I tried a server reboot this morning and the admin course ran a couple of db related processes. All is fine now.

I really appreciate the time you take to help colleagues out. I'll take open source and helpful folks such as yourself any day over big tech.

Have a great day.

In reply to Troy Welch

Re: 2.19 upgrade_admin_db.pl issues

by Volkan Akgul -

I upgraded from version 2.15 to 2.19. I created a MySQL dump and then imported it into the new system.
In the mentioned site.conf, the admin_course_id value is already set to "admin." After that, I ran the upgrade_admin_db.pl script and saw the confirmation that it was updated, but I am still getting the following error.


WeBWorK error

An error occurred while processing your request.

For help, please send mail to this site's webmaster, including all of the following information as well as what what you were doing when the error occurred.

Error record identifier

aef3d35e-44da-5f2c-aa31-3066c08e436e::7e1d76a5-a706-11ef-a5fb-e73fab8e8d32

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 925.

Error messages

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

Context

  • 925: 			warn(
  • 926: 				"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."
  • 927: 			);
  • 928: 		}
  • 929: 
  • 930: 		die $errmsg;
  • 931: 	}
  • 932: }
  • 933: 
  • 934: sub DESTROY {
  • 935: }

Call stack

  • in Mojolicious::_die called at line 930 of /opt/webwork/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Std.pm
  • in WeBWorK::DB::Schema::NewSQL::Std::handle_error called at line 517 of /opt/webwork/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Std.pm
  • in WeBWorK::DB::Schema::NewSQL::Std::_get_fields_where_prepex called at line 485 of /opt/webwork/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Std.pm
  • in WeBWorK::DB::Schema::NewSQL::Std::get_fields_where called at line 545 of /opt/webwork/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Std.pm
  • in WeBWorK::DB::Schema::NewSQL::Std::get_records_where called at line 844 of /opt/webwork/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Std.pm
  • in WeBWorK::DB::Schema::NewSQL::Std::gets called at line 810 of /opt/webwork/webwork2/lib/WeBWorK/DB.pm
  • in WeBWorK::DB::getKey called at line 893 of /opt/webwork/webwork2/lib/WeBWorK/Authen.pm
  • in WeBWorK::Authen::check_session called at line 461 of /opt/webwork/webwork2/lib/WeBWorK/Authen.pm
  • in WeBWorK::Authen::verify_normal_user called at line 273 of /opt/webwork/webwork2/lib/WeBWorK/Authen.pm
  • in WeBWorK::Authen::do_verify called at line 161 of /opt/webwork/webwork2/lib/WeBWorK/Authen.pm
  • in WeBWorK::Authen::verify called at line 177 of /opt/webwork/webwork2/lib/WeBWorK.pm
  • in (eval) called at line 60 of /opt/webwork/webwork2/lib/WeBWorK.pm
  • in WeBWorK::dispatch called at line 162 of /opt/webwork/webwork2/lib/Mojolicious/WeBWorK.pm
  • in (eval) called at line 162 of /opt/webwork/webwork2/lib/Mojolicious/WeBWorK.pm
  • in (eval) called at line 145 of /opt/webwork/webwork2/lib/Mojolicious/WeBWorK.pm
  • in Mojolicious::WeBWorK::__ANON__ called at line 15 of /usr/share/perl5/Mojolicious/Plugins.pm
  • in Mojolicious::Plugins::__ANON__ called at line 18 of /usr/share/perl5/Mojolicious/Plugins.pm
  • in Mojolicious::Plugins::emit_chain called at line 88 of /usr/share/perl5/Mojolicious/Routes.pm
  • in Mojolicious::Routes::_action called at line 161 of /usr/share/perl5/Mojolicious/Routes.pm
  • in Mojolicious::Routes::_controller called at line 44 of /usr/share/perl5/Mojolicious/Routes.pm
  • in Mojolicious::Routes::continue called at line 46 of /usr/share/perl5/Mojolicious/Routes.pm
  • in Mojolicious::Routes::continue called at line 46 of /usr/share/perl5/Mojolicious/Routes.pm
  • in Mojolicious::Routes::continue called at line 52 of /usr/share/perl5/Mojolicious/Routes.pm
  • in Mojolicious::Routes::dispatch called at line 127 of /usr/share/perl5/Mojolicious.pm
  • in Mojolicious::dispatch called at line 136 of /usr/share/perl5/Mojolicious.pm
  • in Mojolicious::__ANON__ called at line 15 of /usr/share/perl5/Mojolicious/Plugins.pm
  • in Mojolicious::Plugins::__ANON__ called at line 203 of /usr/share/perl5/Mojolicious.pm
  • in (eval) called at line 203 of /usr/share/perl5/Mojolicious.pm
  • in Mojolicious::_exception called at line 15 of /usr/share/perl5/Mojolicious/Plugins.pm
  • in Mojolicious::Plugins::__ANON__ called at line 18 of /usr/share/perl5/Mojolicious/Plugins.pm
  • in Mojolicious::Plugins::emit_chain called at line 141 of /usr/share/perl5/Mojolicious.pm
  • in Mojolicious::handler called at line 72 of /usr/share/perl5/Mojo/Server.pm
  • in Mojo::Server::__ANON__ called at line 15 of /usr/share/perl5/Mojo/EventEmitter.pm
  • in Mojo::EventEmitter::emit called at line 103 of /usr/share/perl5/Mojo/Server/Daemon.pm
  • in Mojo::Server::Daemon::__ANON__ called at line 15 of /usr/share/perl5/Mojo/EventEmitter.pm
  • in Mojo::EventEmitter::emit called at line 60 of /usr/share/perl5/Mojo/Transaction/HTTP.pm
  • in Mojo::Transaction::HTTP::server_read called at line 224 of /usr/share/perl5/Mojo/Server/Daemon.pm
  • in Mojo::Server::Daemon::_read called at line 202 of /usr/share/perl5/Mojo/Server/Daemon.pm
  • in Mojo::Server::Daemon::__ANON__ called at line 15 of /usr/share/perl5/Mojo/EventEmitter.pm
  • in Mojo::EventEmitter::emit called at line 109 of /usr/share/perl5/Mojo/IOLoop/Stream.pm
  • in Mojo::IOLoop::Stream::_read called at line 57 of /usr/share/perl5/Mojo/IOLoop/Stream.pm
  • in Mojo::IOLoop::Stream::__ANON__ called at line 141 of /usr/share/perl5/Mojo/Reactor/Poll.pm
  • in (eval) called at line 141 of /usr/share/perl5/Mojo/Reactor/Poll.pm
  • in Mojo::Reactor::Poll::_try called at line 54 of /usr/share/perl5/Mojo/Reactor/EV.pm
  • in Mojo::Reactor::EV::__ANON__ called at line 32 of /usr/share/perl5/Mojo/Reactor/EV.pm
  • in (eval) called at line 32 of /usr/share/perl5/Mojo/Reactor/EV.pm
  • in Mojo::Reactor::EV::start called at line 134 of /usr/share/perl5/Mojo/IOLoop.pm
  • in Mojo::IOLoop::start called at line 38 of /usr/share/perl5/Mojo/Server/Daemon.pm
  • in Mojo::Server::Daemon::run called at line 31 of /usr/share/perl5/Mojolicious/Command/daemon.pm
  • in Mojolicious::Command::daemon::run called at line 57 of /usr/share/perl5/Mojolicious/Commands.pm
  • in Mojolicious::Commands::run called at line 184 of /usr/share/perl5/Mojolicious.pm
  • in Mojolicious::start called at line 82 of /usr/share/perl5/Mojolicious/Commands.pm
  • in Mojolicious::Commands::start_app called at line 44 of /opt/webwork/webwork2/bin/webwork2