WeBWorK Main Forum

Upgrade crashes apache

Upgrade crashes apache

by Lars Jensen -
Number of replies: 7
Hi everyone,

I just did a svn upgrade from v.6899 to v.6927 and after the upgrade I was unable to restart apache. Here is the log for the upgrade:

webwork2:
A    htdocs/js/color.js
U    htdocs/js/ww_applet_support.js
A    htdocs/js/tabber.js
U    courses.dist/modelCourse/templates/setMAAtutorial/MAAtutorialSetHeader.pg
U    lib/WeBWorK/ContentGenerator/CourseAdmin.pm
U    lib/WeBWorK/ContentGenerator/Instructor/FileManager.pm
U    lib/WeBWorK/ContentGenerator/Instructor/SetMaker.pm
U    lib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm
U    lib/WeBWorK/Utils/CourseManagement.pm
U    lib/WeBWorK/PG/Local.pm
A    conf/templates/math3
A    conf/templates/math3/math3.css
A    conf/templates/math3/gateway.template
A    conf/templates/math3/system.template

pg:
U    macros/PGbasicmacros.pl
U    lib/WeBWorK/PG/Translator.pm

Updated to revision 6927.

And the error when I tried to start apache:

$ sudo /etc/init.d/apache2 start

 * Starting web server apache2
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/global.conf
webwork.apache2-config:  PG root directory set to /opt/webwork/pg
Syntax error on line 45 of /etc/apache2/conf.d/webwork.conf:
Can't locate UUID/Tiny.pm in @INC (@INC contains: /opt/webwork/pg/lib /opt/webwork/webwork2/lib /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl . /etc/apache2) at /opt/webwork/webwork2/lib/WeBWorK/Utils/CourseManagement.pm line 36.\nBEGIN failed--compilation aborted at /opt/webwork/webwork2/lib/WeBWorK/Utils/CourseManagement.pm line 36.\nCompilation failed in require at /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Instructor/FileManager.pm line 38.\nBEGIN failed--compilation aborted at /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Instructor/FileManager.pm line 38.\nCompilation failed in require at (eval 946) line 3.\nBEGIN failed--compilation aborted at /opt/webwork/webwork2/lib/WeBWorK.pm line 85.\nCompilation failed in require at /opt/webwork/webwork2/lib/Apache/WeBWorK.pm line 35.\nBEGIN failed--compilation aborted at /opt/webwork/webwork2/lib/Apache/WeBWorK.pm line 35.\n\t(in cleanup) Can't locate UUID/Tiny.pm in @INC (@INC contains: /opt/webwork/pg/lib /opt/webwork/webwork2/lib /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl . /etc/apache2) at /opt/webwork/webwork2/lib/WeBWorK/Utils/CourseManagement.pm line 36.\nBEGIN failed--compilation aborted at /opt/webwork/webwork2/lib/WeBWorK/Utils/CourseManagement.pm line 36.\nCompilation failed in require at /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Instructor/FileManager.pm line 38.\nBEGIN failed--compilation aborted at /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Instructor/FileManager.pm line 38.\nCompilation failed in require at (eval 946) line 3.\nBEGIN failed--compilation aborted at /opt/webwork/webwork2/lib/WeBWorK.pm line 85.\nCompilation failed in require at /opt/webwork/webwork2/lib/Apache/WeBWorK.pm line 35.\nBEGIN failed--compilation aborted at /opt/webwork/webwork2/lib/Apache/WeBWorK.pm line 35.\nCompilation failed in require at /etc/apache2/conf.d/webwork.conf line 96.\n

Lars.
In reply to Lars Jensen

Re: Upgrade crashes apache

by Andras Balogh -
I had the same problem.
Apparently a new perl module is required.
The following worked for me:


# perl -MCPAN -e shell
cpan> install UUID::Tiny

Andras
In reply to Andras Balogh

Re: Upgrade crashes apache

by Arnold Pizer -
Yes, UUID::Tiny is now required.  Running check_modules.pl will flag this.

If you are using Ubuntu, you can install the package libuuid-tiny-perl

$ sudo aptitude install libuuid-tiny-perl

Arnie
In reply to Lars Jensen

Re: Upgrade crashes apache

by Dick Lane -
I would like to check whether the following sequence of commands for updating to WeBWorK 2.5.0 is complete and in optimal order.

0)  read release notes
    http://webwork.maa.org/wiki/Release_notes_for_WeBWorK_2.4.9
    http://webwork.maa.org/wiki/Release_notes_for_WeBWorK_2.5.0
1)  install Tiny --- see notes by Andras ("#" indicates being su'd to root) and Arnie
2)  cd pg ;  svn update
3)  cd webwork2 ;  svn update  (this will also update MathJax)
4)  cd libraries/NationalProblemLibrary ;  svn update
5)  NPL-update  (step 3 updates this command)
6)  check_modules.pl  apache2  (perhaps do immediately after step 1)
7)  update database.conf as described in Release_notes_for_WeBWorK_2.5.0
8)  update global.conf as described in Release_notes_for_WeBWorK_2.5.0
    [I renamed previous, copied new global.conf.dist to global.conf,
    edited new global.conf to mimic my local settings in previous version.]
9)  apache2ctl graceful
10)  Login to the admin course, select Update Courses to see whether any existing courses need updating; update as appropriate.  (Should such updating be preceded by archiving the existing version?)

In reply to Dick Lane

Re: Upgrade crashes apache

by Michael Gage -
This looks good to me. There are various ways to handle (8) -- none of them optimal at the moment. I have dreams of breaking out global.conf into
sections that make it easier to update when new releases are made. For the moment either your procedure, or running a diff between your global.conf and the new global.conf.dist, or saving a copy of the original global.conf.dist and then comparing this to the new global.conf.dist seem the three viable options.

Can you think a good place for placing this on the wiki?

-- Mike

In reply to Michael Gage

Re: Upgrade crashes apache

by Dick Lane -
I did my updating of global.conf within emacs.  My previous version and a copy of the new global.conf.dist were in separate windows.  I used the M-X compare-windows command.  The cursor would stop at the first detected difference.  I examined the context to discover what action I should take.  The differences fell into two major categories:
a)  prior localizations which needed to be duplicated into new version
b)  developer changes ("published" replaced by "visible") or additions which required no action on my part

After completing the revisions, I did a further top-to-bottom comparison to confirm no unintended changes had crept in.

Although that work was preceded by the two uses of diff which you mentioned, their output was not something I felt safe to pipe into an automated edit.  FWIW, I would describe my procedure as "Transfer localizations from previous global.conf into a new one which begins as a copy of the new global.conf.dist" (wordier than the 2.5.0 release notes "Transfer changes from global.conf.dist to global.conf", but requiring less editing work by me).

Re "good place":  perhaps an addendum to http://webwork.maa.org/wiki/Upgrading_WeBWorK (which discusses a more substantial upgrade, I was only going from 2.4.9 to 2.5.0)

In reply to Dick Lane

Re: Upgrade crashes apache

by Arnold Pizer -
Hi Dick,

Also look at http://webwork.maa.org/wiki/Upgrading_WeBWorK, e.g. "Check for updates to courses.dist".

Arnie
In reply to Arnold Pizer

Re: Upgrade crashes apache

by Dick Lane -
YUP --- important because there is a new default for screen header.  [Thanks Arnie, I like it.]  I also needed to copy the three ASimple... headers from courses.dist/modelCourse/templates into the templates directory of current courses.

Moreover, my step (9) should be
    sudo  apache2ctl  graceful
because some concluding parts need privileges.