WeBWorK Problems

mod_perl issue after Ubuntu software update

mod_perl issue after Ubuntu software update

by Sungwook Lee -
Number of replies: 11
After I did a routine Ubuntu software update, apache2 won't start with webwork.conf enabled. I had a similar issue 2 years ago and followed every step that was discussed to fix the issue but still no avail.

First, our webwork server is running on Ubuntu 16.04 and apache 2.4.18. Apache2 works without webwork.conf enabled. When I run "apache2tcl restart" with webwork.conf enabled, this is the error message I am getting.
--
webwork.apache2-config: webwork_server_admin_email for reporting bugs has been set to sunglee@usm.edu in site.conf
webwork.apache2-config: WeBWorK server is starting
webwork.apache2-config: WeBWorK root directory set to /opt/webwork/webwork2 in webwork2/conf/webwork.apache2-config
webwork.apache2-config: The following locations and urls are set in webwork2/conf/site.conf
webwork.apache2-config: PG root directory set to /opt/webwork/pg
webwork.apache2-config: WeBWorK server userID is www-data
webwork.apache2-config: WeBWorK server groupID is wwdata
webwork.apache2-config: The webwork url on this site is http://math.usm.edu/webwork2
webwork.apache2-config: The webwork smtp server address is localhost
webwork.apache2-config: The webwork smtp server port is
webwork.apache2-config: The webwork smtp server protocol is 'not ssl'
webwork.apache2-config: webwork_server_admin_email for reporting bugs has been set to sunglee@usm.edu in site.conf
webwork.apache2-config: WeBWorK server is starting
webwork.apache2-config: WeBWorK root directory set to /opt/webwork/webwork2 in webwork2/conf/webwork.apache2-config
webwork.apache2-config: The following locations and urls are set in webwork2/conf/site.conf
webwork.apache2-config: PG root directory set to /opt/webwork/pg
webwork.apache2-config: WeBWorK server userID is www-data
webwork.apache2-config: WeBWorK server groupID is wwdata
webwork.apache2-config: The webwork url on this site is http://math.usm.edu/webwork2
webwork.apache2-config: The webwork smtp server address is localhost
webwork.apache2-config: The webwork smtp server port is
webwork.apache2-config: The webwork smtp server protocol is 'not ssl'
AH00526: Syntax error on line 45 of /etc/apache2/conf-enabled/webwork.conf:
Can't locate Email/Address/XS.pm in @INC (you may need to install the Email::Address::XS module) (@INC contains: /opt/webwork/pg/lib /opt/webwork/webwork2/lib /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.22.1 /usr/local/share/perl/5.22.1 /usr/lib/x86_64-linux-gnu/perl5/5.22 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.22 /usr/share/perl/5.22 /usr/local/lib/site_perl . /etc/apache2) at /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Instructor/SendMail.pm line 30.\nBEGIN failed--compilation aborted at /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Instructor/SendMail.pm line 30.\nCompilation failed in require at (eval 550) line 2.\nBEGIN failed--compilation aborted at /opt/webwork/webwork2/lib/WeBWorK.pm line 88.\nCompilation failed in require at /opt/webwork/webwork2/lib/Apache/WeBWorK.pm line 37.\nBEGIN failed--compilation aborted at /opt/webwork/webwork2/lib/Apache/WeBWorK.pm line 37.\n
Action 'restart' failed.
The Apache error log may have more information.
--
Line 45 of webwork.conf is "PerlModule mod_perl2". When I run "a2enmod mod_perl", I get the message
"ERROR: Module mod_perl does not exist!"
but mod_perl does exist as seen in the attached server-info. Unless I missed something obvious, I don't notice anything wrong in the server-info.

I would very much appreciate any help on this issue.
In reply to Sungwook Lee

Re: mod_perl issue after Ubuntu software update

by Danny Glin -
The issue probably stems from:
Can't locate Email/Address/XS.pm in @INC (you may need to install the Email::Address::XS module)

Try installing that perl module. I'm not an expert on Ubuntu, but it looks like it might be in the package libemail-address-xs-perl, so you can try:
apt-get install libemail-address-xs-perl

If you can't find a package for it, you can install it using CPAN:
cpan Email::Address::XS

It's weird that updating Ubuntu would lead to missing perl dependencies since nothing should have changed on the WeBWorK side.
In reply to Danny Glin

Re: mod_perl issue after Ubuntu software update

by Sungwook Lee -
Thanks Danny! I installed the perl module using CPAN. It wasn't part of Ubuntu repository. And the error is gone! Apache2 comes up with webwork.conf enabled but now I see another error on WebWork page. When I logged in to one of my classes, I see the error message in the attached file "webworkerror.pdf".

Thanks again for you kind help!
In reply to Sungwook Lee

Re: mod_perl issue after Ubuntu software update

by Glenn Rice -
I see. The libemail-address-xs-perl package was not added until Ubuntu 18.04. I didn't notice that you said you were running Ubuntu 16.04.

To fix the new error you are seeing you need to upgrade the course databases. Do what the warning message tells you to do. First run upgrade_admin_db.pl from the command line. Then upgrade the databases for the other courses from the admin course.

I am rather certain that you did upgrade webwork. Did you run "git pull" from the webwork2 directory? The message about the invalid UTF-8 character in course.conf does not happen until webwork version 2.15.
In reply to Glenn Rice

Re: mod_perl issue after Ubuntu software update

by Sungwook Lee -
Thanks a bunch for your help, Glenn! After I ran upgrade_admin_db.pl, admin account came back to normal but I ran into an error when I attempted to upgrade courses from admin account. Here is the error from a course.
--

