Running the Plom server

The server handles all communication between the database (which stores all the information about your test) and the various programmes, including plom-client, plom-manager, plom-create, plom-scan, and plom-finish.

Launching the server

After we have initialized our server, we can run it with plom-server launch. You can either change into your server directory (midterm if following the walkthrough) or you can specify the directory on the command line in the directory where you issued the plom-server init command:

$ plom-server launch midterm

INFO:server	Plom Server 0.10.1.dev (communicates with api 53)
INFO:server	Working from directory "midterm"
INFO:server	Database is not yet present: creating...
...
INFO:server	No manager password: autogenerating and writing to stdout...
Initial manager password: correcthorsebatterystaple
...
INFO:server	Loading ssl context
WARNING:server	SSL: Loaded default self-signed cert and key
INFO:server	Start the server!
======== Running on https://0.0.0.0:41989 ========
(Press CTRL+C to quit)

The server has found everything it needs and is up and running on the indicated IP and port.

If you’re running on a remote server, you probably want to use nohup or screen.

Make note of the manager password

If you did not previously configure user accounts, then the server will create a manager account for you when it starts up.

The password for this account will be printed to the stdout (not the log file). Make note of it; you’ll never see it again.

Checking the server is running

To ensure the server is running and that we can connect to it, try the plom-create status command:

plom-create status -s <myserver:41984> -w <manager_password>

You should see something like this:

Server status
-------------

[✓] online: https://localhost:41989
[✓] Plom server version 0.10.0 with API 53
[✓] secure connection verified with SSL

Specification
-------------

[×] Server does not yet have a spec
    You will need to add specification for your test.

User information
----------------

[✓] manager account
[!] no scanner account: you will not be able to upload
[!] No user accounts yet

Classlist
---------

[×] No classlist: classlist not found

Database
---------

[×] No rows have been inserted in the papers table
    (you will not be able to add any until you add a spec)

Rubrics
---------

Server does not yet have any rubrics

If you have connection trouble, check for firewalls between you and the server; consider trying to connect to localhost.

A bit about SSL certificates

You may get errors about SSL certificates or see something like this:

[!] insecure connection (self-signed or invalid SSL cert)

SSL is used to securely verify the identity of the server you are connecting too. If you’re just experimenting, this is not terribly important: you can bypass the checks by setting a special environment variable, e.g., in bash:

export PLOM_NO_SSL_VERIFY=1

The graphical client offers a mechanism to ignore SSL errors (at you and your users’ own risks).

For production servers, you’ll need to investigate how to setup SSL certificates, which is outside the scope of this tutorial.


We are now ready to create a specification for our test.


Stopping the server

One can stop the server with Ctrl-C or by simply killing the underlying python process. You can also restart it again later as needed.