Installation

Admin Course Installation Problem

Admin Course Installation Problem

by Jay None -
Number of replies: 9
Hi all,

I just finished installing WebWork on a Fedora 8 server, and everything works fine until I add the admin course. Once I click on the admin course, I get the following error:

error instantiating DB schema WeBWorK::DB::Schema::NewSQL::NonVersioned for table set_user: Can't locate object method "new" via package "WeBWorK::DB::Schema::NewSQL::NonVersioned" at /opt/webwork/webwork2/lib/WeBWorK/DB.pm line 262.
at /opt/webwork/webwork2/lib/WeBWorK.pm line 286


Also, randomly when refreshing the error page, I will get the error that it cant locate Iterator/Util.pm in @INC, however Util.pm is located at "/usr/lib/perl5/site_perl/5.8.8/Iterator/Util.pm", and "/usr/lib/perl5/site_perl/5.8.8/" is in the @INC variable path list...

Can anyone shed some light on what is wrong here, anything I can try to troubleshoot? Thanks!

Jay
In reply to Jay None

Re: Admin Course Installation Problem

by Arnold Pizer -
Hi Jay,

I don't know what the problem is. However one thing that has caused people problems with Fedora is that SELinux is enabled by default.

The directions for Fedora 9 (http://webwork.maa.org/wiki/Installation_Manual_for_2.4_on_Fedora_9) specifically tell you to disable it. I think usually errors caused by SELinux manifest themselves as permission problems but maybe not finding Util.pm could be related. You probably have SELinux disabled, but in case you don't I though I'd mention it.

Arnie

In reply to Arnold Pizer

Re: Admin Course Installation Problem

by Jay None -
Thanks Arnie,

I disabled SELinux long ago, so that isn't the culprit. I did manage to get a little further; the permissions on Util.pm were incorrect. After fixing that, I can get into the admin course, however I still randomly get the error instantiating DB schema WeBWorK::DB::Schema::NewSQL::NonVersioned from above. I also get a few new errors, when I try to test the homework sets demo:
  • Failed to evaluate module GD: GD object version 2.35 does not match $GD::VERSION 2.41 at /usr/lib/perl5/5.8.8/i386-linux-thread-multi/DynaLoader.pm line 253.
  • Compilation failed in require at (eval 1057) line 1.
  • Failed to evaluate module Label: Can't locate object method "MediumBold" via package "GD::Font" (perhaps you forgot to load "GD::Font"?) at /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/GD.pm line 112.
  • Compilation failed in require at (eval 1068) line 1.
  • Loaded DateTime::TimeZone::America::New_York, which is from an older version (2007g) of the Olson database than this installation of DateTime::TimeZone (2008i).
  • Loaded DateTime::TimeZone::America::New_York, which is from an older version (2007g) of the Olson database than this installation of DateTime::TimeZone (2008i).
  • Loaded DateTime::TimeZone::America::New_York, which is from an older version (2007g) of the Olson database than this installation of DateTime::TimeZone (2008i).
  • cd /opt/webwork/webwork2/tmp/ImageGenerator.yzBOEsXI && /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.yzBOEsXI && /usr/bin/dvipng -bgtransparent -D120 -q -depth equation > dvipng.out 2> dvipng.err returned non-zero status 256: No such file or directory at /opt/webwork/pg/lib/WeBWorK/PG/ImageGenerator.pm line 364.

I forced the newest versions of GD, DateTime, DateTime::TimeZone, and DateTime::TimeZone::America::New_York to reinstall with no luck.
I can't even find GD::Font to install through CPAN...
/opt/webwork/webwork2/tmp is empty (except for the CVS folder and README file).
What is going on here? This smells of more permission errors...
In reply to Jay None

Re: Admin Course Installation Problem

by Michael Gage -
Do you have more than one perl library on your machine? It's possible that the server is not finding the file that you updated. (Also, it is necessary to restart the server when making any changes since the server caches the contents of scripts and won't notice that you've changed them until a child process restarts.
It can be _very_ easy to forget this. :-) )
In reply to Michael Gage

Re: Admin Course Installation Problem

by Jay None -
Michael,

Thanks for the reply. As a matter of fact, there were multiple perl libraries, with different versions of the same packages. I combined them all into one directory, keeping only what (*I think*) are the newest versions, and I've made some more progress.

