Skip to content
Adrian Wilke edited this page Oct 18, 2018 · 6 revisions

Errors

Any error after mounting

If there occurs any error after mounting (e.g. after execution of nbgraderutils run.sh), please check if the home directory of the admin user nbgadmin is empty. If it is empty, the contents may be overwrittern during the mount execution (see docker ducumentation Mounting into a non-empty directory on the container). The following code indicates this error:

ls -a /home/nbgadmin/
.  ..

In the Dockerfile, a backup is created (cp -R /home/nbgadmin/ /home/.nbgadmin/).
Try to restore the backup.

500 : Internal Server Error

After login, there is the following error message:

500 : Internal Server Error
Failed to reach your server. Please try again later. Contact admin if the issue persists.

You can try restarting your server from the home page.

Check, if the permissions of the home directories are set correctly:

ls -l /home/

total 8
drwxr-xr-x 2 root    root    4096 Jan 11 11:11 nbgadmin
drwxr-xr-x 2 nbguser nbguser 4096 Jan 11 11:11 nbguser

If not, correct the permissions:

chown -R nbgadmin:nbgadmin /home/nbgadmin/

ls -l /home/
total 8
drwxr-xr-x 2 nbgadmin nbgadmin 4096 Jan 22 22:22 nbgadmin
drwxr-xr-x 2 nbguser  nbguser  4096 Jan 11 11:11 nbguser

Formgrader extension does not appear for the admin account

In the admin home directory, there should be configuration files to enable the extensions.
Check section Extensions in this document to set the configuration.

Error in configuration file, container can not start

Copy the config file to the host, edit it, and copy it to the container

sudo docker cp <containerName>:/srv/jupyterhub/jupyterhub_config.py ./
sudo nano jupyterhub_config.py 
sudo docker cp ./jupyterhub_config.py <containerName>:/srv/jupyterhub/jupyterhub_config.py

General

Configuration files

Check, if the configuration files exist:

ls -l /mnt/

total 0
lrwxrwxrwx 1 root root 36 Jan 11 11:11 jupyterhub_config.py -> /srv/jupyterhub/jupyterhub_config.py
lrwxrwxrwx 1 root root 41 Jan 11 11:11 nbgrader_config.py -> /opt/conda/etc/jupyter/nbgrader_config.py

Extensions

There are 4 nbgrader extensions (see nbgrader docs). The default configuration for nbgraderutils should be:

  • create_assignment (admin: enabled, user: disabled)
  • validate_assignment (admin: enabled, user: disabled)
  • formgrader (admin: enabled, user: disabled)
  • assignment_list (all: enabled)

This is configured in 4 files. They should contain:

tail /opt/conda/etc/jupyter/nbconfig/notebook.json 
{
  "load_extensions": {
    "create_assignment/main": false,
    "validate_assignment/main": false
  }
}

tail /opt/conda/etc/jupyter/nbconfig/tree.json 
{
  "load_extensions": {
    "formgrader/main": false,
    "assignment_list/main": true
  }
}

tail /home/nbgadmin/.jupyter/nbconfig/notebook.json 
{
  "load_extensions": {
    "create_assignment/main": true,
    "validate_assignment/main": true
  }
}

tail /home/nbgadmin/.jupyter/nbconfig/tree.json 
{
  "load_extensions": {
    "formgrader/main": true
  }
}

The code to create the configuration:

jupyter nbextension disable --sys-prefix create_assignment/main && \
 runuser -l  nbgadmin -c '/opt/conda/bin/jupyter nbextension enable --user create_assignment/main' && \
 jupyter nbextension disable --sys-prefix validate_assignment/main && \
 runuser -l  nbgadmin -c '/opt/conda/bin/jupyter nbextension enable --user validate_assignment/main' && \
 jupyter nbextension disable --sys-prefix formgrader/main --section=tree && \
 runuser -l  nbgadmin -c '/opt/conda/bin/jupyter nbextension enable --user formgrader/main --section=tree'