[LON-CAPA-admin] Invalid Map?

Neubauer, Paul pneubauer at bsu.edu
Wed Jan 13 09:54:51 EST 2021

Thank you, Stuart,

I copied your perl to a file fixmap.pl in /home/www and, as www, ran:

./fixmap.pl bsu 2s16783d6c9fc5f67bsul1

Then, as bsudc (the Domain Coordinator) I reentered the course as course coordinator and, again, got:

The following problems occurred:

Map not loaded: The file /home/httpd/lonUsers/bsu/2/s/1/2s16783d6c9fc5f67bsul1/userfiles/default.sequence does not exist.



Any further advice? Should I ask the faculty member who created the course to delete it and try again? Something else?

I'm well out of my depth here.


-----Original Message-----
From: LON-CAPA-admin [mailto:lon-capa-admin-bounces at mail.lon-capa.org] On Behalf Of Raeburn, Stuart via LON-CAPA-admin
Sent: Wednesday, January 13, 2021 9:40 AM
To: 'lon-capa-admin at mail.lon-capa.org' <lon-capa-admin at mail.lon-capa.org>
Subject: Re: [LON-CAPA-admin] Invalid Map?


When you see: "Invalid map: /home/httpd/html/adm/notfound.html" that means that when the course was created, LON-CAPA was unable to make a successful "internal" web request to create the top level map in the course, for which the URL would typically be: 


where courseNum is a unique string of letters and numbers (e.g., 1a2458de5749811cabf3bsul1), ending bsul1, if the course was created on the bsu home server.

If the course was created by a Domain Coordinator using Main Menu > Course and community creation > Create a single course, and the First Resource was set to "Course Contents" then the default.sequence file should contain:

<resource id="1" type="start"></resource> <resource id="2" src="/adm/navmaps"></resource> <resource id="3" type="finish"></resource> <link index="1" from="1" to="2"></link> <link index="2" from="2" to="3"></link> </map>

On your LON-CAPA library server, the default.sequence file will be found in:

where $l1, $l2, and $l3 are the first three characters in $courseNum Permissions/ownership for default.sequence should be:
-rw-r--r-- 1 www www

If the course was cloned, then the default.sequence file (and all other default_*.sequence files) will have been copied from the course being cloned to the appropriate location for the new course, and references to the courseNum of the old course will have been replaced in the new file(s) with references to the courseNum of the new course.  

In addition to creating the default.sequence file, the course creation process will have added a pointer to the URL for that file to the environment.db GDBM file for the course.  If a problem occurs when copying the default.sequence file, the URL recorded will be /adm/notfound.html, which then prevents the course from being loaded.

Although, you can fix that, as described below, the larger question is: (a) why did the "internal" web request fail when creating the default.sequence file.  The usual culprit is an incorrect SSL certificate chain, but that does not look to be the case for: lon-capa.bsu.edu

In addition, you should verify the contents of the default.sequence file for the course:

Anyway, you can replace the /adm/notfound.html in the environment.db file with the correct URL, by running the following perl script (save it as fixmap.pl), as user www, and passing it two arguments: bsu courseNum when running it, i.e.,

perl fixmap.pl bsu courseNum

(replacing courseNum with the appropriate string, e.g., 1a2458de5749811cabf3bsul1).

use strict;
print "Usage: fixmap.pl domain courseNum\n" unless @ARGV;

my $domain=shift @ARGV;
my $name=shift @ARGV;

my ($l1,$l2,$l3)=split(//,substr($name,0,3));
my $now = time;

use GDBM_File;
my %hash;

my $url = "uploaded/$domain/$name/default.sequence";
$url =~ s/(\W)/"%".unpack('H2',$1)/eg;

untie %hash;
if (open(my $fh, '>>',"/home/httpd/lonUsers/$domain/$l1/$l2/$l3/$name/environment.hist")) {
    print $fh "P:$now:url=$url\n";

Stuart Raeburn
LON-CAPA Academic Consortium
From: LON-CAPA-admin <lon-capa-admin-bounces at mail.lon-capa.org> on behalf of Neubauer, Paul via LON-CAPA-admin <lon-capa-admin at mail.lon-capa.org>
Sent: Tuesday, January 12, 2021 12:05 PM
To: 'lon-capa-admin at mail.lon-capa.org'
Subject: [LON-CAPA-admin] Invalid Map?

Hello all,

In preparation for the upcoming Spring semester, I was trying to set up a course for automatic enrollment. In my role as Domain Coordinator, I selected the course and tried to enter it as a course coordinator. I got the following message:

The following problems occurred:

Invalid map: /home/httpd/html/adm/notfound.html


This occurs only for this one course. I am aware that I am clueless, and I'd appreciate any clues you might have to offer me.


LON-CAPA-admin mailing list
LON-CAPA-admin at mail.lon-capa.org
LON-CAPA-admin mailing list
LON-CAPA-admin at mail.lon-capa.org

More information about the LON-CAPA-admin mailing list