Currently, upon opening the Demo Homework Set in myTestCourse (following http://webwork.maa.org/wiki/Installation_Manual_for_2.4_on_Fedora_9 under "Test that Things Work Properly"), I only receive the two following warnings:
  • cd /opt/webwork/webwork2/tmp/ImageGenerator.9EKgYjag && /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.9EKgYjag && /usr/bin/dvipng -bgtransparent -D120 -q -depth equation > dvipng.out 2> dvipng.err returned non-zero status 256: No such file or directory at /opt/webwork/pg/lib/WeBWorK/PG/ImageGenerator.pm line 364.
Nothing is being created in the /opt/webwork/webwork2/tmp directory; all that is in there is what came from the initial CVS download. The permissions on that directory appear to be correct. Did I set something incorrectly? Are these temp files being created somewhere else?
In reply to Jay None

Re: Admin Course Installation Problem

by Michael Gage -
Jay,

Read the thread here:

http://wwrk.maa.org/moodle/mod/forum/discuss.php?d=517#p7067

and see if it helps.

Let us know how it works out one way or the other.

-- Mike

In reply to Michael Gage

Re: Admin Course Installation Problem

by Jay None -
No luck with the preview style files. I ran the "pdflatex check_latex.tex" command, and in the output is:

(/usr/share/texmf/tex/latex/preview/preview.sty)

so I assume it is finding the preview style file correctly.

I noticed that these warnings only appear when the images display option is selected, if that makes any difference...

I went through the global.conf file, and all the file paths are correct.

I also set PreserveTempFiles to 1, but I don't see where anything additional is being stored. "/opt/webwork/webwork2/tmp" is still empty. The permissions on the folder are:
drwxrwsr-x 3 root wwdata 4.0K 2008-11-20 14:50 tmp
The apache logs show the following:
[Thu Nov 20 14:50:40 2008] [error] [client my.ip.addr] File does not exist: /opt/webwork/webwork2/htdocs/tmp/equations/f3, referer: https://mysite.fq.dn/webwork/myTestCourse/Demo/1/?effectiveUser=me&displayMode=images&showOldAnswers=1&user=me&key=...
[Thu Nov 20 14:50:40 2008] [error] [client my.ip.addr] File does not exist: /opt/webwork/webwork2/htdocs/tmp/equations/56, referer: https://mysite.fq.dn/webwork/myTestCourse/Demo/1/?effectiveUser=me&displayMode=images&showOldAnswers=1&user=me&key=...

I suppose I could just disable the images option, but I would rather not if possible... All the other display options work fine.

In reply to Jay None

Re: Admin Course Installation Problem

by Michael Gage -
I also set PreserveTempFiles to 1, but I don't see
where anything additional is being stored.
"/opt/webwork/webwork2/tmp" is still empty. 



Double check that you have restarted the server after making this change. You
should at least see folders (possibly empty) starting with the name ImageGenerator.&Ft.. in the directory /opt/webwork/webwork2/tmp

Your permissions seem ok for that folder. You can temporarily change
the permissions to 777 for that folder to be absolutely sure that is not the problem.
In reply to Michael Gage

Re: Admin Course Installation Problem

by Jay None -
Eureka!

Restarting the server didn't help, but setting the correct PreserveTempFiles variable did! I must have just searched real quick the first time and set $WeBWorK::ContentGenerator::Hardcopy::PreserveTempFiles = 1; which wasn't the correct variable.

Turns out that the permissions on all my latex ls-R files were set to 600. Fixed those, and everything is working correctly now.

dvipng.err still contains the following error, but everything seems to work properly. Is this something to worry about?

/usr/bin/dvipng warning: Unimplemented color specification 'transparent'

Thanks!
Jay

EDIT: I updated dvipng to version 1.11, and the transparency error is gone. Thanks everyone for your help!
In reply to Jay None

Re: Admin Course Installation Problem

by Michael Gage -
So for future reference: this particular problem (involving errors while creating images of equations) was debugged by setting

$WeBWorK::PG::ImageGenerator::PreserveTempFiles = 1;

in lib/WeBWorK/Constants.pm

rather than

$WeBWorK::ContentGenerator::Hardcopy::PreserveTempFiles = 1;

The two variables do similar things. Normally when TeX is run there are a number of auxiliary files that are created during typesetting and these are cleaned up after the job is done. Setting the PreserveTempFiles flag to 1 inhibits the clean up of these temporary files so that you can manually inspect the files, try to run various portions of the typesetting process and determine exactly where the problem is occuring.

The Hardcopy::PreserveTempFiles flag governs the creation of hardcopy output of homework sets. The ImageGenerator::PreserveTempFiles flag governs the typesetting of equations for the image mode of presenting mathematics on the screen.

The thread at
http://wwrk.maa.org/moodle/mod/forum/discuss.php?d=517#p7067

incorrectly references the Hardcopy::PreserveTempFiles when it should have
referred to the ImageGenerator::PreserveTempFiles flag for the problem at hand.

Thanks for Jay for helping to make clear how to trouble shoot this problem.