Installation

Install problems with WeBWork and Red Hat 5 Enterprise server

Install problems with WeBWork and Red Hat 5 Enterprise server

by Eric Wright -
Number of replies: 6
Hello,

I'm trying to install WeBWork 2.47 on a Red Hat 5 Enterprise server with apache 2.2. I've followed the install instructions specific to Fedora 9 and they seemed to work up to a point. However there were two problems. First, after creating and logging into the admin course, the following warnings appeared:
  • Can't do mkdir(/opt/webwork/courses/modelCourse/html/tmp, 0770): No such file or directory at /opt/webwork/pg/lib/WeBWorK/PG/IO.pm line 199.
  • Can't do chmod(0770, /opt/webwork/courses/modelCourse/html/tmp): No such file or directory at /opt/webwork/pg/lib/WeBWorK/PG/IO.pm line 201.
  • Use of uninitialized value in numeric eq (==) at /opt/webwork/pg/lib/WeBWorK/PG/IO.pm line 203.
  • Use of uninitialized value in chown at /opt/webwork/pg/lib/WeBWorK/PG/IO.pm line 204.
  • Use of uninitialized value in concatenation (.) or string at /opt/webwork/pg/lib/WeBWorK/PG/IO.pm line 204.
  • Can't do chown(-1,,/opt/webwork/courses/modelCourse/html/tmp): No such file or directory at /opt/webwork/pg/lib/WeBWorK/PG/IO.pm line 204.
  • Can't do mkdir(/opt/webwork/courses/modelCourse/DATA/mailmerge, 0770): No such file or directory at /opt/webwork/pg/lib/WeBWorK/PG/IO.pm line 199.
  • Can't do chmod(0770, /opt/webwork/courses/modelCourse/DATA/mailmerge): No such file or directory at /opt/webwork/pg/lib/WeBWorK/PG/IO.pm line 201.
  • Use of uninitialized value in numeric eq (==) at /opt/webwork/pg/lib/WeBWorK/PG/IO.pm line 203.
  • Use of uninitialized value in chown at /opt/webwork/pg/lib/WeBWorK/PG/IO.pm line 204.
  • Use of uninitialized value in concatenation (.) or string at /opt/webwork/pg/lib/WeBWorK/PG/IO.pm line 204.
  • Can't do chown(-1,,/opt/webwork/courses/modelCourse/DATA/mailmerge): No such file or directory at /opt/webwork/pg/lib/WeBWorK/PG/IO.pm line 204.
Then, after creating a normal course and adding a problem set to it, and then attempting to view the problem set, the following warning, error, and call stack appeared.

Warning messages

  • cd /opt/webwork/webwork2/tmp/ImageGenerator.GUYXdDDy && /usr/bin/latex equation > latex.out 2> latex.err returned non-zero status 32512: Inappropriate ioctl for device at /opt/webwork/pg/lib/WeBWorK/PG/ImageGenerator.pm line 343.
  • cd /opt/webwork/webwork2/tmp/ImageGenerator.GUYXdDDy failed at /opt/webwork/pg/lib/WeBWorK/PG/ImageGenerator.pm line 344.
  • Unable to execute /usr/bin/latex at /opt/webwork/pg/lib/WeBWorK/PG/ImageGenerator.pm line 346.
  • total 20
  • -rw-r--r-- 1 apache wwdata 271 Jul 2 22:38 equation.tex
  • -rw-r--r-- 1 apache wwdata 46 Jul 2 22:38 latex.err
  • -rw-r--r-- 1 apache wwdata 0 Jul 2 22:38 latex.out
  • Unable to read logfile /opt/webwork/webwork2/tmp/ImageGenerator.GUYXdDDy/equation.log at /opt/webwork/pg/lib/WeBWorK/PG/ImageGenerator.pm line 354.
  • cd /opt/webwork/webwork2/tmp/ImageGenerator.GUYXdDDy && /usr/bin/latex equation > latex.out 2> latex.err failed to generate a DVI file at /opt/webwork/pg/lib/WeBWorK/PG/ImageGenerator.pm line 358.
  • cd /opt/webwork/webwork2/tmp/ImageGenerator.GUYXdDDy && /usr/bin/dvipng -bgtransparent -D120 -q -depth equation > dvipng.out 2> dvipng.err returned non-zero status 32512: No such file or directory at /opt/webwork/pg/lib/WeBWorK/PG/ImageGenerator.pm line 364.
  • DBD::mysql::db selectall_arrayref failed: Table 'webwork.depths' doesn't exist at /opt/webwork/pg/lib/WeBWorK/PG/ImageGenerator.pm line 435.

Error messages

Can't use an undefined value as an ARRAY reference at /opt/webwork/pg/lib/WeBWorK/PG/ImageGenerator.pm line 436.

