WeBWorK Problems

Cannot access Student Progress

Cannot access Student Progress

by Rodrique Heron -
Number of replies: 4
Cannot access Student Progress for some sections. I ran the following command on the database again:

GRANT SELECT ON webwork.* TO webworkRead@localhost IDENTIFIED BY 'password';
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, ALTER, DROP ON webwork.* TO webworkWrite@localhost IDENTIFIED BY 'password';

But the problem still persist.


Warning messages

  • DBD::mysql::st execute failed: Can't open file: 'MTH2003_PS13S_S07_problem_user.MYI' (errno: 145) at /usr/local/webwork2/lib/WeBWorK/DB/Schema/SQL.pm line 263.

Error messages

DBD::mysql::st execute failed: Can't open file: 'MTH2003_PS13S_S07_problem_user.MYI' (errno: 145) at /usr/local/webwork2/lib/WeBWorK/DB/Schema/SQL.pm line 263.

Call stack

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

  • in WeBWorK::DB::Schema::SQL::getAll called at line 1694 of /usr/local/webwork2/lib/WeBWorK/DB.pm
  • in WeBWorK::DB::getAllUserProblems called at line 353 of /usr/local/webwork2/lib/WeBWorK/ContentGenerator/Instructor/StudentProgress.pm
  • in WeBWorK::ContentGenerator::Instructor::StudentProgress::displaySets called at line 164 of /usr/local/webwork2/lib/WeBWorK/ContentGenerator/Instructor/StudentProgress.pm
  • in WeBWorK::ContentGenerator::Instructor::StudentProgress::body called at line 152 of /usr/local/webwork2/lib/WeBWorK/Template.pm
  • in WeBWorK::Template::template called at line 412 of /usr/local/webwork2/lib/WeBWorK/ContentGenerator.pm
  • in WeBWorK::ContentGenerator::content called at line 164 of /usr/local/webwork2/lib/WeBWorK/ContentGenerator.pm
  • in WeBWorK::ContentGenerator::go called at line 279 of /usr/local/webwork2/lib/WeBWorK.pm

In reply to Rodrique Heron

Re: Cannot access Student Progress

by Gavin LaRose -
Hi Rodrique,

The error message makes me think that this might be a problem with mySQL, rather than WeBWorK proper. MTH2003_PS13S_S07_problem_user.MYI sounds like the name of the physical file that mySQL uses for the MTH2003_PS13S_S07_problem_user table. Can you verify that this exists and is readable by the mySQL daemon? On my (RedHat) system the mySQL databases are in /var/lib/mysql; all directories in /var/lib/mysql are owned by the mySQL user (mysql) and all subdirectories (in particular, that for WeBWorK) are similarly. I'd expect the MTH2003_PS13S_S07_problem_user.MYI file to be /var/lib/mysql/webwork/MTH2003_PS13S_S07_problem_user.MYI.

Having said all that, if you're not on a Linux server, that explanation may not be overly useful.

Gavin
In reply to Gavin LaRose

Re: Cannot access Student Progress

by Rodrique Heron -
Garvin,

Thank you for your response, the physical file foes exist and and is readable by MySQL daemon. I connected to the database using MySQL, and was surprised not to find the corresponding table. Is it possible for the physical file to exist on the filesystem but not in the database itself ?
In reply to Rodrique Heron

Re: Cannot access Student Progress

by Gavin LaRose -
Hi Rodrique,

We're rapidly exceeding my knowledge of mySQL, but if you have the file and show tables doesn't show it in the webwork database, then I'll believe that you can have the file but not the table.

For each database table in mySQL, I think there should be a tableName.MYI file and a tableName.MYD file (for the indexing and data, I believe). Do you have both of those for the table in question?

If you have a backup of the table in question, there's a RESTORE TABLE command in mysql that will allow it to be rebuilt. I'm not sure if there's a way to rebuild a table from the data files, but that may be possible with some exploration of mySQL.

Gavin

//update 10:53am:
I don't know if this is relevant, but it just occurred to me: at some point in the past I was having trouble with corruption in some of the database tables being used by WeBWorK. I ended up running a script through cron to get a list of database tables and running a check table command on each, then running a repair command if there was an error. This required that the tables actually be present in the database, however.
In reply to Gavin LaRose

Re: Cannot access Student Progress

by Rodrique Heron -
Garvin,

Thank's ! you flicked on my light switch. Now I know what might have happened, Apache logs grew and filled up all 32gigs of available diskspace, causing the server to crash twice. Now, I set my logs to rotate when they are 100MB and only keep 7.

I ran mysqlcheck, look at the output:

-------------------------
error : got error: 127 when reading datafile at record: 621
error : Corrupt

webwork.MTH3020_MW54A_S07_problem_user
warning : Table is marked as crashed
warning : 1 client is using or hasn't closed the table properly
error : Size of datafile is: 114568 Should be: 114716
error : Corrupt
---------------------------

Running "mysqlcheck --auto-repair --verbose --databases webwork" to repair all tables.

I will now ask all instructors to report the status of their sections.

Thanks