RiskWrenv0.10.1
GitHub

When something goes wrong

This guide is for anyone who is stuck: someone who cannot sign in, cannot see a record, or is refused something they expected to be able to do, and whoever looks after the installation when it misbehaves. Most refusals are RiskWren keeping one of its rules; The rules it keeps explains them.

Check the installation#

Start here when anything about the server seems wrong.

uv run riskwren doctor

On an installed deployment, run riskwren doctor (the deployment guide says how, for a container or a service). It checks each of these, and says what to do about anything that fails or deserves a look:

CheckWhat it means when it fails
Configurationriskwren.toml cannot be read, or holds a setting RiskWren does not know or a secret it refuses. The message names the line
PythonWhich Python runs RiskWren
Data homeThe folder that holds files, logs, and exports is missing or cannot be written (run riskwren init, or fix its permissions). A warning, not a failure, when its disk has less than 1 GB free
DatabaseThe database cannot be reached: check the address, the password in the environment, and that the server is running
SchemaThe database is older than this version: back up, then riskwren db upgrade. Or it is newer: run the version that made it
History guardThe database has lost the triggers that stop the history being changed. Restore from a backup, and find out who changed the database
HistoryAn event in the history does not match the chain: something changed it outside RiskWren. The message names the event
Sign-inSingle sign-on is set up but the provider cannot be reached or does not answer as expected. Without single sign-on it says local accounts
EmailThe mail server cannot be reached or refuses the sign-in
Scheduled workScheduled work is not running, so reminders, email, and webhooks are not sent

riskwren doctor --production adds what matters before real people rely on it: the https:// address, where the server listens, PostgreSQL, a recent backup, a second administrator, email, and that it is not a demo. Admin → Operations shows the same in the app.

riskwren verify checks the history on its own, and the documents and leadership reports that were frozen, and says where any difference is.

Logs. The server writes its log to logs/riskwren.log in the data home (./var unless configured otherwise), keeping the last five files of 5 MB. For more detail, put -v before the command: riskwren -v serve. Read a log before you share it outside the organization.

Signing in#

What happensWhat to do
The password is not acceptedCheck that the email address is the one your account was made with. An administrator can set a new one under Admin → People, or with riskwren users reset-password you@example.org. There is no self-service reset
Sign-in is refused for a while after several triesFailed attempts to one account, or from one address, are limited. Wait fifteen minutes, or ask an administrator to set a new password
Signed out unexpectedlyA session ends after a time without activity and after a longer time in any case (12 hours and 7 days unless configured otherwise), and when the password changes
"Sign in with your organization account" failsAn administrator checks Admin → Single sign-on: the connection check says what the provider answered. Local passwords still work for administrators
Nobody can sign in as an administratorOn the server: riskwren users add you@example.org --name "Your Name" --role admin, or reset an existing administrator's password
The page says the request is missing its CSRF tokenThe page was open across a sign-out or a restart. Reload it

I cannot see a record#

RiskWren decides what each person may see by one rule, and every list, count, and search follows it. You cannot see a record when:

A record you cannot see is answered as not found, not as forbidden, so that its existence is not given away.

I am not allowed to do something#

You are refusedBecauseWhat to do
Recording or confirming a test result of a controlYou own the control, or you recorded the result you are trying to confirmAsk another assessor. A result counts only when a second person who does not own the control confirms it
Confirming an issue's closureYou own the issue, or you proposed closing itAsk another assessor or a manager
Deciding an exceptionYou asked for itIt goes to another leader of the unit, or a manager
Accepting a riskYou own it, or its rating is above your limit, or you lead a different unitSomeone with a higher limit, or who leads the unit, accepts it. A manager cannot accept risk
Approving a plan or signing off a workpaper (internal audit)You drafted the plan, or prepared the workpaperAnother auditor, or a leader of the whole organization for a plan
Raising a risk or adding a recordOnly a unit's steward or a manager adds recordsAsk your steward, or, for a risk, report what you have seen
Editing a recordYou are not its owner, its unit's steward, or a managerAsk to be named as an owner
Linking a risk to another unit's controlYou cannot see the control under the program's visibilityA manager links it
Changing the programOnly a manager for the whole organization or an administrator shapes itAsk the risk and compliance team
"This token may only read"The token was made read-onlyAn administrator makes one that may change things, if it should
"This is a judgment a named person makes, not a token"Rating, accepting, deciding, confirming, approving, publishing, and triage belong to peopleDo it in the app as a person
"Your role does not allow this"The route needs a role you do not haveAsk an administrator, if you should have it

A figure looks wrong#

Figures are worked out from the record, never typed in, and each counts only what its reader may see: two people may see different numbers on the same dashboard, and both are right. Every figure opens the list it counts, which is the quickest way to see what is behind it.

Email, reminders, and webhooks are not arriving#

All three are sent by scheduled work.

  1. Run riskwren doctor: it says whether scheduled work is running. If [server] scheduler is off, something else must run riskwren jobs run on a schedule (Scheduled work).
  2. Look at Admin → Operations: each job's last run and its result, and whether it is paused.
  3. For email, send yourself a message from Admin → Operations, or run riskwren mail test you@example.org. People choose under Your account whether to get each notice, a daily summary, or none.
  4. A reminder is sent once for each date. Moving the date starts again; nothing is sent twice for the same date.
  5. For a webhook, its latest deliveries under Admin → Other systems show each answer the address gave. Send a test checks the address.

Restore from a backup#

A backup is one file, made with riskwren backup FILE. To restore it:

  1. Stop RiskWren.
  2. Make sure the database is empty and the data home has no files: a restore never writes over an installation. Do not run riskwren init first, since it fills the database.
  3. Check what the backup holds: riskwren restore FILE --describe. It names the version and migration that took it.
  4. Install that same version of RiskWren, and run riskwren restore FILE. It checks every table, every file, and the history against the backup's manifest.
  5. If that version is older than the one you run, install the current version, then run riskwren db upgrade.
  6. Run riskwren doctor, then start the server.

The same steps move an installation between SQLite and PostgreSQL. See Back up and restore, and Test a restore to practice before you need it.

Get help, and report a problem#

Describes RiskWren 0.10.1. Apache License 2.0. Screenshots show an invented organization; every person and record in them is fictional.