Call stack

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

  • in WeBWorK::PG::Local::new called at line 52 of /opt/webwork/webwork2/lib/WeBWorK/PG.pm
  • in WeBWorK::PG::new called at line 231 of /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/ProblemSet.pm
  • in WeBWorK::ContentGenerator::ProblemSet::info called at line 152 of /opt/webwork/webwork2/lib/WeBWorK/Template.pm
  • in WeBWorK::Template::template called at line 491 of /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator.pm
  • in WeBWorK::ContentGenerator::content called at line 195 of /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator.pm
  • in WeBWorK::ContentGenerator::go called at line 353 of /opt/webwork/webwork2/lib/WeBWorK.pm

Any insights would be greatly appreciated. Thanks in advance.

In reply to Eric Wright

Re: Install problems with WeBWork and Red Hat 5 Enterprise server

by Michael Gage -
The first error indicates that either modelCourse was not copied from webwork2/courses.dist to your courses directory -- or that it was copied but the webserver does not have write privileges in the course directory and its subdirectories -- hence it can't create the tmp directory and various other directories that it will usually create automatically if they do not already exist. Check to see that the course is where the webserver expects it to be and that the webserver has access.

The second error may also be a permissions error -- or it could be caused by small variations among unix flavors, although I think this latter possibility is unlikely for RedHat. Search for " inappropriate ioctl error" in this forum -- or just search for "ioctl". It seems to be an error message that arises from a number of causes -- most of which have to do with permissions rather than something more complicated. Does the webserver have write access to the ... webwork2/tmp.. directory?

Hope this helps. Let us know how you fix these glitches -- it will help the next person.

--Mike
In reply to Michael Gage

Re: Install problems with WeBWork and Red Hat 5 Enterprise server

by Eric Wright -

Thanks, Mike. I didn't actually fix the problem, but I found a way to make it work for now. I turned off "images" as a possible display mode and set jsMath to be the default display mode. asciimath, LaTeXMathML, and plaintext are the other display modes that seem to work.

I'll spend some time trying to figure out what is going on later (if I can find the time, that is.) If I come up with a better solution, I'll post it to the group. Thanks again.

-Eric

In reply to Eric Wright

Re: Install problems with WeBWork and Red Hat 5 Enterprise server

by Arnold Pizer -
Regarding the problem with images being displayed, look at
http://webwork.maa.org/wiki/Installation_Manual_for_2.4_on_Ubuntu_9.04#Test_that_Things_are_Working_Properly
for help on debugging such problems.

Arnie
In reply to Eric Wright

Re: Install problems with WeBWork and Red Hat 5 Enterprise server

by Arnold Pizer -
Regarding the warnings:
  • Can't do mkdir(/opt/webwork/courses/modelCourse/html/tmp, 0770): No such file or directory at /opt/webwork/pg/lib/WeBWorK/PG/IO.pm line 199.
  • Can't do chmod(0770, /opt/webwork/courses/modelCourse/html/tmp): No such file or directory at /opt/webwork/pg/lib/WeBWorK/PG/IO.pm line 201
etc. There are bugs in the new version of CourseManagement.pm (e.g. it's treating the modelCourse as a real course which it isn't hence the above warnings) and wwdb_upgrade and DBUpgrade.pm. Until we fix these bugs the easiest fix is to go back to version rel-2-4-5 of the following three scripts:

/opt/webwork/webwork2/bin/wwdb_upgrade
/opt/webwork/webwork2/lib/WeBWorK/Utils/DBUpgrade.pm
/opt/webwork/webwork2/lib/WeBWorK/Utils/CourseManagement.pm

To do this as root (since these files are owned by root) run the commands:

cd /opt/webwork/webwork2/bin/
mv wwdb_upgrade wwdb_upgrade.bug
cvs upgrade -r rel-2-4-5 wwdb_upgrade
cd /opt/webwork/webwork2/lib/WeBWorK/Utils/
mv DBUpgrade.pm DBUpgrade.pm.bug
mv CourseManagement.pm CourseManagement.pm.bug
cvs upgrade -r rel-2-4-5 DBUpgrade.pm CourseManagement.pm

Arnie
In reply to Arnold Pizer

Re: Install problems with WeBWork and Red Hat 5 Enterprise server

by Arnold Pizer -
These warning messages and problems with the wwdb_upgrade script have now been fixed in the rel-2-4-patches distribution.

If you installed WeBWorK using the rel-2-4-patches distribution (which is the recommended way) all you have to do is to cd into the /opt/webwork/webwork2/ directory and then as root run the command
cvs upgrade

This will upgrade all necessary files. If you installed a different distribution (e.g. rel-2-4-7) you can upgrade the files one at a time.

To do this run the following commands as root (since these files are owned by root) :

cd /opt/webwork/webwork2/bin/
mv wwdb_upgrade wwdb_upgrade.bak
cvs upgrade -r rel-2-4-patches wwdb_upgrade
cd /opt/webwork/webwork2/lib/WeBWorK/Utils/
mv DBUpgrade.pm DBUpgrade.pm.bak
mv CourseManagement.pm CourseManagement.pm.bak
cvs upgrade -r rel-2-4-patches DBUpgrade.pm CourseManagement.pm
cd /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/
mv CourseAdmin.pm CourseAdmin.pm.bak
cvs upgrade -r rel-2-4-patches CourseAdmin.pm

Arnie