[LON-CAPA-admin] LON-CAPA version 2.6.2

Stuart Peter Raeburn raeburn at msu.edu
Thu Feb 7 21:12:26 EST 2008


Lars, 

Based on your earlier report -- that a reboot seemed to fix the issues you 
saw with loncontrol following a 2.6.2 upgrade, it seems that the 
unresponsiveness of the system may have been due to some daemons not being 
completely terminated by a loncontrol stop. Alternatively, memcached might 
have got lodged in a state which prevented a new one starting when 
restarting loncontrol, leading to poor performance.  Any information in the 
various *_errors files in /home/httpd/perl/logs will have been lost as the 
files were overwritten following your successful start of loncontrol after 
reboot. 

As regards the messages reported from lond_errors ....
These errors indicate that /home/httpd/lib/perl/localenroll.pm on your 
server does not currently contain the instcode_format() subroutine. 

localenroll.pm is a perl module which contains functions to interface 
LON-CAPA with student information systems at your institution.  As such it 
is used to facilitate auto-enrollment, access to student photos, 
classification of courses in the course catalog based on institutional code, 
and definition of name spacing rules for usernames and student ID/numbers in 
your domain (amongst other things). 

localenroll.pm is intended to be customized with perl code appropriate to 
your domain.  The standard uncustomized version shipped with LON-CAPA 
contains stubs for the various routines which typically return 'ok' to 
indicate no processing errors occurred, but otherwise do not provide any 
data or perform any tasks. Because localenroll.pm may have been customized, 
the LON-CAPA update process, invoked with the command ./UPDATE does not 
overwite localenroll.pm, even if a new uncustomized version (with new 
subroutines) has been included in the latest LON-CAPA release.  The latest 
uncustomized version will be updated by ./UPDATE but the file which is 
updated is /home/httpd/lib/perl/localenroll-std.pm 

Although this approach prevents UPDATE from overwriting a custom 
localenroll.pm, there is a downside, namly that when new subroutines have 
been added to localenroll.pm for a new release (and called from lond, for 
example), they may not exist in the version of localenroll.pm, which lond is 
calling.  A solution to this is provided with the addition of the following 
to localenroll.pm 

sub AUTOLOAD {
   our $AUTOLOAD;
   return '';
} 

This subroutine prevents errors when undefined subroutines are called in 
localenroll.pm.  Unfortunately, it was not added until LON-CAPA version 2.1, 
so domains which were running LON-CAPA versions 1.1, 1.2, 1.3, or 2.0, and 
have not updated localenroll.pm since then, will find these types of errors 
reported in lond_errors.  This type of undefined subroutine error in lond 
does not result in lond dying, because the call to the subroutine occurs 
within an eval which causes the exception to be caught. 

To stop these errors showing up in lond_errors you could copy the block of 
code containing the AUTOLOAD subroutine from localenroll-std.pm to 
localenroll.pm, and then restart loncontrol and the web server. 

Alternatively, if you have never customized 
/home/httpd/lib/perl/localenroll.pm, you could simply copy 
localenroll-std.pm to localenroll.pm, making sure to preserve the 
permissions on localenroll.pm, so that at a minimum, the file is readable by 
the www user. Again you need to restart loncontrol and the web server after 
copying the file.  If you have customized localenroll.pm, you might want to 
copy any subroutines defined in localenroll-std.pm but which are absent in 
localenroll.pm, to your custom version of localenroll.pm. 

Stuart 

Lars Jensen writes: 

> Hi Stuart, 
> 
> Only one of the files below has any content and this is lond_errors. It 
> looks like this: 
> 
> Undefined subroutine &localenroll::instcode_format called at 
> /home/httpd/perl/lond line 4459, <GEN49> line 550.
> Undefined subroutine &localenroll::instcode_format called at 
> /home/httpd/perl/lond line 4459, <GEN67> line 141.
> Undefined subroutine &localenroll::instcode_format called at 
> /home/httpd/perl/lond line 4459, <GEN71> line 272.
> Undefined subroutine &localenroll::instcode_format called at 
> /home/httpd/perl/lond line 4459, <GEN75> line 96. 
> 
> Lars. 
> 





More information about the LON-CAPA-admin mailing list