From c7b3fa67fd9931cd5cdd16a8d64580889b9ff3e5 Mon Sep 17 00:00:00 2001 From: Shreya Malviya Date: Wed, 31 Mar 2021 16:40:36 +0530 Subject: [PATCH] Update Docker docs (#1065) * Add troubleshooting section to docker setup docs --- docs/content/setup/docker.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/content/setup/docker.md b/docs/content/setup/docker.md index 14454bdc6..a9f59647d 100644 --- a/docs/content/setup/docker.md +++ b/docs/content/setup/docker.md @@ -31,3 +31,16 @@ If you'd like to keep your existing configuration, you can export it to a file using the *Export config* button and then import it to the new Monkey Island. ![Export configuration](../../images/setup/export-configuration.png "Export configuration") + +## Troubleshooting + +### The Monkey Island container crashes due to a 'UnicodeDecodeError' +`UnicodeDecodeError: 'utf-8' codec can't decode byte 0xee in position 0: invalid continuation byte` + +You may encounter this error because of the existence of different MongoDB keys in the `monkey-island` and `monkey-mongo` containers. + +Starting a new container from the `guardicore/monkey-island:1.10.0` image generates a new secret key for storing sensitive information in MongoDB. If you have an old database instance running (from a previous run of Monkey), the key in the `monkey-mongo` container is different than the newly generated key in the `monkey-island` container. Since encrypted data (obtained from the previous run) is stored in MongoDB with the old key, decryption fails and you get this error. + +You can fix this in two ways: +1. Instead of starting a new container for the Monkey Island, you can run `docker container start -a monkey-island` to restart the existing container, which will contain the correct key material. +2. Kill and remove the existing MongoDB container, and start a new one. This will remove the old database entirely. Then, start the new Monkey Island container.