Installation

WW2.15 RHEL 8 Install - Unknown column 'ARRAY' Error

WW2.15 RHEL 8 Install - Unknown column 'ARRAY' Error

by Adam Chandler -
Number of replies: 8
I have been working through the updated install manual for 2.16 on a RHEL8 system (https://webwork.maa.org/wiki/Installation_Manual_for_2.16_on_RHEL8#Checking_MySQL) and have run in to quite a few issues , but think it almost working. If you follow the documentation it pulls 2.15 so I am working on 2.15 as opposed to 2.16. There are several point in the documentation (updated June 10) where you will run into issues with package names, services, and file locations being swapped between RHEL/CentOS and Debian based perspectives which could trip up users, but the primary issue I am running in to comes when generating the admin course for the first time. 

On creation no errors are returned in the CLI, but when I git the web page I get a "missing table" error, so I ran the upgrade_admin_db.pl script and again get no errors. Hitting the web page again yields a new error that I am struggling with:

WeBWorK error

An error occured while processing your request. For help, please send mail to this site's webmaster (root@localhost), including all of the following information as well as what what you were doing when the error occured.

Thu Jul 15 14:02:27 2021

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

Error messages

DBD::mysql::st execute failed: Unknown column 'ARRAY(0x55e5fb9c46e8)' in 'field list' at /opt/webwork/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Std.pm line 837.

Call stack

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

  • in WeBWorK::DB::Schema::NewSQL::Std::handle_error called at line 418 of /opt/webwork/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Std.pm
  • in WeBWorK::DB::Schema::NewSQL::Std::_get_fields_where_prepex called at line 386 of /opt/webwork/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Std.pm
  • in WeBWorK::DB::Schema::NewSQL::Std::get_fields_where called at line 484 of /opt/webwork/webwork2/lib/WeBWorK/DB.pm
  • in WeBWorK::DB::listUsers called at line 279 of /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Login.pm
  • in WeBWorK::ContentGenerator::Login::body called at line 155 of /opt/webwork/webwork2/lib/WeBWorK/Template.pm
  • in WeBWorK::Template::template called at line 610 of /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator.pm
  • in WeBWorK::ContentGenerator::content called at line 233 of /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator.pm
  • in WeBWorK::ContentGenerator::go called at line 386 of /opt/webwork/webwork2/lib/WeBWorK.pm
I have seen another post on the forum suggesting that the error is due to an incompatibility  with SQL::Abstract (v2.000001) so I followed the instructions to install the older version (1.87) and have verified it installed correctly.

Has anyone found a solution to this issue? 
In reply to Adam Chandler

Re: WW2.15 RHEL 8 Install - Unknown column 'ARRAY' Error

by Danny Glin -

I have only seen that error with respect to the SQL::Abstract issue that you quote.

Did you remove the newer version of SQL::Abstract before installing the older version?  You can check which version of the package is in use with the command

perl -MSQL::Abstract -e 'print $SQL::Abstract::Version ."\n";'

Also, as of yesterday afternoon the default version in GitHub is 2.16, so if you follow those instructions today it will pull down the code for 2.16.  You can update to the latest code by running 'git pull' in both the /opt/webwork/webwork2 and /opt/webwork/pg directories.

WeBWorK 2.16 now supports using SQL::Abstract::Classic instead of SQL::Abstract in order to avoid the incompatibility issues, so if you switch to WW 2.16 and install SQL::Abstract::Classic you can bypass the issues with SQL::Abstract.  If you go that route and are still getting the error, then the issue is probably something else.

In reply to Danny Glin

Re: WW2.15 RHEL 8 Install - Unknown column 'ARRAY' Error

by Adam Chandler -
I never installed v2.000001 so I was thinking I would have avoided the error completely, but I did go ahead and pull the updates and that fixed the error. I attempted a log in with the default "admin" "admin" credentials and got an authentication error.

I attempted to use delcourse to remove the admin course and start fresh again, but got another error:
cannot remove directory for /opt/webwork/courses/admin/logs: Directory not empty at /opt/webwork/webwork2/lib/WeBWorK/Utils/CourseManagement.pm line 711.
cannot remove directory for /opt/webwork/courses/admin: Directory not empty at /opt/webwork/webwork2/lib/WeBWorK/Utils/CourseManagement.pm line 711.
cannot remove directory for /opt/webwork/courses/admin/logs: Directory not empty at /opt/webwork/webwork2/lib/WeBWorK/Utils/CourseManagement.pm line 711.

Do you happen to have any insight on that?
In reply to Danny Glin

Re: WW2.15 RHEL 8 Install - Unknown column 'ARRAY' Error

by L Ng -

Is that how you would suggest we get the files now via git? What exactly is the full https url for both webwork and gp?

is it still

$ git clone git://github.com/openwebwork/webwork2.git
$ git clone git://github.com/openwebwork/pg.git
$ git clone git://github.com/openwebwork/webwork-open-problem-library.git
and it will get the latest one (Today is Thursday, July 15th, 2021 at 13:55 PM PST)?
Thanks



In reply to L Ng

Re: WW2.15 RHEL 8 Install - Unknown column 'ARRAY' Error

by Adam Chandler -
Hi L,

Yes, go ahead and make those pulls on initial setup and it if pulls 2.15 for some reason you should be able to move to the /opt/webwork/webwork2/ directory and do:
git pull origin
you may get an error if you have run the update in httdocs and generated a project_lock file, but you can safely move that file to your home directory and run the command again.

Either way, you should get the update to 2.16. After that run the same command while in /opt/webwork/pg/ and you should be all set.
In reply to Adam Chandler

Re: WW2.15 RHEL 8 Install - Unknown column 'ARRAY' Error

by L Ng -
thank you.

My plan is to when I clone it, I want to call it something else for the main webwork directory ... would this cause a problem?

ie.

#> cd /srv/path/to/data/

#> git clone git://github.com/openwebwork/webwork2.git webwork216
In reply to L Ng

Re: WW2.15 RHEL 8 Install - Unknown column 'ARRAY' Error

by Danny Glin -

You can put the code wherever you would like on your server.  Just be aware that the default values in the config files expect to find webwork and pg at /opt/webwork/webwork2 and /opt/webwork/pg respectively, so if you are putting the code in a different location you will need to edit the config files accordingly.

In reply to L Ng

Re: WW2.15 RHEL 8 Install - Unknown column 'ARRAY' Error

by Andrew Parker -

The new version has been merged into the 'main' branch now (for both webwork2 and pg).

If you've already cloned the repository, make sure that you've checked out the 'main' branch

`git checkout main`

and if that fails, `git fetch` and then retry the checkout.

`git pull` should tell you that you're up to date.

In reply to Danny Glin

Re: WW2.15 RHEL 8 Install - Unknown column 'ARRAY' Error

by Adam Chandler -
I was able to delete the admin course by simply removing the directory from /opt/webwork/courses/ and rerunning the addcourse script which overwrites any remaining data. The username and password work properly after that.