Report for course Perry_MAT_167_Fall_2019:
Database:

  • achievement: Table is ok
  • achievement_user: Table is ok
  • global_user_achievement: Table is ok
  • key: Table is ok
  • password: Table is ok
  • past_answer: Table is ok
  • permission: Table is ok
  • problem: Table is ok
  • problem_user: Table is ok
  • set: Table is ok
  • set_locations: Table is ok
  • set_locations_user: Table is ok
  • set_user: Table is ok
  • setting: Table is ok
  • user: Schema and database table definitions do not agree
    • user_id => Field is ok
    • useMathView => Field is ok
    • showOldAnswers => Field is ok
    • useMathQuill => Field missing in database
    • status => Field is ok
    • displayMode => Field is ok
    • email_address => Field is ok
    • recitation => Field is ok
    • section => Field is ok
    • last_name => Field is ok
    • lis_source_did => Field is ok
    • first_name => Field is ok
    • comment => Field is ok
    • useWirisEditor => Field missing in database
    • student_id => Field is ok
Directory structure
  • DATA => /opt/webwork/courses/Perry_MAT_167_Fall_2019/DATA rwx
  • achievements => /opt/webwork/courses/Perry_MAT_167_Fall_2019/templates/achievements rwx
  • achievements_html => /opt/webwork/courses/Perry_MAT_167_Fall_2019/html/achievements rwx
  • email => /opt/webwork/courses/Perry_MAT_167_Fall_2019/templates/email rwx
  • html => /opt/webwork/courses/Perry_MAT_167_Fall_2019/html rwx
  • html_images => /opt/webwork/courses/Perry_MAT_167_Fall_2019/html/images rwx
  • html_temp => /var/www/html/wwtmp/Perry_MAT_167_Fall_2019 rwx
  • logs => /opt/webwork/courses/Perry_MAT_167_Fall_2019/logs rwx
  • macros => /opt/webwork/courses/Perry_MAT_167_Fall_2019/templates/macros rwx
  • mailmerge => /opt/webwork/courses/Perry_MAT_167_Fall_2019/DATA/mailmerge rwx
  • root => /opt/webwork/courses/Perry_MAT_167_Fall_2019 rwx
  • scoring => /opt/webwork/courses/Perry_MAT_167_Fall_2019/scoring rwx
  • templates => /opt/webwork/courses/Perry_MAT_167_Fall_2019/templates rwx
  • tmpEditFileDir => /opt/webwork/courses/Perry_MAT_167_Fall_2019/templates/tmpEdit rwx

Directory structure is ok

--
I read from an old forum entry that this may have something to do with updating database.conf but couldn't find a helpful solution there. Also I found that there was no database.conf but only database.conf.dist in my conf directory.

Btw yes I ran "git pull" from webwrok2 directory. I thought it would just update webwork code. I didn't know that the process would upgrade webwork. So, I guess I do have webwork 2.15 now if that is the case. I updated webwork before I did Ubuntu software update. Whatever happened was perhaps caused by the both, I guess.

Sung




In reply to Sungwook Lee

Re: mod_perl issue after Ubuntu software update

by Glenn Rice -
It looks like you have not finished the upgrade. Scroll to the bottom of the page you show above. Are there two buttons. One that says "Don't Upgrade" and one that says "Upgrade"? If so click on "Upgrade".

If that is not your problem, and you have already clicked on "Upgrade", then I am not sure what is happening and will need more information.

You might want to also run "git pull" in the pg directory to ensure that it is also at version 2.15.
In reply to Glenn Rice

Re: mod_perl issue after Ubuntu software update

by Sungwook Lee -
Silly me. You're right! I didn't notice that there was one more step to go, so yes I didn't finish the upgrade. It appears to be all good now. I also ran "git pull" in the pg directory as you suggested.

Thank you very much for you kind help!

Sung
In reply to Sungwook Lee

Re: mod_perl issue after Ubuntu software update

by Sungwook Lee -
I found that there is another issue. Math expressions don't show up and they are replaced by [math]. I searched a forum entry for the issue and found one. But in the forum entry the issue was caused by not having MathJax installed. In my case it has been installed and I have even updated it. I also checked the symlink mathjax. So I am baffled why math expressions don't show up.
In reply to Sungwook Lee

Re: mod_perl issue after Ubuntu software update

by Glenn Rice -
I think you might be having the same problem disussed in http://webwork.maa.org/moodle/mod/forum/discuss.php?d=4683#p13876.

This needs to be added to some documentation (somewhere visible) until we have updated webwork to use the MathJax version 3.
In reply to Glenn Rice

Re: mod_perl issue after Ubuntu software update

by Sungwook Lee -
Yes, that was it! Running "git checkout legacy-v2" did the trick and now math is rendering.

Thank you so much!

Sung
In reply to Sungwook Lee

Re: mod_perl issue after Ubuntu software update

by Glenn Rice -
Did you also upgrade webwork to version 2.15? The Email::Address::XS perl package is a new dependency of webwork that was added with version 2.15. It was not needed before that. Installing the ubuntu debian package libemail-address-xs-perl is the best way to install this dependency as Danny said.
In reply to Glenn Rice

Re: mod_perl issue after Ubuntu software update

by Sungwook Lee -
No I didn't upgrade to 2.15 but the fix suggested by Danny corrected the error and now the webwork page comes on. But then I stumbled upon another error with WebWork when I logged in to my webwork course page (please see my reply to Danny).

Thanks!